Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Name string `env-required:"true" yaml:"name" json:"name,omitempty" env:"APP_NAME"`
}
type Log ¶
type Log struct { Format string `yaml:"format" json:"format,omitempty" env:"LOG_FORMAT" env-default:"text"` Level string `yaml:"level" json:"level,omitempty" env:"LOG_LEVEL" env-default:"info"` // Log file File string `yaml:"file" json:"file,omitempty" env:"LOG_FILE"` MaxSize int `yaml:"max_size" json:"max_size,omitempty" env:"LOG_MAX_SIZE" env-default:"100"` // MB MaxBackups int `yaml:"max_backups" json:"max_backups,omitempty" env:"LOG_MAX_BACKUPS" env-default:"5"` MaxAge int `yaml:"max_age" json:"max_age,omitempty" env:"LOG_MAX_AGE" env-default:"28"` // days }
type Postgres ¶
type Postgres struct { Host string `yaml:"host" json:"host,omitempty" env:"POSTGRES_HOST" env-default:"localhost"` Port int `yaml:"port" json:"port,omitempty" env:"POSTGRES_PORT" env-default:"5432"` User string `yaml:"user" json:"user,omitempty" env:"POSTGRES_USER" env-default:"postgres"` Password string `yaml:"password" json:"password,omitempty" env:"POSTGRES_PASSWORD" env-default:"postgres"` Database string `yaml:"database" json:"database,omitempty" env:"POSTGRES_DB" env-default:"postgres"` SSLMode string `yaml:"ssl_mode" json:"ssl_mode,omitempty" env:"POSTGRES_SSL_MODE" env-default:"disable"` Migrate bool `yaml:"migrate" json:"migrate,omitempty" env:"POSTGRES_MIGRATE" env-default:"true"` MaxConns int32 `yaml:"max_conns" json:"max_conns,omitempty" env:"POSTGRES_MAX_CONNS" env-default:"10"` MinConns int32 `yaml:"min_conns" json:"min_conns,omitempty" env:"POSTGRES_MIN_CONNS" env-default:"1"` MaxConnIdleTime string `yaml:"max_conn_idle_time" json:"max_conn_idle_time,omitempty" env:"POSTGRES_MAX_CONN_IDLE_TIME" env-default:"5m"` MaxConnLifetime string `yaml:"max_conn_lifetime" json:"max_conn_lifetime,omitempty" env:"POSTGRES_MAX_CONN_LIFETIME" env-default:"5m"` ConnTimeout string `yaml:"conn_timeout" json:"conn_timeout,omitempty" env:"POSTGRES_CONN_TIMEOUT" env-default:"15s"` }
Click to show internal directories.
Click to hide internal directories.