Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICache ¶
type APICache struct { Dir string `json:"dir" yaml:"dir" mapstructure:"dir"` FileName string `json:"file_name" yaml:"file_name" mapstructure:"file_name"` }
func NewDefaultAPICacheConf ¶
func NewDefaultAPICacheConf() *APICache
type Config ¶
type Config struct { Debug bool `json:"debug" yaml:"debug" mapstructure:"debug"` MysqlOptions *MysqlOptions `json:"mysql" yaml:"mysql" mapstructure:"mysql"` APICacheConf *APICache `json:"api_cache_conf" yaml:"api_cache_conf" mapstructure:"api_cache_conf"` }
func TryLoadConfig ¶
type MysqlOptions ¶
type MysqlOptions struct { // mysql host Host string `json:"host" yaml:"host" mapstructure:"host"` // mysql port Port int `json:"port" yaml:"port" mapstructure:"port"` // mysql user User string `json:"user" yaml:"user" mapstructure:"user"` // mysql password Password string `json:"password" yaml:"password" mapstructure:"password"` // mysql database Database string `json:"database" yaml:"database" mapstructure:"database"` }
func NewDefaultMysqlOption ¶
func NewDefaultMysqlOption() *MysqlOptions
func (*MysqlOptions) AddFlags ¶
func (m *MysqlOptions) AddFlags(fs *pflag.FlagSet)
Click to show internal directories.
Click to hide internal directories.