Documentation ¶
Index ¶
- func CreateOAuth2Client(ctx context.Context, accessToken string, sslVerify bool) *http.Client
- func GetClientAllowsSelfSigned() *http.Client
- func GetGitProviderAndAPIURL(inputURL string) (string, string, error)
- func GetWebhookSecretTokens(kubeClient k8sclient.Interface, namespace, name string) (accessToken string, secretToken string, err error)
- func RespondError(response *restful.Response, err error, statusCode int)
- func RespondErrorMessage(response *restful.Response, message string, statusCode int)
- func RespondMessageAndLogError(response *restful.Response, err error, message string, statusCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOAuth2Client ¶
createOAuth2Client returns an HTTP client with oauth2 authentication using the provided accessToken
func GetGitProviderAndAPIURL ¶
Returns (provider, apiurl, error):
func GetWebhookSecretTokens ¶
func GetWebhookSecretTokens(kubeClient k8sclient.Interface, namespace, name string) (accessToken string, secretToken string, err error)
getWebhookSecretTokens returns the "secretToken" and "accessToken" stored in the Secret with the name specified by the parameter, and in the namespace specified by r.Defaults.Namespace.
func RespondError ¶
RespondError - logs and writes an error response with a desired status code
func RespondErrorMessage ¶
RespondErrorMessage - logs and writes an error message with a desired status code
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.