Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvConfPath ¶
func GetEnvConfPath() string
GetEnvConfPath returns toml file path from environment variable `$GO-BOOK_CONF`
Types ¶
type Logger ¶
type Logger struct { Service string `toml:"service" validate:"required"` Env string `toml:"env" validate:"oneof=dev prod custom"` Level string `toml:"level" validate:"required"` IsStackTrace bool `toml:"is_stacktrace"` }
Logger is zap logger property
type MySQL ¶
type MySQL struct { IsEnabled bool `toml:"is_enabled"` Host string `toml:"host"` Port uint16 `toml:"port"` DBName string `toml:"dbname"` User string `toml:"user"` Pass string `toml:"pass"` IsDebugLog bool `toml:"is_debug_log"` }
MySQL is MySQL Server property
type Root ¶
type Root struct { Server *Server `toml:"server" validate:"required"` Logger *Logger `toml:"logger" validate:"required"` MySQL *MySQL `toml:"mysql"` }
Root is root config
type Server ¶
type Server struct { Port int `toml:"port" validate:"required"` HTTPMethod httpmethod.HTTPMethod `toml:"http_method" validate:"oneof=GET POST"` }
Server is server information
Click to show internal directories.
Click to hide internal directories.