Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Gin Gin `mapstructure:"gin" json:"gin" yaml:"gin"` Log Log `mapstructure:"log" json:"log" yaml:"log"` DataBase DataBase `mapstructure:"database" json:"database" yaml:"database"` JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"` Role Role `mapstructure:"role" json:"role" yaml:"role"` }
func InitConfig ¶
type DataBase ¶
type DataBase struct { Driver string `mapstructure:"driver" json:"driver" yaml:"driver"` LogLevel logger.LogLevel `mapstructure:"log_level" json:"log_level" yaml:"log_level"` MySql struct { Source string `mapstructure:"source" json:"source" yaml:"source"` } `mapstructure:"mysql" json:"mysql" yaml:"mysql"` Redis struct { UserName string `mapstructure:"user_name" json:"user_name" yaml:"user_name"` Password string `mapstructure:"password" json:"password" yaml:"password"` Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` DB int `mapstructure:"db" json:"db" yaml:"db"` ReadTimeout time.Duration `mapstructure:"read_timeout" json:"read_timeout" yaml:"read_timeout"` WriteTimeout time.Duration `mapstructure:"write_timeout" json:"write_timeout" yaml:"write_timeout"` } `yaml:"redis"` }
Click to show internal directories.
Click to hide internal directories.