config

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPFlags

func AddPFlags(set *pflag.FlagSet)

AppPFlags adds pflags for the Config structure and adds them in the provided set

Types

type Config

type Config struct {
	Server         *server.Config        `mapstructure:"server"`
	HttpClient     *http.Config          `mapstructure:"http_client"`
	GraphQLClient  *graphql.Config       `mapstructure:"graphql_client"`
	Director       *director.Config      `mapstructure:"director"`
	Webhook        *webhook.Config       `mapstructure:"webhook"`
	ExternalClient *ExternalClientConfig `mapstructure:"external_client"`
}

Config comprises of all the configurations that are necessary for successful bootstrap and execution of the Operations Controller

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig constructs a Config with default values

func New

func New(env env.Environment) (*Config, error)

New constructs a Config based on a given Environment

func (*Config) Validate

func (c *Config) Validate() error

Validate ensures the constructed Config contains valid property values

type ExternalClientConfig

type ExternalClientConfig struct {
	CertSecret     string `mapstructure:"cert_secret"`
	CertKey        string `mapstructure:"cert_key"`
	KeyKey         string `mapstructure:"key_key"`
	CertSecretName string `mapstructure:"cert_secret_name"`
}

type Validatable

type Validatable interface {
	Validate() error
}

Validatable defines entities capable of being validated

Jump to

Keyboard shortcuts

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