mirror of https://github.com/portainer/portainer
Fix missing definitions
parent
ba9838296e
commit
1a387228b0
|
@ -674,6 +674,7 @@ func main() {
|
||||||
ResourceControlService: store.ResourceControlService,
|
ResourceControlService: store.ResourceControlService,
|
||||||
SettingsService: store.SettingsService,
|
SettingsService: store.SettingsService,
|
||||||
RegistryService: store.RegistryService,
|
RegistryService: store.RegistryService,
|
||||||
|
DeploymentKeyService: store.DeploymentKeyService,
|
||||||
DockerHubService: store.DockerHubService,
|
DockerHubService: store.DockerHubService,
|
||||||
StackService: store.StackService,
|
StackService: store.StackService,
|
||||||
ScheduleService: store.ScheduleService,
|
ScheduleService: store.ScheduleService,
|
||||||
|
|
|
@ -33,7 +33,7 @@ func (handler *Handler) deploymentkeyCreate(w http.ResponseWriter, r *http.Reque
|
||||||
return &httperror.HandlerError{http.StatusNotFound, "Unable to find a deployment key with the specified identifier inside the database", err}
|
return &httperror.HandlerError{http.StatusNotFound, "Unable to find a deployment key with the specified identifier inside the database", err}
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find a deployment key with the specified identifier inside the database", err}
|
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find a deployment key with the specified identifier inside the database", err}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a function to call and create public key and private key
|
// Add a function to call and create public key and private key
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/portainer/portainer/api/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to handle webhook operations.
|
// Handler is the HTTP handler used to handle deploymentkey operations.
|
||||||
type Handler struct {
|
type Handler struct {
|
||||||
*mux.Router
|
*mux.Router
|
||||||
DeploymentKeyService portainer.DeploymentKeyService
|
DeploymentKeyService portainer.DeploymentKeyService
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"github.com/portainer/portainer/api/docker"
|
"github.com/portainer/portainer/api/docker"
|
||||||
"github.com/portainer/portainer/api/http/handler"
|
"github.com/portainer/portainer/api/http/handler"
|
||||||
"github.com/portainer/portainer/api/http/handler/auth"
|
"github.com/portainer/portainer/api/http/handler/auth"
|
||||||
|
"github.com/portainer/portainer/api/http/handler/deploymentkeys"
|
||||||
"github.com/portainer/portainer/api/http/handler/dockerhub"
|
"github.com/portainer/portainer/api/http/handler/dockerhub"
|
||||||
"github.com/portainer/portainer/api/http/handler/endpointgroups"
|
"github.com/portainer/portainer/api/http/handler/endpointgroups"
|
||||||
"github.com/portainer/portainer/api/http/handler/endpointproxy"
|
"github.com/portainer/portainer/api/http/handler/endpointproxy"
|
||||||
|
@ -51,6 +52,7 @@ type Server struct {
|
||||||
JobScheduler portainer.JobScheduler
|
JobScheduler portainer.JobScheduler
|
||||||
Snapshotter portainer.Snapshotter
|
Snapshotter portainer.Snapshotter
|
||||||
RoleService portainer.RoleService
|
RoleService portainer.RoleService
|
||||||
|
DeploymentKeyService portainer.DeploymentKeyService
|
||||||
DockerHubService portainer.DockerHubService
|
DockerHubService portainer.DockerHubService
|
||||||
EndpointService portainer.EndpointService
|
EndpointService portainer.EndpointService
|
||||||
EndpointGroupService portainer.EndpointGroupService
|
EndpointGroupService portainer.EndpointGroupService
|
||||||
|
@ -222,9 +224,13 @@ func (server *Server) Start() error {
|
||||||
webhookHandler.EndpointService = server.EndpointService
|
webhookHandler.EndpointService = server.EndpointService
|
||||||
webhookHandler.DockerClientFactory = server.DockerClientFactory
|
webhookHandler.DockerClientFactory = server.DockerClientFactory
|
||||||
|
|
||||||
|
var deploymentKeyHandler = deploymentkeys.NewHandler(requestBouncer)
|
||||||
|
deploymentKeyHandler.DeploymentKeyService = server.DeploymentKeyService
|
||||||
|
|
||||||
server.Handler = &handler.Handler{
|
server.Handler = &handler.Handler{
|
||||||
RoleHandler: roleHandler,
|
RoleHandler: roleHandler,
|
||||||
AuthHandler: authHandler,
|
AuthHandler: authHandler,
|
||||||
|
DeploymentKeyHandler: deploymentKeyHandler,
|
||||||
DockerHubHandler: dockerHubHandler,
|
DockerHubHandler: dockerHubHandler,
|
||||||
EndpointGroupHandler: endpointGroupHandler,
|
EndpointGroupHandler: endpointGroupHandler,
|
||||||
EndpointHandler: endpointHandler,
|
EndpointHandler: endpointHandler,
|
||||||
|
|
Loading…
Reference in New Issue