config

package
v0.0.0-...-8568fd5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthConfig

func AuthConfig() server.AuthConfig

AuthConfig function returns actual auth configuration.

func CanaryConfig

func CanaryConfig() service.CanaryConfig

CanaryConfig function returns actual canary configuration.

func CloudWatchConfig

func CloudWatchConfig() logger.CloudWatchConfiguration

CloudWatchConfig function returns actual CloudWatch configuration.

func KafkaZerologConfig

func KafkaZerologConfig() logger.KafkaZerologConfiguration

KafkaZerologConfig function returns the configuration of ZeroLog for Kafka.

func LoadConfiguration

func LoadConfiguration(defaultConfigFile string) error

LoadConfiguration loads configuration from defaultConfigFile, file set in configFileEnvVariableName or from env

func LoggingConfig

func LoggingConfig() logger.LoggingConfiguration

LoggingConfig function returns actual logger configuration.

func SentryLoggingConfig

func SentryLoggingConfig() logger.SentryLoggingConfiguration

SentryLoggingConfig function returns the sentry log configuration.

func ServerConfig

func ServerConfig() server.Config

ServerConfig function returns actual server configuration.

func StorageConfig

func StorageConfig() service.StorageConfig

StorageConfig function returns actual storage configuration.

Types

type Configuration

type Configuration struct {
	ServerConfig        server.Config                     `mapstructure:"server" toml:"server"`
	AuthConfig          server.AuthConfig                 `mapstructure:"auth" toml:"auth"`
	StorageConfig       service.StorageConfig             `mapstructure:"storage" toml:"storage"`
	CanaryConfig        service.CanaryConfig              `mapstructure:"canary" toml:"canary"`
	LoggingConfig       logger.LoggingConfiguration       `mapstructure:"logging" toml:"logging"`
	CloudWatchConfig    logger.CloudWatchConfiguration    `mapstructure:"cloudwatch" toml:"cloudwatch"`
	SentryLoggingConfig logger.SentryLoggingConfiguration `mapstructure:"sentry" toml:"sentry"`
	KafkaZerologConfig  logger.KafkaZerologConfiguration  `mapstructure:"kafka_zerolog" toml:"kafka_zerolog"`
}

Configuration is a structure holding the whole service configuration

var Config Configuration

Config has exactly the same structure as *.toml file

Jump to

Keyboard shortcuts

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