cache

package
v0.0.0-...-1bcb742 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(redis *redis.Redis, accessDuration, refreshDuration time.Duration) *Cache

func (*Cache) CheckAccessToken

func (c *Cache) CheckAccessToken(ctx context.Context, userID, token string) (bool, error)

func (*Cache) CheckRefreshToken

func (c *Cache) CheckRefreshToken(ctx context.Context, userID, token string) (bool, error)

func (*Cache) RemoveAccessToken

func (c *Cache) RemoveAccessToken(ctx context.Context, userID, token string) error

func (*Cache) RemoveRefreshToken

func (c *Cache) RemoveRefreshToken(ctx context.Context, userID, token string) error

func (*Cache) SetAccessToken

func (c *Cache) SetAccessToken(ctx context.Context, userID, token string) error

func (*Cache) SetRefreshToken

func (c *Cache) SetRefreshToken(ctx context.Context, userID, token string) error

Jump to

Keyboard shortcuts

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