Documentation
¶
Overview ¶
Package ctxext zero ctx 扩展
Index ¶
- Variables
- func ApplyLimit(ctx *zero.Ctx, m *rate.LimiterManager) *rate.Limiter
- func CardOrNickName(ctx *zero.Ctx, uid int64) (name string)
- func CmdMatch(ctx *zero.Ctx) bool
- func Exists(ctx *zero.Ctx) bool
- func Limit(ctx *zero.Ctx) *rate.Limiter
- func MustGiven(ctx *zero.Ctx) bool
- func NickName(ctx *zero.Ctx) (name string)
- func UserOrGrpAdmin(ctx *zero.Ctx) bool
- type NoCtxGetMsg
- type NoCtxSendMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSingle = single.New( single.WithKeyFn(func(ctx *zero.Ctx) interface{} { return ctx.Event.UserID }), single.WithPostFn(func(ctx *zero.Ctx) { ctx.Send("您有操作正在执行,请稍后再试!") }), )
DefaultSingle 默认反并发处理
按 qq 号反并发 并发时返回 "您有操作正在执行,请稍后再试!"
Functions ¶
func CardOrNickName ¶
CardOrNickName 从 uid 获取名字
func UserOrGrpAdmin ¶ added in v1.2.4
UserOrGrpAdmin 允许用户单独使用或群管使用
Types ¶
type NoCtxGetMsg ¶ added in v1.2.5
func GetMessage ¶ added in v1.2.5
func GetMessage(ctx *zero.Ctx) NoCtxGetMsg
type NoCtxSendMsg ¶ added in v1.2.5
type NoCtxSendMsg = func(interface{}) int64
func Send ¶ added in v1.2.5
func Send(ctx *zero.Ctx) NoCtxSendMsg
func SendToSelf ¶ added in v1.2.5
func SendToSelf(ctx *zero.Ctx) NoCtxSendMsg
Click to show internal directories.
Click to hide internal directories.