Documentation ¶
Index ¶
- func NewRedis() (redis.UniversalClient, error)
- type TokenCacheRedis
- func (t *TokenCacheRedis) AddTokenFlag(ctx context.Context, userID string, token string, flag int) error
- func (t *TokenCacheRedis) AddTraceId(ctx context.Context, field, trace string) error
- func (t *TokenCacheRedis) GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error)
- func (t *TokenCacheRedis) GetTraceId(ctx context.Context, field string) (string, error)
- func (t *TokenCacheRedis) SIsMemberTraceId(ctx context.Context, member string) error
- type TokenInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TokenCacheRedis ¶
type TokenCacheRedis struct {
// contains filtered or unexported fields
}
func NewTokenInterface ¶
func NewTokenInterface(rdb redis.UniversalClient) *TokenCacheRedis
func (*TokenCacheRedis) AddTokenFlag ¶
func (*TokenCacheRedis) AddTraceId ¶
func (t *TokenCacheRedis) AddTraceId(ctx context.Context, field, trace string) error
func (*TokenCacheRedis) GetTokensWithoutError ¶
func (*TokenCacheRedis) GetTraceId ¶
func (*TokenCacheRedis) SIsMemberTraceId ¶
func (t *TokenCacheRedis) SIsMemberTraceId(ctx context.Context, member string) error
type TokenInterface ¶
type TokenInterface interface { AddTokenFlag(ctx context.Context, userID string, token string, flag int) error GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error) AddTraceId(ctx context.Context, field, trace string) error GetTraceId(ctx context.Context, member string) (string, error) }
Click to show internal directories.
Click to hide internal directories.