api

package
v0.20.2 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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