cache

package
v0.0.0-...-40c8b04 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("Not found")
	ErrExists   = errors.New("Error exists")
)

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(pool *memdb.Pool, secretKey string) *Cache

NewCache returns implementation of cache layer

func (*Cache) AuthKey

func (c *Cache) AuthKey(userID, keyID string) (models.AuthKey, error)

func (*Cache) DeleteAuthKey

func (c *Cache) DeleteAuthKey(userID, keyID string) error

func (*Cache) SetAuthKey

func (c *Cache) SetAuthKey(authKey models.AuthKey, ttl int) error

type TestSuite

type TestSuite struct {
	suite.Suite
	Pool *redis.Pool
	Conn redis.Conn
}

func (*TestSuite) ClearKeys

func (s *TestSuite) ClearKeys(keys ...string)

func (*TestSuite) SetupSuite

func (s *TestSuite) SetupSuite()

func (*TestSuite) TearDownSuite

func (s *TestSuite) TearDownSuite()

Jump to

Keyboard shortcuts

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