Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DBConfig HTTPConfig LoggerConfig SwaggerConfig StorageHandler string `env:"STORAGE_HANDLER_URL" env-default:"http://0.0.0.0:3391"` }
func (Config) ToAppConfig ¶
func (Config) ToDBConfig ¶
func (c Config) ToDBConfig() postgresql.DBConfig
func (Config) ToLoggerConfig ¶
func (c Config) ToLoggerConfig() logger.LoggerConfig
type DBConfig ¶
type DBConfig struct { DBPort string `env:"DB_PORT" env-required:"true"` DBHost string `env:"DB_HOST" env-required:"true"` DBName string `env:"DB_NAME" env-required:"true"` DBPassword string `env:"DB_PASSWORD" env-required:"true"` DBUsername string `env:"DB_USERNAME" env-required:"true"` MaxConnectionAttempts int `env:"MAX_ATTEMPTS" env-default:"10"` AutoMigrate bool `env:"AUTO_MIGRATE" env-default:"true"` MigrationsDir string `env:"MIGRATIONS_DIR" env-default:"migrations"` }
type HTTPConfig ¶
type HTTPConfig struct { Port string `env:"PORT" env-required:"true"` Host string `env:"HOST" env-required:"true"` ReadTimeoutSeconds int `env:"READ_TIMEOUT_SEC" env-default:"0"` WriteTimeoutSeconds int `env:"WRITE_TIMEOUT_SEC" env-default:"0"` GracefulShutdownTimeout uint `env:"GRACEFUL_SHUTDOWN_TIMEOUT_SEC" env-default:"5"` }
type LoggerConfig ¶
type LoggerConfig struct {
IsProduction bool `env:"IS_PRODUCTION" env-default:"true"`
}
type SwaggerConfig ¶
Click to show internal directories.
Click to hide internal directories.