Documentation
¶
Index ¶
- func GenerateSid(id *int64, key string) string
- func GenerateToken(id int64, expire int, signKey []byte) (string, error)
- type AnyParam
- type Claims
- type Ctx
- func (m *Ctx) AnyParams(p string) (ap *AnyParam)
- func (m *Ctx) Error(err string) error
- func (m *Ctx) File(p string) *multipart.FileHeader
- func (m *Ctx) Header(p string) string
- func (m *Ctx) Params(p string) string
- func (m *Ctx) Redirect(uri string)
- func (m *Ctx) RenderJson(data any) *Msg
- func (m *Ctx) SetHeader(k, v string)
- func (m *Ctx) SetStatusCode(c int)
- func (m *Ctx) Success(msg string) error
- func (m *Ctx) WithCtx(ctx *fasthttp.RequestCtx) *Ctx
- type IMember
- type JwtController
- type Msg
- type SidController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSid ¶ added in v1.0.17
Types ¶
type Ctx ¶ added in v1.0.17
type Ctx struct {
// contains filtered or unexported fields
}
func (*Ctx) RenderJson ¶ added in v1.0.17
func (*Ctx) SetStatusCode ¶ added in v1.0.17
type JwtController ¶ added in v1.0.17
type JwtController struct { Ctx AuthOk func(id *int64) bool // contains filtered or unexported fields }
func (*JwtController) Auth ¶ added in v1.0.17
func (m *JwtController) Auth(ctx *fasthttp.RequestCtx, name, action string) bool
Auth 所有控制层的鉴权方法 返回 true 表示成功
func (*JwtController) InitJwt ¶ added in v1.0.17
func (m *JwtController) InitJwt(signKey []byte)
func (*JwtController) SetSkipRule ¶ added in v1.0.17
func (m *JwtController) SetSkipRule(r *[][]string)
type Msg ¶
type SidController ¶ added in v1.0.17
type SidController struct { Ctx CheckAuth func(sid *string) bool // contains filtered or unexported fields }
func (*SidController) Auth ¶ added in v1.0.17
func (m *SidController) Auth(ctx *fasthttp.RequestCtx, name, action string) bool
Auth 所有控制层的鉴权方法 返回 true 表示成功
func (*SidController) InitSid ¶ added in v1.0.17
func (m *SidController) InitSid(member IMember)
func (*SidController) SetSkipRule ¶ added in v1.0.17
func (m *SidController) SetSkipRule(r *[][]string)
Click to show internal directories.
Click to hide internal directories.