config

package
v0.0.0-...-5c36ebe Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 10 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 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"`
	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