Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Validator = validator.New()
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ServerConf *ServerConfig `toml:"server"` PgConfig *PostgresConfig `toml:"database"` S3 *S3 `toml:"s3"` }
func ParseAndValidate ¶
type PostgresConfig ¶
type PostgresConfig struct { Host string `toml:"host" validate:"required,hostname_port"` UserName string `toml:"user_name" validate:"required"` DBName string `toml:"db_name" validate:"required"` Password string `toml:"password" validate:"required"` }
func (*PostgresConfig) DSN ¶
func (cfg *PostgresConfig) DSN() string
type ServerConfig ¶
type ServerConfig struct {
Addr string `toml:"addr" validate:"required,hostname_port"`
}
Click to show internal directories.
Click to hide internal directories.