Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Remove deprecated functions from v2
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Pitman <[email protected]>
  • Loading branch information
arthurpitman committed Jun 2, 2022
1 parent edb4b2e commit f2d23c7
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 127 deletions.
10 changes: 0 additions & 10 deletions pkg/api/utils/v2/apiUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ type APIHandler struct {
Scheme string
}

// NewAuthenticatedAPIHandler returns a new APIHandler that authenticates at the api-service endpoint via the provided token
// Deprecated: use APISet instead
func NewAuthenticatedAPIHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *APIHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedAPIHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedAPIHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *APIHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/authUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ func NewAuthHandler(baseURL string) *AuthHandler {
}
}

// NewAuthenticatedAuthHandler returns a new AuthHandler that authenticates at the endpoint via the provided token
// Deprecated: use APISet instead
func NewAuthenticatedAuthHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *AuthHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))

return createAuthenticatedAuthHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedAuthHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *AuthHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
10 changes: 0 additions & 10 deletions pkg/api/utils/v2/eventUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ func NewEventHandler(baseURL string) *EventHandler {

const mongodbDatastoreServiceBaseUrl = "mongodb-datastore"

// NewAuthenticatedEventHandler returns a new EventHandler that authenticates at the endpoint via the provided token
// Deprecated: use APISet instead
func NewAuthenticatedEventHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *EventHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedEventHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedEventHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *EventHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
10 changes: 0 additions & 10 deletions pkg/api/utils/v2/logUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ func NewLogHandler(baseURL string) *LogHandler {
}
}

// NewAuthenticatedLogHandler returns a new EventHandler that authenticates at the endpoint via the provided token
// Deprecated: use APISet instead
func NewAuthenticatedLogHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *LogHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = getClientTransport(httpClient.Transport)
return createAuthenticatedLogHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedLogHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *LogHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/projectUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ func NewProjectHandler(baseURL string) *ProjectHandler {
}
}

// NewAuthenticatedProjectHandler returns a new ProjectHandler that authenticates at the api via the provided token
// and sends all requests directly to the configuration-service
// Deprecated: use APISet instead
func NewAuthenticatedProjectHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ProjectHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthProjectHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthProjectHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ProjectHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/resourceUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,6 @@ func NewResourceHandler(baseURL string) *ResourceHandler {
}
}

// NewAuthenticatedResourceHandler returns a new ResourceHandler that authenticates at the api via the provided token
// and sends all requests directly to the configuration-service
// Deprecated: use APISet instead
func NewAuthenticatedResourceHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ResourceHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedResourceHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedResourceHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ResourceHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/secretUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,6 @@ func NewSecretHandler(baseURL string) *SecretHandler {
}
}

// NewAuthenticatedSecretHandler returns a new SecretHandler that authenticates at the api via the provided token
// and sends all requests directly to the secret-service
// Deprecated: use APISet instead
func NewAuthenticatedSecretHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *SecretHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedSecretHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedSecretHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *SecretHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
10 changes: 0 additions & 10 deletions pkg/api/utils/v2/sequenceUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ func NewSequenceControlHandler(baseURL string) *SequenceControlHandler {
}
}

// NewAuthenticatedSequenceControlHandler returns a new SequenceControlHandler that authenticates at the api via the provided token
// Deprecated: use APISet instead
func NewAuthenticatedSequenceControlHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *SequenceControlHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedSequenceControlHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedSequenceControlHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *SequenceControlHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/serviceUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@ func NewServiceHandler(baseURL string) *ServiceHandler {
}
}

// NewAuthenticatedServiceHandler returns a new ServiceHandler that authenticates at the api via the provided token
// and sends all requests directly to the configuration-service
// Deprecated: use APISet instead
func NewAuthenticatedServiceHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ServiceHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedServiceHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedServiceHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ServiceHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/shipyardControllerUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ func NewShipyardControllerHandler(baseURL string) *ShipyardControllerHandler {
}
}

// NewAuthenticatedShipyardControllerHandler returns a new ShipyardControllerHandler that authenticates at the api via the provided token
// and sends all requests directly to the configuration-service
// Deprecated: use APISet instead
func NewAuthenticatedShipyardControllerHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ShipyardControllerHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedShipyardControllerHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedShipyardControllerHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *ShipyardControllerHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
11 changes: 0 additions & 11 deletions pkg/api/utils/v2/stageUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ func NewStageHandler(baseURL string) *StageHandler {
}
}

// NewAuthenticatedStageHandler returns a new StageHandler that authenticates at the api via the provided token
// and sends all requests directly to the configuration-service
// Deprecated: use APISet instead
func NewAuthenticatedStageHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *StageHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = wrapOtelTransport(getClientTransport(httpClient.Transport))
return createAuthenticatedStageHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedStageHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *StageHandler {
baseURL = strings.TrimPrefix(baseURL, "http://")
baseURL = strings.TrimPrefix(baseURL, "https://")
Expand Down
10 changes: 0 additions & 10 deletions pkg/api/utils/v2/uniformUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ func NewUniformHandler(baseURL string) *UniformHandler {
}
}

// NewAuthenticatedUniformHandler returns a new UniformHandler that authenticates at the api via the provided token
// Deprecated: use APISet instead
func NewAuthenticatedUniformHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *UniformHandler {
if httpClient == nil {
httpClient = &http.Client{}
}
httpClient.Transport = getClientTransport(httpClient.Transport)
return createAuthenticatedUniformHandler(baseURL, authToken, authHeader, httpClient, scheme)
}

func createAuthenticatedUniformHandler(baseURL string, authToken string, authHeader string, httpClient *http.Client, scheme string) *UniformHandler {
baseURL = httputils.TrimHTTPScheme(baseURL)
baseURL = strings.TrimRight(baseURL, "/")
Expand Down

0 comments on commit f2d23c7

Please sign in to comment.