Documentation ¶
Index ¶
- Constants
- type RedisToken
- func (r *RedisToken) AppKey(appKey string) *RedisToken
- func (r *RedisToken) Code(code int) *RedisToken
- func (r *RedisToken) Expires(expires time.Duration) *RedisToken
- func (r *RedisToken) Fields() []*flygo.Field
- func (r *RedisToken) Key(key string) *RedisToken
- func (r *RedisToken) Length(length int) *RedisToken
- func (r *RedisToken) Method() string
- func (r *RedisToken) Msg(msg string) *RedisToken
- func (*RedisToken) Name() string
- func (r *RedisToken) Options(options *redis.Options) *RedisToken
- func (r *RedisToken) Pattern() string
- func (r *RedisToken) Process() flygo.Handler
Constants ¶
View Source
const ( //The redis key prefix RedisKey = "auth:authorization" //The redis apps key prefix RedisAppsKey = "auth:apps" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisToken ¶
type RedisToken struct {
// contains filtered or unexported fields
}
Define RedisToken struct
func (*RedisToken) AppKey ¶
func (r *RedisToken) AppKey(appKey string) *RedisToken
Set app key prefix for redis
func (*RedisToken) Code ¶
func (r *RedisToken) Code(code int) *RedisToken
Set return code when unauthorized
func (*RedisToken) Expires ¶
func (r *RedisToken) Expires(expires time.Duration) *RedisToken
Set expires
func (*RedisToken) Msg ¶
func (r *RedisToken) Msg(msg string) *RedisToken
Set return msg when unauthorized
func (*RedisToken) Options ¶
func (r *RedisToken) Options(options *redis.Options) *RedisToken
Set redis options
Click to show internal directories.
Click to hide internal directories.