Documentation ¶
Index ¶
- Variables
- type Api
- type ApiBase
- func (api *ApiBase) Error(msg string, err error) z.Map
- func (api *ApiBase) ErrorResult(msg string, error error, r *ghttp.Request) error
- func (api *ApiBase) GetToken(r *ghttp.Request) string
- func (api *ApiBase) Ok(data interface{}) z.Map
- func (api *ApiBase) OkResult(data interface{}, r *ghttp.Request) error
- func (api *ApiBase) Result(data interface{}, err error, r *ghttp.Request) error
- func (api *ApiBase) Result2(result *z.Result, r *ghttp.Request) error
- type RedisService
- func (rs *RedisService) GetData(key string, result interface{}, duration time.Duration, ...) (err error)
- func (rs *RedisService) GetRidesData(key string, v interface{}) error
- func (rs *RedisService) Publish(channel string, data interface{})
- func (rs *RedisService) SetRedisData(key string, v interface{}, duration time.Duration)
- func (rs *RedisService) Subscribe(channel string, receiver func(channel string, msg interface{}))
Constants ¶
This section is empty.
Variables ¶
View Source
var NilFound = errors.New("defaultFun未返回数据")
Functions ¶
This section is empty.
Types ¶
type RedisService ¶ added in v1.9.0
func (*RedisService) GetData ¶ added in v1.9.0
func (rs *RedisService) GetData(key string, result interface{}, duration time.Duration, defaultFun func() interface{}) (err error)
func (*RedisService) GetRidesData ¶ added in v1.9.0
func (rs *RedisService) GetRidesData(key string, v interface{}) error
func (*RedisService) Publish ¶ added in v1.9.0
func (rs *RedisService) Publish(channel string, data interface{})
func (*RedisService) SetRedisData ¶ added in v1.9.0
func (rs *RedisService) SetRedisData(key string, v interface{}, duration time.Duration)
func (*RedisService) Subscribe ¶ added in v1.9.0
func (rs *RedisService) Subscribe(channel string, receiver func(channel string, msg interface{}))
Click to show internal directories.
Click to hide internal directories.