cache

package
v0.0.0-...-716047f Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: BSD-2-Clause Imports: 5 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) *Cache

NewCache returns implementation of cache layer

func (*Cache) AuthKey

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

func (*Cache) PathPermission

func (c *Cache) PathPermission(id int) (models.PathPermission, error)

func (*Cache) PathPermissionIDs

func (c *Cache) PathPermissionIDs(accessKey string) ([]int, error)

func (*Cache) RefreshPathPermissions

func (c *Cache) RefreshPathPermissions(perms []models.PathPermission) error

func (*Cache) SetAuthKey

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

func (*Cache) SetPathPermissionIDs

func (c *Cache) SetPathPermissionIDs(accessKey string, permIDs []int) error

Jump to

Keyboard shortcuts

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