Documentation ¶ Index ¶ func Init(confPath string) error type Config type Context func Instance() *Context Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Init ¶ func Init(confPath string) error Types ¶ type Config ¶ type Config struct { GinMode string `yaml:"gin_mode"` LogPath string `yaml:"log_path"` LogLevel int `yaml:"log_level"` HttpPort int `yaml:"http_port"` Mysql *ginx.GormMysqlConf Redis *ginx.RedisConf } type Context ¶ type Context struct { Config *Config Logger *logger.Logger Gorm *gorm.DB Red *redis.Client } func Instance ¶ func Instance() *Context Source Files ¶ View all Source files context.go Click to show internal directories. Click to hide internal directories.