Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConfigNotValid = fmt.Errorf("configuration not valid")
)
Functions ¶
func GetConfig ¶
func GetConfig[T Validator](config GenericConfig) (T, error)
Types ¶
type Authentication ¶
type Authentication struct {
Secret SecretSource `json:"secret"`
}
type Configuration ¶
type Configuration struct {
Integrations []Integration `json:"integrations"`
}
func LoadServiceConfiguration ¶
func LoadServiceConfiguration(filePath string) (*Configuration, error)
type EnvironmentVariables ¶
type EnvironmentVariables struct { LogLevel string `env:"LOG_LEVEL" envDefault:"info"` HTTPPort string `env:"HTTP_PORT" envDefault:"8080"` HTTPAddress string `env:"HTTP_ADDRESS" envDefault:"0.0.0.0"` ServicePrefix string `env:"SERVICE_PREFIX"` DelayShutdownSeconds int `env:"DELAY_SHUTDOWN_SECONDS" envDefault:"10"` ConfigurationPath string `env:"CONFIGURATION_PATH,required"` }
EnvironmentVariables struct with the mapping of desired environment variables.
type GenericConfig ¶
func (*GenericConfig) UnmarshalJSON ¶
func (w *GenericConfig) UnmarshalJSON(data []byte) error
type Integration ¶
type Integration struct { Source GenericConfig `json:"source"` Pipelines []Pipeline `json:"pipelines"` }
type Pipeline ¶
type Pipeline struct { Processors Processors `json:"processors"` Sinks Sinks `json:"sinks"` }
type Processors ¶
type Processors []GenericConfig
type SecretSource ¶
type SecretSource string
func (SecretSource) String ¶
func (s SecretSource) String() string
func (*SecretSource) UnmarshalJSON ¶
func (s *SecretSource) UnmarshalJSON(data []byte) error
type Sinks ¶
type Sinks []GenericConfig
type Source ¶
type Source GenericConfig
Click to show internal directories.
Click to hide internal directories.