Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICache ¶
type ICache interface { GetBackend() (result *redis.Client, err error) Get(key string) (result string, err error) Set(key string, value string) (result string, err error) SetEx(key string, value string, ttl time.Duration) (result string, err error) Del(key string) (result bool, err error) Exists(key string) (result bool, err error) Incr(key string) (result int64, err error) Decr(key string) (result int64, err error) CreateKey(key string) string }
type IDrawCenter ¶
type IDrawCenter interface { Draw(actionId string, playerId string) (result model_draw.Result, err error) Verify(actionId string, playerId string, giftId string, verify bool) (result model_draw.VerifyResult, err error) GetAction(actionId string) (result model_draw.Action, err error) GetActionGifts(actionId string) (result []model_draw.Gift, err error) GetActionWinners(actionId string) (result []model_draw.Player, err error) GetGift(actionId string, giftId string) (result model_draw.Gift, err error) GetPlayer(actionId string, playerId string) (result model_draw.Player, err error) GetPlayerGifts(actionId string, playerId string) (result []model_draw.Gift, err error) }
type IJwtService ¶
type IJwtService interface { // CreateToken 生成Token,默认存入Cookie中 CreateToken(ctx iris.Context, claims interface{}) (token string, err error) // GetClaims 验证Token并返回其中包含的Claims对象指针,需要在Middleware处理后才能获得,如需手动验证,请使用VerifyToken方法,强烈建议使用此方法 GetClaims(ctx iris.Context) (claims interface{}) // VerifyToken 从默认渠道(Cookie)中获取Token信息并验证,验证成功后返回VerifiedToken对象,仅用于手动验证,不建议使用 VerifyToken(ctx iris.Context) (result *jwt.VerifiedToken, err error) // RemoveToken 从Cookie中移除Token信息,一般用于"注销"功能 RemoveToken(ctx iris.Context) // GetMiddleware 获取iris路由中间件,用于验证请求合法性 GetMiddleware() iris.Handler }
type ILruCache ¶
type ILruCache interface { Add(key, value interface{}) (success bool) AddEx(key, value interface{}, expire time.Duration) (success bool) Get(key interface{}) (result interface{}, success bool) Contains(key interface{}) (success bool) Peek(key interface{}) (result interface{}, success bool) ContainsOrAdd(key, value interface{}) (success, evict bool) Remove(key interface{}) RemoveOldest() Keys() (result []interface{}) Len() (result int) Purge() }
type IMsgCenter ¶
type ISessionCache ¶
type ISessionCache interface { Get(ctx iris.Context, key string) (result string, err error) Set(ctx iris.Context, key string, value string, ttl time.Duration) (result string, err error) Del(ctx iris.Context, key string) (result bool, err error) Exists(ctx iris.Context, key string) (result bool, err error) Incr(ctx iris.Context, key string) (result int64, err error) GetCacheKey(ctx iris.Context, key string) string Md5(str string) string }
type ITaskCenter ¶
type IViewModel ¶
Click to show internal directories.
Click to hide internal directories.