Documentation ¶
Index ¶
- func GetSess[T any](c *gin.Context) func(fn func(sess *xorm.Session) T) T
- func IpEngine() *geoip2.Reader
- func Orm() *xorm.Engine
- func Redis() *rediCache
- func Sess[T any](orm *xorm.Engine, fn func(sess *xorm.Session) T) T
- func Setup(ctx *common.BootContext, r *gin.Engine)
- type Ctx
- func (ctx *Ctx) App() *common.AppModel
- func (ctx *Ctx) DataLog() *dbLog
- func (ctx *Ctx) GetIpInfo() (*geoip2.City, error)
- func (ctx *Ctx) GetToken() *common.UserToken
- func (ctx *Ctx) Ip() string
- func (ctx Ctx) Orm() *xorm.Engine
- func (ctx *Ctx) Page(data any, total int64)
- func (ctx *Ctx) PageInfo() *utils.PageInfo
- func (ctx *Ctx) Pass()
- func (ctx *Ctx) Redis() *rediCache
- func (ctx *Ctx) Route() *common.Route
- func (ctx Ctx) Session() sessions.Session
- func (ctx *Ctx) Stack(value ...any)
- func (ctx *Ctx) Success(data any)
- func (ctx *Ctx) Token() *common.UserToken
- type LogTargetTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogTargetTable ¶
type LogTargetTable int
const (
LogTableNone LogTargetTable = 0 // 没有表
)
func (LogTargetTable) Get ¶
func (s LogTargetTable) Get(c *gin.Context) *dbLog
Click to show internal directories.
Click to hide internal directories.