Documentation ¶
Index ¶
- func Fatal(msg string, logger *zap.Logger)
- func HexOrBase64(value string) ([]byte, error)
- func ListenFlags(flags *pflag.FlagSet)
- func Logger() *zap.Logger
- func MySQLBindFlagsToEnv(flags *pflag.FlagSet) error
- func MySQLEnvDefaults() map[string]interface{}
- func MySQLEnvToCli() map[string]string
- func MySQLFlags(flags *pflag.FlagSet)
- func MySQLRegisterDefaults()
- func MySQLValidate(config MySQLConfigCommon) error
- func StdinPassword(prompt string, logger *zap.Logger) string
- func ValidateConfig(config interface{}, logger *zap.Logger)
- type MySQLConfigCommon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HexOrBase64 ¶
HexOrBase64 Decodes the input string as either base-64 or hexadecimal.
func ListenFlags ¶
func MySQLBindFlagsToEnv ¶
func MySQLEnvDefaults ¶
func MySQLEnvDefaults() map[string]interface{}
func MySQLEnvToCli ¶
func MySQLFlags ¶
func MySQLRegisterDefaults ¶
func MySQLRegisterDefaults()
func MySQLValidate ¶
func MySQLValidate(config MySQLConfigCommon) error
func StdinPassword ¶
StdinPassword Read a password from standard input, fatally exiting if a problem is encountered.
func ValidateConfig ¶
Types ¶
type MySQLConfigCommon ¶
type MySQLConfigCommon struct { MySQLHost string `mapstructure:"mysql_host" govalid:"req" validate:"required,hostname|ip"` MySQLPort uint16 `mapstructure:"mysql_port" govalid:"req" validate:"required,gt=0"` MySQLDatabase string `mapstructure:"mysql_database" govalid:"req" validate:"required"` MySQLUser string `mapstructure:"mysql_user" govalid:"req" validate:"required"` MySQLPassword string `mapstructure:"mysql_password" govalid:"req" validate:"required"` }
func (MySQLConfigCommon) Database ¶
func (m MySQLConfigCommon) Database() string
func (MySQLConfigCommon) Host ¶
func (m MySQLConfigCommon) Host() string
func (MySQLConfigCommon) Password ¶
func (m MySQLConfigCommon) Password() string
func (MySQLConfigCommon) Port ¶
func (m MySQLConfigCommon) Port() uint16
func (MySQLConfigCommon) User ¶
func (m MySQLConfigCommon) User() string
Click to show internal directories.
Click to hide internal directories.