Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶
type CORSConfig struct { AllowedOrigins []string `env:"ALLOWED_ORIGINS" env-default:"" env-description:"CORS allowed origins"` AllowedMethods []string `env:"ALLOWED_METHODS" env-default:"" env-description:"CORS allowed method"` AllowedHeaders []string `env:"ALLOWED_HEADERS" env-default:"" env-description:"CORS allowed headers"` ExposedHeaders []string `env:"EXPOSED_HEADERS" env-default:"" env-description:"CORS exposed origins"` AllowCredentials bool `env:"ALLOW_CREDENTIALS" env-default:"false" env-description:"CORS allow credentials"` MaxAge int `env:"MAX_AGE" env-default:"5" env-description:"CORS request cache max age"` }
type Config ¶
type Config struct { Server ServerConfig `env-prefix:"SERVER_"` Log LogConfig `env-prefix:"LOG_"` CORS CORSConfig `env-prefix:"CORS_"` Postgres PostgresConfig `env-prefix:"POSTGRES_"` }
type LogConfig ¶
type LogConfig struct {
Level string `env:"LEVEL" env-required:"" env-description:"log level"`
}
type PostgresConfig ¶
type PostgresConfig struct { Username string `env:"USERNAME" env-required:"" env-description:"postgres username"` Password string `env:"PASSWORD" env-required:"" env-description:"postgres password"` Host string `env:"HOST" env-required:"" env-description:"postgres host"` Port int `env:"PORT" env-required:"" env-description:"postgres port"` Database string `env:"DATABASE" env-required:"" env-description:"postgres database"` SSLMode string `env:"SSL_MODE" env-required:"" env-description:"postgres ssl mode"` PingTimeout time.Duration `env:"PING_TIMEOUT" env-required:"" env-description:"postgres ping timeout"` }
func (PostgresConfig) URI ¶
func (c PostgresConfig) URI() string
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.