gateway api: remove unused exposedURL variable

This commit is contained in:
Simone Gotti 2019-05-12 00:28:11 +02:00
parent caa9d74b72
commit 55b4a94281
3 changed files with 20 additions and 24 deletions

View File

@ -38,13 +38,12 @@ type CreateProjectRequest struct {
}
type CreateProjectHandler struct {
log *zap.SugaredLogger
ah *action.ActionHandler
exposedURL string
log *zap.SugaredLogger
ah *action.ActionHandler
}
func NewCreateProjectHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *CreateProjectHandler {
return &CreateProjectHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL}
func NewCreateProjectHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateProjectHandler {
return &CreateProjectHandler{log: logger.Sugar(), ah: ah}
}
func (h *CreateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@ -79,13 +78,12 @@ func (h *CreateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
}
type ProjectReconfigHandler struct {
log *zap.SugaredLogger
ah *action.ActionHandler
exposedURL string
log *zap.SugaredLogger
ah *action.ActionHandler
}
func NewProjectReconfigHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *ProjectReconfigHandler {
return &ProjectReconfigHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL}
func NewProjectReconfigHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectReconfigHandler {
return &ProjectReconfigHandler{log: logger.Sugar(), ah: ah}
}
func (h *ProjectReconfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@ -107,13 +105,12 @@ func (h *ProjectReconfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
}
type ProjectUpdateRepoLinkedAccountHandler struct {
log *zap.SugaredLogger
ah *action.ActionHandler
exposedURL string
log *zap.SugaredLogger
ah *action.ActionHandler
}
func NewProjectUpdateRepoLinkedAccountHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *ProjectUpdateRepoLinkedAccountHandler {
return &ProjectUpdateRepoLinkedAccountHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL}
func NewProjectUpdateRepoLinkedAccountHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectUpdateRepoLinkedAccountHandler {
return &ProjectUpdateRepoLinkedAccountHandler{log: logger.Sugar(), ah: ah}
}
func (h *ProjectUpdateRepoLinkedAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

View File

@ -36,13 +36,12 @@ type CreateProjectGroupRequest struct {
}
type CreateProjectGroupHandler struct {
log *zap.SugaredLogger
ah *action.ActionHandler
exposedURL string
log *zap.SugaredLogger
ah *action.ActionHandler
}
func NewCreateProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *CreateProjectGroupHandler {
return &CreateProjectGroupHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL}
func NewCreateProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateProjectGroupHandler {
return &CreateProjectGroupHandler{log: logger.Sugar(), ah: ah}
}
func (h *CreateProjectGroupHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

View File

@ -152,13 +152,13 @@ func (g *Gateway) Run(ctx context.Context) error {
projectGroupHandler := api.NewProjectGroupHandler(logger, g.ah)
projectGroupSubgroupsHandler := api.NewProjectGroupSubgroupsHandler(logger, g.ah)
projectGroupProjectsHandler := api.NewProjectGroupProjectsHandler(logger, g.ah)
createProjectGroupHandler := api.NewCreateProjectGroupHandler(logger, g.ah, g.c.APIExposedURL)
createProjectGroupHandler := api.NewCreateProjectGroupHandler(logger, g.ah)
projectHandler := api.NewProjectHandler(logger, g.ah)
createProjectHandler := api.NewCreateProjectHandler(logger, g.ah, g.c.APIExposedURL)
createProjectHandler := api.NewCreateProjectHandler(logger, g.ah)
deleteProjectHandler := api.NewDeleteProjectHandler(logger, g.ah)
projectReconfigHandler := api.NewProjectReconfigHandler(logger, g.ah, g.c.APIExposedURL)
projectUpdateRepoLinkedAccountHandler := api.NewProjectUpdateRepoLinkedAccountHandler(logger, g.ah, g.c.APIExposedURL)
projectReconfigHandler := api.NewProjectReconfigHandler(logger, g.ah)
projectUpdateRepoLinkedAccountHandler := api.NewProjectUpdateRepoLinkedAccountHandler(logger, g.ah)
secretHandler := api.NewSecretHandler(logger, g.ah)
createSecretHandler := api.NewCreateSecretHandler(logger, g.ah)