Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterConfigFlags ¶ added in v1.3.0
Types ¶
type Config ¶
type Config struct {
App string `koanf:"-"`
LogLevel string `koanf:"log-level" validate:"ValidateLogLevel"`
LogFormat string `koanf:"log-format" validate:"in:console,json"`
URL string `koanf:"url"`
ApiKey string `koanf:"api-key"`
ApiKeyFile string `koanf:"api-key-file"`
Port int `koanf:"port" validate:"required"`
Interface string `koanf:"interface" validate:"required|ip"`
DisableSSLVerify bool `koanf:"disable-ssl-verify"`
// contains filtered or unexported fields
}
func (Config) Translates ¶
func (Config) ValidateLogLevel ¶
ValidateLogLevel validates that the log level is one of the valid log levels gookit/Validate is pretty opinionated, and requires that this is not a pointer method.
Click to show internal directories.
Click to hide internal directories.