Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { App struct { Env Environment `yaml:"env"` PoolSize int `yaml:"pool_size"` Log struct { LogLevel string `yaml:"level"` PrettyPrint bool `yaml:"pretty_print"` SentryDSN string `yaml:"sentry_dsn"` SentryLogLevels []string `yaml:"sentry_log_levels"` } `yaml:"log"` } `yaml:"app"` API struct { ServeAddress string `yaml:"address"` AccessToken string `yaml:"access_token"` } `yaml:"api"` Monitoring struct { IsEnabled bool `yaml:"enable"` Path string `yaml:"path"` Password string `yaml:"password"` } `yaml:"monitoring"` Notifier struct { Squadcast struct { IsEnabled bool `yaml:"enable"` Teams map[string]string } `yaml:"squadcast"` Telegram struct { IsEnabled bool `yaml:"enable"` Host string `yaml:"host"` Token string `yaml:"token"` Teams map[string][]TelegramTeam `yaml:"teams"` } `yaml:"telegram"` Slack struct { IsEnabled bool `yaml:"enable"` Teams map[string]string } `yaml:"slack"` Custom struct { IsEnabled bool `yaml:"enable"` Teams map[string]string } `yaml:"custom"` } Version string }
Config is the struct that holds all the configuration of the application
type Environment ¶
type Environment string
Environment is a type for application environment
const ( // Testing is the environment for testing Testing Environment = "testing" // Production is the environment for production Production Environment = "production" // Staging is the environment for staging Staging Environment = "staging" // Local is the environment for local Local Environment = "local" )
func (Environment) IsLocal ¶
func (e Environment) IsLocal() bool
IsLocal returns true if the environment is local
func (Environment) IsProduction ¶
func (e Environment) IsProduction() bool
IsProduction returns true if the environment is production
func (Environment) IsStaging ¶
func (e Environment) IsStaging() bool
IsStaging returns true if the environment is staging
func (Environment) IsTesting ¶
func (e Environment) IsTesting() bool
IsTesting returns true if the environment is testing
type TelegramTeam ¶
TelegramTeam is a struct for Telegram team configuration
Click to show internal directories.
Click to hide internal directories.