Fix missing definitions

pull/2972/head
ssbkang 2019-06-27 22:00:25 +12:00
parent ba9838296e
commit 1a387228b0
4 changed files with 9 additions and 2 deletions

View File

@ -674,6 +674,7 @@ func main() {
ResourceControlService: store.ResourceControlService,
SettingsService: store.SettingsService,
RegistryService: store.RegistryService,
DeploymentKeyService: store.DeploymentKeyService,
DockerHubService: store.DockerHubService,
StackService: store.StackService,
ScheduleService: store.ScheduleService,

View File

@ -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}
} else if err != nil {
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

View File

@ -9,7 +9,7 @@ import (
"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 {
*mux.Router
DeploymentKeyService portainer.DeploymentKeyService

View File

@ -9,6 +9,7 @@ import (
"github.com/portainer/portainer/api/docker"
"github.com/portainer/portainer/api/http/handler"
"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/endpointgroups"
"github.com/portainer/portainer/api/http/handler/endpointproxy"
@ -51,6 +52,7 @@ type Server struct {
JobScheduler portainer.JobScheduler
Snapshotter portainer.Snapshotter
RoleService portainer.RoleService
DeploymentKeyService portainer.DeploymentKeyService
DockerHubService portainer.DockerHubService
EndpointService portainer.EndpointService
EndpointGroupService portainer.EndpointGroupService
@ -222,9 +224,13 @@ func (server *Server) Start() error {
webhookHandler.EndpointService = server.EndpointService
webhookHandler.DockerClientFactory = server.DockerClientFactory
var deploymentKeyHandler = deploymentkeys.NewHandler(requestBouncer)
deploymentKeyHandler.DeploymentKeyService = server.DeploymentKeyService
server.Handler = &handler.Handler{
RoleHandler: roleHandler,
AuthHandler: authHandler,
DeploymentKeyHandler: deploymentKeyHandler,
DockerHubHandler: dockerHubHandler,
EndpointGroupHandler: endpointGroupHandler,
EndpointHandler: endpointHandler,