Documentation ¶
Index ¶
- func InitGormStorage(con *gorm.DB, tablePrefix string) (gwt.StorageInterface, error)
- func InitRedisStorage(client *redis.Client) gwt.StorageInterface
- type RedisStorage
- func (rs *RedisStorage) DeleteAllTokens(userId string) error
- func (rs *RedisStorage) DeleteTokens(userId string, uuid ...string) error
- func (rs *RedisStorage) HasAccessToken(uuid string, token string, userId string) error
- func (rs *RedisStorage) HasRefreshToken(uuid string, token string, userId string) error
- func (rs *RedisStorage) SaveTokens(userId string, accessUuid string, refreshUuid string, accessExpire int64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGormStorage ¶
func InitRedisStorage ¶
func InitRedisStorage(client *redis.Client) gwt.StorageInterface
Types ¶
type RedisStorage ¶
type RedisStorage struct {
// contains filtered or unexported fields
}
func (*RedisStorage) DeleteAllTokens ¶
func (rs *RedisStorage) DeleteAllTokens(userId string) error
func (*RedisStorage) DeleteTokens ¶
func (rs *RedisStorage) DeleteTokens(userId string, uuid ...string) error
func (*RedisStorage) HasAccessToken ¶
func (rs *RedisStorage) HasAccessToken(uuid string, token string, userId string) error
func (*RedisStorage) HasRefreshToken ¶
func (rs *RedisStorage) HasRefreshToken(uuid string, token string, userId string) error
Click to show internal directories.
Click to hide internal directories.