storage

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGormStorage

func InitGormStorage(con *gorm.DB, tablePrefix string) (gwt.StorageInterface, error)

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

func (*RedisStorage) SaveTokens

func (rs *RedisStorage) SaveTokens(
	userId string,
	accessUuid string,
	refreshUuid string,
	accessExpire int64,
	refreshExpire int64,
	accessToken string,
	refreshToken string) error

Jump to

Keyboard shortcuts

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