package
Version:
v0.5.7
Opens a new window with list of versions in this module.
Published: Sep 19, 2022
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Config of application
ParseConfig Parse config file
type HTTPClient struct {
InternalURL string `mapstructure:"INTERNAL_URL"`
XApplicationID *string `mapstructure:"X_APPLICATION_ID"`
RetryCount int `mapstructure:"RETRY_COUNT"`
RetryWaitTime time.Duration
}
type Kafka struct {
Brokers []string `mapstructure:"KAFKA_BROKERS"`
Username string `mapstructure:"KAFKA_USERNAME"`
}
type Lightstep struct {
AccessToken string `mapstructure:"LIGHTSTEP_ACCESS_TOKEN"`
}
type Logger struct {
DisableCaller bool `mapstructure:"LOGGER_DISABLE_CALLER"`
DisableStacktrace bool `mapstructure:"LOGGER_DISABLE_STACKTRACE"`
Encoding string `mapstructure:"LOGGER_ENCODING"`
Level string `mapstructure:"LOGGER_LEVEL"`
}
Logger config
type MongoDB struct {
URI string `mapstructure:"MONGODB_URI"`
User string `mapstructure:"MONGODB_USER"`
Password string `mapstructure:"MONGODB_PASSWORD"`
DB string `mapstructure:"MONGODB_DB"`
MaxPoolSize uint64
MinPoolSize uint64
RetryWrites bool
}
type Postgres struct {
Host string `mapstructure:"POSTGRES_HOST"`
User string `mapstructure:"POSTGRES_USER"`
Password string `mapstructure:"POSTGRES_PASSWORD"`
DB string `mapstructure:"POSTGRES_DB"`
Port uint64 `mapstructure:"POSTGRES_PORT"`
TimeZone *string `mapstructure:"POSTGRES_TIMEZONE"`
}
type Redis struct {
RedisAddr string `mapstructure:"REDIS_ADDR"`
RedisPassword *string `mapstructure:"REDIS_PASSWORD"`
RedisDB string `mapstructure:"REDIS_DB"`
RedisDefaultDB string `mapstructure:"REDIS_DEFAULT_DB"`
MinIdleConn int
PoolSize int
PoolTimeout time.Duration
DB int
}
type Sentry struct {
SentryDSN string `mapstructure:"SENTRY_DSN"`
TracesSampleRate float64 `mapstructure:"SENTRY_TRACES_SAMPLE_RATE"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.