store

package
v0.5.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisStore

type RedisStore struct {
	// contains filtered or unexported fields
}

func (*RedisStore) Exist

func (rs *RedisStore) Exist(license string) bool

Exist 判断 token 是否存在

func (*RedisStore) Expired

func (rs *RedisStore) Expired(license string) error

Expired 使 token 失效

func (*RedisStore) ExpiredAll

func (rs *RedisStore) ExpiredAll(uType guard.UserType, uid int64) error

func (*RedisStore) GetTokenInfo

func (rs *RedisStore) GetTokenInfo(license string) (*guard.TokenInfo, error)

GetTokenInfo 通过 token 获取 token 详情

func (*RedisStore) GetUserTokens

func (rs *RedisStore) GetUserTokens(uType guard.UserType, uid int64) ([]string, error)

GetUserTokens 通过用户类型及用户的 uid 获取用户的 token 列表

func (*RedisStore) Provide

func (rs *RedisStore) Provide(ctx context.Context) interface{}

func (*RedisStore) Save

func (rs *RedisStore) Save(license string, tokenInfo *guard.TokenInfo) error

Save 保存用户的 token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL