Documentation ¶
Index ¶
Constants ¶
View Source
const (
AuthBearer = "Bearer "
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InjectorFunc ¶
type InjectorFunc func(ctx *gin.Context, ls *LoginStatus) (err error)
type LoginStatus ¶
type LoginStatus struct { Token string Err error Role Role State State // contains filtered or unexported fields }
LoginStatus
func (*LoginStatus) GetID ¶
func (ls *LoginStatus) GetID(idname string) uint
func (*LoginStatus) SetID ¶
func (ls *LoginStatus) SetID(idname string, id uint)
type LoginWay ¶
type LoginWay uint8 // 登录方式
const ( LoginWayUnknown LoginWay = 0 // LoginWayEmail 邮箱+密码 LoginWayEmail LoginWay = 1 // LoginWayPhone 手机号+验证码 LoginWayPhone LoginWay = 2 // LoginWayWxWeb 微信网页端 LoginWayWxWeb LoginWay = 3 // LoginWayWxMp 微信公众号 LoginWayWxMp LoginWay = 4 // LoginWayWxMini 微信小程序 LoginWayWxMini LoginWay = 5 // LoginWayGithub github LoginWayGithub LoginWay = 6 // LoginWayWorkWechat 企业微信 LoginWayWorkWechat LoginWay = 7 )
Click to show internal directories.
Click to hide internal directories.