api

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientGetter

type HTTPClientGetter interface {
	// Get Creates the HTTP Client
	Get() (*http.Client, error)
}

HTTPClientGetter is responsible for creating an HTTP client

func CreateClientGetter

func CreateClientGetter(envConfig config.EnvConfig) HTTPClientGetter

CreateClientGetter returns a HTTPClientGetter implementation based on the values certain properties inside the given env configuration

type InitializationResult

type InitializationResult struct {
	KeptnAPI            keptnapi.KeptnInterface
	KeptnAPIV2          keptnapiv2.KeptnInterface
	ControlPlane        *controlplane.ControlPlane
	EventSenderCallback controlplane.EventSender
}

func Initialize

func Initialize(env config.EnvConfig, clientFactory HTTPClientGetter, logger logger.Logger) (*InitializationResult, error)

Initialize takes care of creating the API clients and initializing the cp-connector library based on environment variables

type OAuthClientGetter

type OAuthClientGetter struct {
	*SimpleClientGetter
	// contains filtered or unexported fields
}

OAuthClientGetter creates an HTTP client configured for use with SSO/Oauth

func NewOauthClientGetter

func NewOauthClientGetter(envConfig config.EnvConfig, oauthDiscovery oauthutils.OauthLocationGetter) *OAuthClientGetter

NewOauthClientGetter creates a new instance of a OAuthClientGetter

func (*OAuthClientGetter) Get

func (g *OAuthClientGetter) Get() (*http.Client, error)

type SimpleClientGetter

type SimpleClientGetter struct {
	// contains filtered or unexported fields
}

SimpleClientGetter creates a basic HTTP client

func New

func New(envConfig config.EnvConfig) *SimpleClientGetter

New Creates a new instance of a SimpleClientGetter

func (*SimpleClientGetter) Get

func (g *SimpleClientGetter) Get() (*http.Client, error)

Jump to

Keyboard shortcuts

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