api

package
v0.0.0-...-a0d6768 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKeptnAPI

func CreateKeptnAPI(httpClient *http.Client, env config.EnvConfig) (keptnapi.KeptnInterface, error)

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 Initializer

type Initializer struct {
	Remote   func(baseURL string, options ...func(*keptnapi.APISet)) (*keptnapi.APISet, error)
	Internal func(client *http.Client, apiMappings ...api.InClusterAPIMappings) (*api.InternalAPISet, error)
}

Initializer implements both methods of creating a new keptn API with internal or remote execution plane

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