http

package
v0.0.0-...-3852cca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(ctx context.Context, resp *http.Response) error

CheckResponse Checks that the response was successful

func CheckUrl

func CheckUrl(url string, ctx context.Context) error

CheckUrl Checks that a GET request to specified URL returns 200 without errors

func CreateRequest

func CreateRequest(url, method string, parameters interface{}) *http.Request

CreateRequest setup correct header for running tests

func GetApplicationClient

func GetApplicationClient(cfg config.Config) applicationAPIClient.ClientService

GetApplicationClient Gets the Application API client

func GetComponentClient

func GetComponentClient(cfg config.Config) componentAPIClient.ClientService

GetComponentClient Gets the Component API client

func GetDeploymentClient

func GetDeploymentClient(cfg config.Config) deploymentAPIClient.ClientService

GetDeploymentClient Gets the Deployment API client

func GetEnvironmentClient

func GetEnvironmentClient(cfg config.Config) environmentAPIClient.ClientService

GetEnvironmentClient Gets the Environment API client

func GetHTTPDefaultClient

func GetHTTPDefaultClient(timeout time.Duration) *http.Client

GetHTTPDefaultClient returns a new simple HTTP client

func GetJobClient

GetJobClient Gets the Job API client

func GetK8sJobClient

func GetK8sJobClient(cfg config.Config) jobAPIClient.ClientService

GetK8sJobClient Gets the K8s job API client

func GetPlatformClient

func GetPlatformClient(cfg config.Config) platformAPIClient.ClientService

GetPlatformClient Gets the Platform API client

func GetUrl

func GetUrl(schema string, domainName string) string

func TriggerWebhookPush

func TriggerWebhookPush(ctx context.Context, cfg config.Config, branch, commit, repository, sharedSecret string) error

TriggerWebhookPush Makes call to webhook

Types

type Repository

type Repository struct {
	SSHURL string `json:"ssh_url"`
}

Repository For serializing payload -> Repository

type WebhookPayload

type WebhookPayload struct {
	Ref        string     `json:"ref"`
	After      string     `json:"after"`
	Repository Repository `json:"repository"`
}

WebhookPayload For serializing payload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL