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 Console ¶
type Console struct {
Enabled bool `toml:"enabled"`
}
Console is command line notification
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 Notification ¶
type Notification struct { Mode notifier.Mode `toml:"mode" validate:"required"` Console *Console `toml:"console" validate:"-"` Slack *Slack `toml:"slack" validate:"-"` }
Notification is notification method
type Redis ¶
type Redis struct { Encrypted bool `toml:"encrypted"` URL string `toml:"url"` Env string `toml:"env"` }
Redis is redis save
type Root ¶
type Root struct { Interval int `toml:"interval"` Site *Site `toml:"site" validate:"required"` Logger *Logger `toml:"logger" validate:"required"` Save *Save `toml:"save"` Notification *Notification `toml:"notification"` }
Root is root config
type Save ¶
type Save struct { Mode save.Mode `toml:"mode" validate:"oneof=text redis dummy"` Text *Text `toml:"text" validate:"-"` Redis *Redis `toml:"redis" validate:"-"` }
Save is save method
type Site ¶
type Site struct { Type site.SiteType `toml:"type" validate:"oneof=dmm"` URL string `toml:"url" validate:"required"` }
Site is site information
Click to show internal directories.
Click to hide internal directories.