1 Star 1 Fork 0

linngc / center.gf

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
middleware_context.go 746 Bytes
Copy Edit Raw Blame History
linngc authored 2023-07-26 20:08 . build
// Package middleware
// @Link https://gitee.com/linngc/webos.gf
// @Copyright Copyright (c) 2022 webos CLI
// @Author linngc
// @License
package middleware
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
// Context 请求上下文结构
type Context struct {
Session *ghttp.Session // 当前Session管理对象
SysUser *ContextSysUser // 上下文用户信息
Data g.Map // 自定KV变量,业务模块根据需要设置,不固定
}
// ContextSysUser 请求上下文中的用户信息
type ContextSysUser struct {
Id int // 用户ID
Userid int // 用户账号
NickName string // 用户名称
AvatarPic string // 用户头像
IsAdmin bool // 是否是管理员
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/linngc/center.gf.git
git@gitee.com:linngc/center.gf.git
linngc
center.gf
center.gf
v0.2.12

Search

344bd9b3 5694891 D2dac590 5694891