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 ¶
Cache is an autogenerated mock type for the Cache type
func NewCache ¶
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) Remember ¶
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 ¶
RememberForever provides a mock function with given fields: key, callback
type Driver ¶
Driver is an autogenerated mock type for the Driver type
func NewDriver ¶
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) Remember ¶
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 ¶
RememberForever provides a mock function with given fields: key, callback
type Lock ¶
Lock is an autogenerated mock type for the Lock type
func NewLock ¶
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 ¶
ForceRelease provides a mock function with given fields: