Documentation
¶
Overview ¶
Package gxap 内部公共代码
Package gxap 项目内公用工具类
Index ¶
- func CreatePath(dir string) error
- func PathExist(f string) bool
- type Conf
- type Ctx
- func (ctx *Ctx) Close()
- func (ctx *Ctx) GetConfig() Conf
- func (ctx *Ctx) GetDb() *gorm.DB
- func (ctx *Ctx) GetLog() *zap.SugaredLogger
- func (ctx *Ctx) GetRedis() IRed
- func (ctx *Ctx) GetSysPath() SysPath
- func (ctx *Ctx) InitDb()
- func (ctx *Ctx) InitLog()
- func (ctx *Ctx) InitRedis()
- func (ctx *Ctx) InitSysConfig()
- func (ctx *Ctx) LoadConfig(confOut interface{})
- func (ctx *Ctx) LogWriter(name string) io.Writer
- func (ctx *Ctx) RedisClose()
- func (ctx *Ctx) SignalListen(callback func(s os.Signal))
- type ICtx
- type IRed
- type SysPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶
type Conf struct { Profiles string `yaml:"profiles"` Log confLog `yaml:"log"` Db confDb `yaml:"db"` Redis confRedis `yaml:"redis"` }
Conf 配置文件格式
type Ctx ¶
Ctx 环境
func (*Ctx) GetLog ¶ added in v0.0.3
func (ctx *Ctx) GetLog() *zap.SugaredLogger
func (*Ctx) GetSysPath ¶ added in v0.0.3
func (*Ctx) InitSysConfig ¶
func (ctx *Ctx) InitSysConfig()
func (*Ctx) LoadConfig ¶
func (ctx *Ctx) LoadConfig(confOut interface{})
func (*Ctx) SignalListen ¶
Click to show internal directories.
Click to hide internal directories.