cachemock

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 2 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 {
	mock.Mock
}

Cache is a mock implementation of the cache.Cache interface.

func (*Cache) Close

func (m *Cache) Close() error

Close is a mock implementation of cache.Cache#Close.

func (*Cache) Del

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

Del is a mock implementation of cache.Cache#Del.

func (*Cache) Get

func (m *Cache) Get(key string) (string, error)

Get is a mock implementation of cache.Cache#Get.

func (*Cache) GetBool

func (m *Cache) GetBool(key string) (bool, error)

GetBool is a mock implementation of cache.Cache#GetBool.

func (*Cache) GetInt

func (m *Cache) GetInt(key string) (int64, error)

GetInt is a mock implementation of cache.Cache#GetInt.

func (*Cache) GetJSON

func (m *Cache) GetJSON(key string, result interface{}) error

GetJSON is a mock implementation of cache.Cache#GetJSON.

func (*Cache) Incr

func (m *Cache) Incr(key string) (int64, error)

Incr is a mock implementation of cache.Cache#Incr.

func (*Cache) Prefix

func (m *Cache) Prefix() string

Prefix is a mock implementation of cache.Cache#Prefix.

func (*Cache) Set

func (m *Cache) Set(key string, value string, expiration time.Duration) error

Set is a mock implementation of cache.Cache#Set.

func (*Cache) SetBool

func (m *Cache) SetBool(key string, value bool, expiration time.Duration) error

SetBool is a mock implementation of cache.Cache#SetBool.

func (*Cache) SetInt

func (m *Cache) SetInt(key string, value int64, expiration time.Duration) error

SetInt is a mock implementation of cache.Cache#SetInt.

func (*Cache) SetJSON

func (m *Cache) SetJSON(key string, value interface{}, expiration time.Duration) error

SetJSON is a mock implementation of cache.Cache#SetJSON.

func (*Cache) TTL

func (m *Cache) TTL(key string) (time.Duration, error)

TTL is a mock implementation of cache.Cache#TTL.

Jump to

Keyboard shortcuts

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