Documentation
¶
Index ¶
- type TokenCacheRedis
- func (t *TokenCacheRedis) AddTokenFlag(ctx context.Context, userID string, token string, flag int) error
- func (t *TokenCacheRedis) AddTokenFlagNXEx(ctx context.Context, userID string, token string, flag int, ...) (bool, error)
- func (t *TokenCacheRedis) DeleteTokenByUid(ctx context.Context, userID string) error
- func (t *TokenCacheRedis) GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error)
- type TokenInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenCacheRedis ¶
type TokenCacheRedis struct {
// contains filtered or unexported fields
}
func NewTokenInterface ¶
func NewTokenInterface(rdb redis.UniversalClient) *TokenCacheRedis
func (*TokenCacheRedis) AddTokenFlag ¶
func (*TokenCacheRedis) AddTokenFlagNXEx ¶ added in v1.8.1
func (*TokenCacheRedis) DeleteTokenByUid ¶ added in v1.8.0
func (t *TokenCacheRedis) DeleteTokenByUid(ctx context.Context, userID string) error
func (*TokenCacheRedis) GetTokensWithoutError ¶
type TokenInterface ¶
type TokenInterface interface {
AddTokenFlag(ctx context.Context, userID string, token string, flag int) error
AddTokenFlagNXEx(ctx context.Context, userID string, token string, flag int, expire time.Duration) (bool, error)
GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error)
DeleteTokenByUid(ctx context.Context, userID string) error
}
Click to show internal directories.
Click to hide internal directories.