uses

package
v1.0.58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSess

func GetSess[T any](c *gin.Context) func(fn func(sess *xorm.Session) T) T

func IpEngine added in v1.0.57

func IpEngine() *geoip2.Reader

func Orm added in v1.0.54

func Orm() *xorm.Engine

func Redis added in v1.0.54

func Redis() *rediCache

func Sess

func Sess[T any](orm *xorm.Engine, fn func(sess *xorm.Session) T) T

func Setup

func Setup(ctx *common.BootContext, r *gin.Engine)

Types

type Ctx

type Ctx struct {
	// contains filtered or unexported fields
}

func GetCtx

func GetCtx(c *gin.Context) *Ctx

func (*Ctx) App

func (ctx *Ctx) App() *common.AppModel

func (*Ctx) DataLog

func (ctx *Ctx) DataLog() *dbLog

func (*Ctx) GetIpInfo added in v1.0.57

func (ctx *Ctx) GetIpInfo() (*geoip2.City, error)

func (*Ctx) GetToken added in v1.0.15

func (ctx *Ctx) GetToken() *common.UserToken

func (*Ctx) Ip added in v1.0.57

func (ctx *Ctx) Ip() string

func (Ctx) Orm

func (ctx Ctx) Orm() *xorm.Engine

func (*Ctx) Page added in v1.0.23

func (ctx *Ctx) Page(data any, total int64)

func (*Ctx) PageInfo

func (ctx *Ctx) PageInfo() *utils.PageInfo

func (*Ctx) Pass

func (ctx *Ctx) Pass()

func (*Ctx) Redis

func (ctx *Ctx) Redis() *rediCache

func (*Ctx) Route

func (ctx *Ctx) Route() *common.Route

func (Ctx) Session

func (ctx Ctx) Session() sessions.Session

mixed

func (*Ctx) Stack

func (ctx *Ctx) Stack(value ...any)

func (*Ctx) Success

func (ctx *Ctx) Success(data any)

func (*Ctx) Token

func (ctx *Ctx) Token() *common.UserToken

type LogTargetTable

type LogTargetTable int
const (
	LogTableNone LogTargetTable = 0 // 没有表
)

func (LogTargetTable) Get

func (s LogTargetTable) Get(c *gin.Context) *dbLog

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL