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

@ -40,11 +40,10 @@ type CreateProjectRequest struct {
type CreateProjectHandler struct { type CreateProjectHandler struct {
log *zap.SugaredLogger log *zap.SugaredLogger
ah *action.ActionHandler ah *action.ActionHandler
exposedURL string
} }
func NewCreateProjectHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *CreateProjectHandler { func NewCreateProjectHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateProjectHandler {
return &CreateProjectHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL} return &CreateProjectHandler{log: logger.Sugar(), ah: ah}
} }
func (h *CreateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (h *CreateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@ -81,11 +80,10 @@ func (h *CreateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ProjectReconfigHandler struct { type ProjectReconfigHandler struct {
log *zap.SugaredLogger log *zap.SugaredLogger
ah *action.ActionHandler ah *action.ActionHandler
exposedURL string
} }
func NewProjectReconfigHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *ProjectReconfigHandler { func NewProjectReconfigHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectReconfigHandler {
return &ProjectReconfigHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL} return &ProjectReconfigHandler{log: logger.Sugar(), ah: ah}
} }
func (h *ProjectReconfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (h *ProjectReconfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@ -109,11 +107,10 @@ func (h *ProjectReconfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
type ProjectUpdateRepoLinkedAccountHandler struct { type ProjectUpdateRepoLinkedAccountHandler struct {
log *zap.SugaredLogger log *zap.SugaredLogger
ah *action.ActionHandler ah *action.ActionHandler
exposedURL string
} }
func NewProjectUpdateRepoLinkedAccountHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *ProjectUpdateRepoLinkedAccountHandler { func NewProjectUpdateRepoLinkedAccountHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectUpdateRepoLinkedAccountHandler {
return &ProjectUpdateRepoLinkedAccountHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL} return &ProjectUpdateRepoLinkedAccountHandler{log: logger.Sugar(), ah: ah}
} }
func (h *ProjectUpdateRepoLinkedAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (h *ProjectUpdateRepoLinkedAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

View File

@ -38,11 +38,10 @@ type CreateProjectGroupRequest struct {
type CreateProjectGroupHandler struct { type CreateProjectGroupHandler struct {
log *zap.SugaredLogger log *zap.SugaredLogger
ah *action.ActionHandler ah *action.ActionHandler
exposedURL string
} }
func NewCreateProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler, exposedURL string) *CreateProjectGroupHandler { func NewCreateProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateProjectGroupHandler {
return &CreateProjectGroupHandler{log: logger.Sugar(), ah: ah, exposedURL: exposedURL} return &CreateProjectGroupHandler{log: logger.Sugar(), ah: ah}
} }
func (h *CreateProjectGroupHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 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) projectGroupHandler := api.NewProjectGroupHandler(logger, g.ah)
projectGroupSubgroupsHandler := api.NewProjectGroupSubgroupsHandler(logger, g.ah) projectGroupSubgroupsHandler := api.NewProjectGroupSubgroupsHandler(logger, g.ah)
projectGroupProjectsHandler := api.NewProjectGroupProjectsHandler(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) 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) deleteProjectHandler := api.NewDeleteProjectHandler(logger, g.ah)
projectReconfigHandler := api.NewProjectReconfigHandler(logger, g.ah, g.c.APIExposedURL) projectReconfigHandler := api.NewProjectReconfigHandler(logger, g.ah)
projectUpdateRepoLinkedAccountHandler := api.NewProjectUpdateRepoLinkedAccountHandler(logger, g.ah, g.c.APIExposedURL) projectUpdateRepoLinkedAccountHandler := api.NewProjectUpdateRepoLinkedAccountHandler(logger, g.ah)
secretHandler := api.NewSecretHandler(logger, g.ah) secretHandler := api.NewSecretHandler(logger, g.ah)
createSecretHandler := api.NewCreateSecretHandler(logger, g.ah) createSecretHandler := api.NewCreateSecretHandler(logger, g.ah)