cache

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 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(key string) error

func (*Mock) Exists

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

func (*Mock) Get

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

func (*Mock) Set

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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