Documentation ¶
Index ¶
- type Cache
- func (_m *Cache) Add(key string, value interface{}, t time.Duration) bool
- func (_m *Cache) Decrement(key string, value ...int) (int, error)
- func (_m *Cache) Flush() bool
- func (_m *Cache) Forever(key string, value interface{}) bool
- func (_m *Cache) Forget(key string) bool
- func (_m *Cache) Get(key string, def ...interface{}) interface{}
- func (_m *Cache) GetBool(key string, def ...bool) bool
- func (_m *Cache) GetInt(key string, def ...int) int
- func (_m *Cache) GetInt64(key string, def ...int64) int64
- func (_m *Cache) GetString(key string, def ...string) string
- func (_m *Cache) Has(key string) bool
- func (_m *Cache) Increment(key string, value ...int) (int, error)
- func (_m *Cache) Lock(key string, t ...time.Duration) cache.Lock
- func (_m *Cache) Pull(key string, def ...interface{}) interface{}
- func (_m *Cache) Put(key string, value interface{}, t time.Duration) error
- func (_m *Cache) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error)
- func (_m *Cache) RememberForever(key string, callback func() interface{}) (interface{}, error)
- func (_m *Cache) Store(name string) cache.Driver
- func (_m *Cache) WithContext(ctx context.Context) cache.Driver
- type Driver
- func (_m *Driver) Add(key string, value interface{}, t time.Duration) bool
- func (_m *Driver) Decrement(key string, value ...int) (int, error)
- func (_m *Driver) Flush() bool
- func (_m *Driver) Forever(key string, value interface{}) bool
- func (_m *Driver) Forget(key string) bool
- func (_m *Driver) Get(key string, def ...interface{}) interface{}
- func (_m *Driver) GetBool(key string, def ...bool) bool
- func (_m *Driver) GetInt(key string, def ...int) int
- func (_m *Driver) GetInt64(key string, def ...int64) int64
- func (_m *Driver) GetString(key string, def ...string) string
- func (_m *Driver) Has(key string) bool
- func (_m *Driver) Increment(key string, value ...int) (int, error)
- func (_m *Driver) Lock(key string, t ...time.Duration) cache.Lock
- func (_m *Driver) Pull(key string, def ...interface{}) interface{}
- func (_m *Driver) Put(key string, value interface{}, t time.Duration) error
- func (_m *Driver) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error)
- func (_m *Driver) RememberForever(key string, callback func() interface{}) (interface{}, error)
- func (_m *Driver) WithContext(ctx context.Context) cache.Driver
- type Lock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶ added in v1.11.0
Cache is an autogenerated mock type for the Cache type
func NewCache ¶ added in v1.11.0
func NewCache(t mockConstructorTestingTNewCache) *Cache
NewCache creates a new instance of Cache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Cache) Decrement ¶ added in v1.11.0
Decrement provides a mock function with given fields: key, value
func (*Cache) Forever ¶ added in v1.11.0
Forever provides a mock function with given fields: key, value
func (*Cache) GetBool ¶ added in v1.11.0
GetBool provides a mock function with given fields: key, def
func (*Cache) GetInt64 ¶ added in v1.11.0
GetInt64 provides a mock function with given fields: key, def
func (*Cache) GetString ¶ added in v1.11.0
GetString provides a mock function with given fields: key, def
func (*Cache) Increment ¶ added in v1.11.0
Increment provides a mock function with given fields: key, value
func (*Cache) Remember ¶ added in v1.11.0
func (_m *Cache) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error)
Remember provides a mock function with given fields: key, ttl, callback
func (*Cache) RememberForever ¶ added in v1.11.0
RememberForever provides a mock function with given fields: key, callback
type Driver ¶ added in v1.11.0
Driver is an autogenerated mock type for the Driver type
func NewDriver ¶ added in v1.11.0
func NewDriver(t mockConstructorTestingTNewDriver) *Driver
NewDriver creates a new instance of Driver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Driver) Decrement ¶ added in v1.11.0
Decrement provides a mock function with given fields: key, value
func (*Driver) Forever ¶ added in v1.11.0
Forever provides a mock function with given fields: key, value
func (*Driver) GetBool ¶ added in v1.11.0
GetBool provides a mock function with given fields: key, def
func (*Driver) GetInt ¶ added in v1.11.0
GetInt provides a mock function with given fields: key, def
func (*Driver) GetInt64 ¶ added in v1.11.0
GetInt64 provides a mock function with given fields: key, def
func (*Driver) GetString ¶ added in v1.11.0
GetString provides a mock function with given fields: key, def
func (*Driver) Increment ¶ added in v1.11.0
Increment provides a mock function with given fields: key, value
func (*Driver) Remember ¶ added in v1.11.0
func (_m *Driver) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error)
Remember provides a mock function with given fields: key, ttl, callback
func (*Driver) RememberForever ¶ added in v1.11.0
RememberForever provides a mock function with given fields: key, callback
type Lock ¶ added in v1.11.0
Lock is an autogenerated mock type for the Lock type
func NewLock ¶ added in v1.11.0
func NewLock(t mockConstructorTestingTNewLock) *Lock
NewLock creates a new instance of Lock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Lock) ForceRelease ¶ added in v1.11.0
ForceRelease provides a mock function with given fields: