cache

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 8 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 (*Cache) Del

func (c *Cache) Del(key string) error

func (*Cache) Exists

func (c *Cache) Exists(key string) bool

func (*Cache) Get

func (c *Cache) Get(key string) (*cache.Cache, error)

func (*Cache) Set

func (c *Cache) Set(entity *cache.Cache, expiration time.Duration) error

type Interface

type Interface interface {
	Get(key string) (*cache.Cache, error)
	Exists(key string) bool
	Set(entity *cache.Cache, expiration time.Duration) error
	Del(key string) error
}

func NewCacheRepository

func NewCacheRepository(databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) Interface

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Del

func (m *Mock) Del(_ string) error

func (*Mock) Exists

func (m *Mock) Exists(_ string) bool

func (*Mock) Get

func (m *Mock) Get(_ string) (*cache.Cache, error)

func (*Mock) Set

func (m *Mock) Set(_ *cache.Cache, _ time.Duration) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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