config

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flags added in v0.0.7

func Flags(ctx context.Context) []cli.Flag

Flags returns a flag array

Types

type CORSConfig added in v0.0.11

type CORSConfig struct {
	Enabled                     bool
	AllowedOriginsDefaultScheme string
	AllowedOrigins              []string
	AllowedHeaders              []string
	AllowedMethods              []string
}

CORSConfig contains the CORS configuration for the proxy

type Config

type Config struct {
	ClientID               string `validate:"required,uuid"`
	ClientSecret           string `validate:"required,min=1"`
	TenantID               string `validate:"required,uuid"`
	ListenerAddress        string `validate:"hostname_port"`
	MetricsListenerAddress string `validate:"hostname_port"`
	ListenerTLSConfig      ListenerTLSConfig
	CacheEngine            models.CacheEngine
	RedisURI               string `validate:"uri"`
	AzureADGroupPrefix     string
	AzureADMaxGroupCount   int `validate:"min=1,max=1000"`
	GroupSyncInterval      time.Duration
	GroupIdentifier        models.GroupIdentifier
	KubernetesConfig       KubernetesConfig
	Metrics                models.Metrics
	CORSConfig             CORSConfig
}

Config contains the configuration that is used for the application

func NewConfig added in v0.0.7

func NewConfig(ctx context.Context, cli *cli.Context) (Config, error)

NewConfig returns a Config or error

func (Config) Validate

func (config Config) Validate() error

Validate validates AppConfig struct

type KubernetesConfig

type KubernetesConfig struct {
	URL                 *url.URL
	RootCA              *x509.CertPool
	RootCAString        string
	Token               string
	ValidateCertificate bool
}

KubernetesConfig contains the Kubernetes specific configuration

type ListenerTLSConfig

type ListenerTLSConfig struct {
	Enabled         bool
	CertificatePath string
	KeyPath         string
}

ListenerTLSConfig contains the TLS configuration for the listener

Jump to

Keyboard shortcuts

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