Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 6 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) Delete

func (c *Cache) Delete(key string)

func (*Cache) Get

func (c *Cache) Get(key string) interface{}

func (*Cache) GetAndParse

func (c *Cache) GetAndParse(key string, entityPointer interface{}) error

func (*Cache) GetString

func (c *Cache) GetString(key string) (result string, err error)

func (*Cache) Set

func (c *Cache) Set(key string, value interface{}, duration time.Duration)

type ICache

type ICache interface {
	Get(key string) interface{}
	GetAndParse(key string, entityPointer interface{}) error
	GetString(key string) (result string, err error)
	Delete(key string)
	Set(key string, value interface{}, duration time.Duration)
}

func NewCache

func NewCache() ICache

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Delete

func (m *Mock) Delete(_ string)

func (*Mock) Get

func (m *Mock) Get(_ string) interface{}

func (*Mock) GetAndParse

func (m *Mock) GetAndParse(_ string, _ interface{}) error

func (*Mock) GetString

func (m *Mock) GetString(_ string) (result string, err error)

func (*Mock) Set

func (m *Mock) Set(_ string, _ interface{}, _ time.Duration)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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