proxyconfig

package
v0.0.0-...-7d69bf5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthType

type AuthType string

AuthType determines the secret structure

const (
	Undefined   AuthType = ""
	NoAuth      AuthType = "noauth"
	Oauth       AuthType = "oauth"
	Basic       AuthType = "basicauth"
	Certificate AuthType = "certificate"
)

type BasicAuthConfig

type BasicAuthConfig struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (BasicAuthConfig) ToCredentials

func (bc BasicAuthConfig) ToCredentials() *authorization.Credentials

type CSRFConfig

type CSRFConfig struct {
	TokenURL string `json:"tokenUrl"`
}

type CertificateConfig

type CertificateConfig struct {
	Certificate []byte `json:"certificate"`
	PrivateKey  []byte `json:"privateKey"`
}

func (CertificateConfig) ToCredentials

func (cc CertificateConfig) ToCredentials() *authorization.Credentials

type Configuration

type Configuration struct {
	RequestParameters *authorization.RequestParameters `json:"requestParameters,omitempty"`
	CSRFConfig        *CSRFConfig                      `json:"csrfConfig,omitempty"`
	Credentials       Credentials                      `json:"credentials,omitempty"`
}

type Credentials

type Credentials interface {
	ToCredentials() *authorization.Credentials
}

type NoAuthConfig

type NoAuthConfig struct{}

func (NoAuthConfig) ToCredentials

func (oc NoAuthConfig) ToCredentials() *authorization.Credentials

type OauthConfig

type OauthConfig struct {
	ClientId          string                          `json:"clientId"`
	ClientSecret      string                          `json:"clientSecret"`
	TokenURL          string                          `json:"tokenUrl"`
	RequestParameters authorization.RequestParameters `json:"requestParameters,omitempty"`
}

func (OauthConfig) ToCredentials

func (oc OauthConfig) ToCredentials() *authorization.Credentials

type ProxyDestinationConfig

type ProxyDestinationConfig struct {
	TargetURL     string        `json:"targetUrl"`
	Configuration Configuration `json:"configuration"`
}

ProxyDestinationConfig is Proxy configuration for specific target

type TargetConfigProvider

type TargetConfigProvider interface {
	GetDestinationConfig(secretName, apiName string) (ProxyDestinationConfig, apperrors.AppError)
}

TargetConfigProvider allows to fetch ProxyDestinationConfig for specific service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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