cache

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 4 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 an autogenerated mock type for the Cache type

func NewCache

func NewCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*Cache) Add

func (_m *Cache) Add(key string, value interface{}, t time.Duration) bool

Add provides a mock function with given fields: key, value, t

func (*Cache) Decrement

func (_m *Cache) Decrement(key string, value ...int64) (int64, error)

Decrement provides a mock function with given fields: key, value

func (*Cache) EXPECT

func (_m *Cache) EXPECT() *Cache_Expecter

func (*Cache) Flush

func (_m *Cache) Flush() bool

Flush provides a mock function with given fields:

func (*Cache) Forever

func (_m *Cache) Forever(key string, value interface{}) bool

Forever provides a mock function with given fields: key, value

func (*Cache) Forget

func (_m *Cache) Forget(key string) bool

Forget provides a mock function with given fields: key

func (*Cache) Get

func (_m *Cache) Get(key string, def ...interface{}) interface{}

Get provides a mock function with given fields: key, def

func (*Cache) GetBool

func (_m *Cache) GetBool(key string, def ...bool) bool

GetBool provides a mock function with given fields: key, def

func (*Cache) GetInt

func (_m *Cache) GetInt(key string, def ...int) int

GetInt provides a mock function with given fields: key, def

func (*Cache) GetInt64

func (_m *Cache) GetInt64(key string, def ...int64) int64

GetInt64 provides a mock function with given fields: key, def

func (*Cache) GetString

func (_m *Cache) GetString(key string, def ...string) string

GetString provides a mock function with given fields: key, def

func (*Cache) Has

func (_m *Cache) Has(key string) bool

Has provides a mock function with given fields: key

func (*Cache) Increment

func (_m *Cache) Increment(key string, value ...int64) (int64, error)

Increment provides a mock function with given fields: key, value

func (*Cache) Lock

func (_m *Cache) Lock(key string, t ...time.Duration) cache.Lock

Lock provides a mock function with given fields: key, t

func (*Cache) Pull

func (_m *Cache) Pull(key string, def ...interface{}) interface{}

Pull provides a mock function with given fields: key, def

func (*Cache) Put

func (_m *Cache) Put(key string, value interface{}, t time.Duration) error

Put provides a mock function with given fields: key, value, t

func (*Cache) Remember

func (_m *Cache) Remember(key string, ttl time.Duration, callback func() (interface{}, error)) (interface{}, error)

Remember provides a mock function with given fields: key, ttl, callback

func (*Cache) RememberForever

func (_m *Cache) RememberForever(key string, callback func() (interface{}, error)) (interface{}, error)

RememberForever provides a mock function with given fields: key, callback

func (*Cache) Store

func (_m *Cache) Store(name string) cache.Driver

Store provides a mock function with given fields: name

func (*Cache) WithContext

func (_m *Cache) WithContext(ctx context.Context) cache.Driver

WithContext provides a mock function with given fields: ctx

type Cache_Add_Call

type Cache_Add_Call struct {
	*mock.Call
}

Cache_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'

func (*Cache_Add_Call) Return

func (_c *Cache_Add_Call) Return(_a0 bool) *Cache_Add_Call

func (*Cache_Add_Call) Run

func (_c *Cache_Add_Call) Run(run func(key string, value interface{}, t time.Duration)) *Cache_Add_Call

func (*Cache_Add_Call) RunAndReturn

func (_c *Cache_Add_Call) RunAndReturn(run func(string, interface{}, time.Duration) bool) *Cache_Add_Call

type Cache_Decrement_Call

type Cache_Decrement_Call struct {
	*mock.Call
}

Cache_Decrement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decrement'

func (*Cache_Decrement_Call) Return

func (_c *Cache_Decrement_Call) Return(_a0 int64, _a1 error) *Cache_Decrement_Call

func (*Cache_Decrement_Call) Run

func (_c *Cache_Decrement_Call) Run(run func(key string, value ...int64)) *Cache_Decrement_Call

func (*Cache_Decrement_Call) RunAndReturn

func (_c *Cache_Decrement_Call) RunAndReturn(run func(string, ...int64) (int64, error)) *Cache_Decrement_Call

type Cache_Expecter

type Cache_Expecter struct {
	// contains filtered or unexported fields
}

func (*Cache_Expecter) Add

func (_e *Cache_Expecter) Add(key interface{}, value interface{}, t interface{}) *Cache_Add_Call

Add is a helper method to define mock.On call

  • key string
  • value interface{}
  • t time.Duration

func (*Cache_Expecter) Decrement

func (_e *Cache_Expecter) Decrement(key interface{}, value ...interface{}) *Cache_Decrement_Call

Decrement is a helper method to define mock.On call

  • key string
  • value ...int64

func (*Cache_Expecter) Flush

func (_e *Cache_Expecter) Flush() *Cache_Flush_Call

Flush is a helper method to define mock.On call

func (*Cache_Expecter) Forever

func (_e *Cache_Expecter) Forever(key interface{}, value interface{}) *Cache_Forever_Call

Forever is a helper method to define mock.On call

  • key string
  • value interface{}

func (*Cache_Expecter) Forget

func (_e *Cache_Expecter) Forget(key interface{}) *Cache_Forget_Call

Forget is a helper method to define mock.On call

  • key string

func (*Cache_Expecter) Get

func (_e *Cache_Expecter) Get(key interface{}, def ...interface{}) *Cache_Get_Call

Get is a helper method to define mock.On call

  • key string
  • def ...interface{}

func (*Cache_Expecter) GetBool

func (_e *Cache_Expecter) GetBool(key interface{}, def ...interface{}) *Cache_GetBool_Call

GetBool is a helper method to define mock.On call

  • key string
  • def ...bool

func (*Cache_Expecter) GetInt

func (_e *Cache_Expecter) GetInt(key interface{}, def ...interface{}) *Cache_GetInt_Call

GetInt is a helper method to define mock.On call

  • key string
  • def ...int

func (*Cache_Expecter) GetInt64

func (_e *Cache_Expecter) GetInt64(key interface{}, def ...interface{}) *Cache_GetInt64_Call

GetInt64 is a helper method to define mock.On call

  • key string
  • def ...int64

func (*Cache_Expecter) GetString

func (_e *Cache_Expecter) GetString(key interface{}, def ...interface{}) *Cache_GetString_Call

GetString is a helper method to define mock.On call

  • key string
  • def ...string

func (*Cache_Expecter) Has

func (_e *Cache_Expecter) Has(key interface{}) *Cache_Has_Call

Has is a helper method to define mock.On call

  • key string

func (*Cache_Expecter) Increment

func (_e *Cache_Expecter) Increment(key interface{}, value ...interface{}) *Cache_Increment_Call

Increment is a helper method to define mock.On call

  • key string
  • value ...int64

func (*Cache_Expecter) Lock

func (_e *Cache_Expecter) Lock(key interface{}, t ...interface{}) *Cache_Lock_Call

Lock is a helper method to define mock.On call

  • key string
  • t ...time.Duration

func (*Cache_Expecter) Pull

func (_e *Cache_Expecter) Pull(key interface{}, def ...interface{}) *Cache_Pull_Call

Pull is a helper method to define mock.On call

  • key string
  • def ...interface{}

func (*Cache_Expecter) Put

func (_e *Cache_Expecter) Put(key interface{}, value interface{}, t interface{}) *Cache_Put_Call

Put is a helper method to define mock.On call

  • key string
  • value interface{}
  • t time.Duration

func (*Cache_Expecter) Remember

func (_e *Cache_Expecter) Remember(key interface{}, ttl interface{}, callback interface{}) *Cache_Remember_Call

Remember is a helper method to define mock.On call

  • key string
  • ttl time.Duration
  • callback func()(interface{} , error)

func (*Cache_Expecter) RememberForever

func (_e *Cache_Expecter) RememberForever(key interface{}, callback interface{}) *Cache_RememberForever_Call

RememberForever is a helper method to define mock.On call

  • key string
  • callback func()(interface{} , error)

func (*Cache_Expecter) Store

func (_e *Cache_Expecter) Store(name interface{}) *Cache_Store_Call

Store is a helper method to define mock.On call

  • name string

func (*Cache_Expecter) WithContext

func (_e *Cache_Expecter) WithContext(ctx interface{}) *Cache_WithContext_Call

WithContext is a helper method to define mock.On call

  • ctx context.Context

type Cache_Flush_Call

type Cache_Flush_Call struct {
	*mock.Call
}

Cache_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'

func (*Cache_Flush_Call) Return

func (_c *Cache_Flush_Call) Return(_a0 bool) *Cache_Flush_Call

func (*Cache_Flush_Call) Run

func (_c *Cache_Flush_Call) Run(run func()) *Cache_Flush_Call

func (*Cache_Flush_Call) RunAndReturn

func (_c *Cache_Flush_Call) RunAndReturn(run func() bool) *Cache_Flush_Call

type Cache_Forever_Call

type Cache_Forever_Call struct {
	*mock.Call
}

Cache_Forever_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Forever'

func (*Cache_Forever_Call) Return

func (_c *Cache_Forever_Call) Return(_a0 bool) *Cache_Forever_Call

func (*Cache_Forever_Call) Run

func (_c *Cache_Forever_Call) Run(run func(key string, value interface{})) *Cache_Forever_Call

func (*Cache_Forever_Call) RunAndReturn

func (_c *Cache_Forever_Call) RunAndReturn(run func(string, interface{}) bool) *Cache_Forever_Call

type Cache_Forget_Call

type Cache_Forget_Call struct {
	*mock.Call
}

Cache_Forget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Forget'

func (*Cache_Forget_Call) Return

func (_c *Cache_Forget_Call) Return(_a0 bool) *Cache_Forget_Call

func (*Cache_Forget_Call) Run

func (_c *Cache_Forget_Call) Run(run func(key string)) *Cache_Forget_Call

func (*Cache_Forget_Call) RunAndReturn

func (_c *Cache_Forget_Call) RunAndReturn(run func(string) bool) *Cache_Forget_Call

type Cache_GetBool_Call

type Cache_GetBool_Call struct {
	*mock.Call
}

Cache_GetBool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBool'

func (*Cache_GetBool_Call) Return

func (_c *Cache_GetBool_Call) Return(_a0 bool) *Cache_GetBool_Call

func (*Cache_GetBool_Call) Run

func (_c *Cache_GetBool_Call) Run(run func(key string, def ...bool)) *Cache_GetBool_Call

func (*Cache_GetBool_Call) RunAndReturn

func (_c *Cache_GetBool_Call) RunAndReturn(run func(string, ...bool) bool) *Cache_GetBool_Call

type Cache_GetInt64_Call

type Cache_GetInt64_Call struct {
	*mock.Call
}

Cache_GetInt64_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInt64'

func (*Cache_GetInt64_Call) Return

func (*Cache_GetInt64_Call) Run

func (_c *Cache_GetInt64_Call) Run(run func(key string, def ...int64)) *Cache_GetInt64_Call

func (*Cache_GetInt64_Call) RunAndReturn

func (_c *Cache_GetInt64_Call) RunAndReturn(run func(string, ...int64) int64) *Cache_GetInt64_Call

type Cache_GetInt_Call

type Cache_GetInt_Call struct {
	*mock.Call
}

Cache_GetInt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInt'

func (*Cache_GetInt_Call) Return

func (_c *Cache_GetInt_Call) Return(_a0 int) *Cache_GetInt_Call

func (*Cache_GetInt_Call) Run

func (_c *Cache_GetInt_Call) Run(run func(key string, def ...int)) *Cache_GetInt_Call

func (*Cache_GetInt_Call) RunAndReturn

func (_c *Cache_GetInt_Call) RunAndReturn(run func(string, ...int) int) *Cache_GetInt_Call

type Cache_GetString_Call

type Cache_GetString_Call struct {
	*mock.Call
}

Cache_GetString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetString'

func (*Cache_GetString_Call) Return

func (*Cache_GetString_Call) Run

func (_c *Cache_GetString_Call) Run(run func(key string, def ...string)) *Cache_GetString_Call

func (*Cache_GetString_Call) RunAndReturn

func (_c *Cache_GetString_Call) RunAndReturn(run func(string, ...string) string) *Cache_GetString_Call

type Cache_Get_Call

type Cache_Get_Call struct {
	*mock.Call
}

Cache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*Cache_Get_Call) Return

func (_c *Cache_Get_Call) Return(_a0 interface{}) *Cache_Get_Call

func (*Cache_Get_Call) Run

func (_c *Cache_Get_Call) Run(run func(key string, def ...interface{})) *Cache_Get_Call

func (*Cache_Get_Call) RunAndReturn

func (_c *Cache_Get_Call) RunAndReturn(run func(string, ...interface{}) interface{}) *Cache_Get_Call

type Cache_Has_Call

type Cache_Has_Call struct {
	*mock.Call
}

Cache_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has'

func (*Cache_Has_Call) Return

func (_c *Cache_Has_Call) Return(_a0 bool) *Cache_Has_Call

func (*Cache_Has_Call) Run

func (_c *Cache_Has_Call) Run(run func(key string)) *Cache_Has_Call

func (*Cache_Has_Call) RunAndReturn

func (_c *Cache_Has_Call) RunAndReturn(run func(string) bool) *Cache_Has_Call

type Cache_Increment_Call

type Cache_Increment_Call struct {
	*mock.Call
}

Cache_Increment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Increment'

func (*Cache_Increment_Call) Return

func (_c *Cache_Increment_Call) Return(_a0 int64, _a1 error) *Cache_Increment_Call

func (*Cache_Increment_Call) Run

func (_c *Cache_Increment_Call) Run(run func(key string, value ...int64)) *Cache_Increment_Call

func (*Cache_Increment_Call) RunAndReturn

func (_c *Cache_Increment_Call) RunAndReturn(run func(string, ...int64) (int64, error)) *Cache_Increment_Call

type Cache_Lock_Call

type Cache_Lock_Call struct {
	*mock.Call
}

Cache_Lock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lock'

func (*Cache_Lock_Call) Return

func (_c *Cache_Lock_Call) Return(_a0 cache.Lock) *Cache_Lock_Call

func (*Cache_Lock_Call) Run

func (_c *Cache_Lock_Call) Run(run func(key string, t ...time.Duration)) *Cache_Lock_Call

func (*Cache_Lock_Call) RunAndReturn

func (_c *Cache_Lock_Call) RunAndReturn(run func(string, ...time.Duration) cache.Lock) *Cache_Lock_Call

type Cache_Pull_Call

type Cache_Pull_Call struct {
	*mock.Call
}

Cache_Pull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pull'

func (*Cache_Pull_Call) Return

func (_c *Cache_Pull_Call) Return(_a0 interface{}) *Cache_Pull_Call

func (*Cache_Pull_Call) Run

func (_c *Cache_Pull_Call) Run(run func(key string, def ...interface{})) *Cache_Pull_Call

func (*Cache_Pull_Call) RunAndReturn

func (_c *Cache_Pull_Call) RunAndReturn(run func(string, ...interface{}) interface{}) *Cache_Pull_Call

type Cache_Put_Call

type Cache_Put_Call struct {
	*mock.Call
}

Cache_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'

func (*Cache_Put_Call) Return

func (_c *Cache_Put_Call) Return(_a0 error) *Cache_Put_Call

func (*Cache_Put_Call) Run

func (_c *Cache_Put_Call) Run(run func(key string, value interface{}, t time.Duration)) *Cache_Put_Call

func (*Cache_Put_Call) RunAndReturn

func (_c *Cache_Put_Call) RunAndReturn(run func(string, interface{}, time.Duration) error) *Cache_Put_Call

type Cache_RememberForever_Call

type Cache_RememberForever_Call struct {
	*mock.Call
}

Cache_RememberForever_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RememberForever'

func (*Cache_RememberForever_Call) Return

func (_c *Cache_RememberForever_Call) Return(_a0 interface{}, _a1 error) *Cache_RememberForever_Call

func (*Cache_RememberForever_Call) Run

func (_c *Cache_RememberForever_Call) Run(run func(key string, callback func() (interface{}, error))) *Cache_RememberForever_Call

func (*Cache_RememberForever_Call) RunAndReturn

func (_c *Cache_RememberForever_Call) RunAndReturn(run func(string, func() (interface{}, error)) (interface{}, error)) *Cache_RememberForever_Call

type Cache_Remember_Call

type Cache_Remember_Call struct {
	*mock.Call
}

Cache_Remember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remember'

func (*Cache_Remember_Call) Return

func (_c *Cache_Remember_Call) Return(_a0 interface{}, _a1 error) *Cache_Remember_Call

func (*Cache_Remember_Call) Run

func (_c *Cache_Remember_Call) Run(run func(key string, ttl time.Duration, callback func() (interface{}, error))) *Cache_Remember_Call

func (*Cache_Remember_Call) RunAndReturn

func (_c *Cache_Remember_Call) RunAndReturn(run func(string, time.Duration, func() (interface{}, error)) (interface{}, error)) *Cache_Remember_Call

type Cache_Store_Call

type Cache_Store_Call struct {
	*mock.Call
}

Cache_Store_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Store'

func (*Cache_Store_Call) Return

func (_c *Cache_Store_Call) Return(_a0 cache.Driver) *Cache_Store_Call

func (*Cache_Store_Call) Run

func (_c *Cache_Store_Call) Run(run func(name string)) *Cache_Store_Call

func (*Cache_Store_Call) RunAndReturn

func (_c *Cache_Store_Call) RunAndReturn(run func(string) cache.Driver) *Cache_Store_Call

type Cache_WithContext_Call

type Cache_WithContext_Call struct {
	*mock.Call
}

Cache_WithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithContext'

func (*Cache_WithContext_Call) Return

func (*Cache_WithContext_Call) Run

func (*Cache_WithContext_Call) RunAndReturn

type Driver

type Driver struct {
	mock.Mock
}

Driver is an autogenerated mock type for the Driver type

func NewDriver

func NewDriver(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*Driver) Add

func (_m *Driver) Add(key string, value interface{}, t time.Duration) bool

Add provides a mock function with given fields: key, value, t

func (*Driver) Decrement

func (_m *Driver) Decrement(key string, value ...int64) (int64, error)

Decrement provides a mock function with given fields: key, value

func (*Driver) EXPECT

func (_m *Driver) EXPECT() *Driver_Expecter

func (*Driver) Flush

func (_m *Driver) Flush() bool

Flush provides a mock function with given fields:

func (*Driver) Forever

func (_m *Driver) Forever(key string, value interface{}) bool

Forever provides a mock function with given fields: key, value

func (*Driver) Forget

func (_m *Driver) Forget(key string) bool

Forget provides a mock function with given fields: key

func (*Driver) Get

func (_m *Driver) Get(key string, def ...interface{}) interface{}

Get provides a mock function with given fields: key, def

func (*Driver) GetBool

func (_m *Driver) GetBool(key string, def ...bool) bool

GetBool provides a mock function with given fields: key, def

func (*Driver) GetInt

func (_m *Driver) GetInt(key string, def ...int) int

GetInt provides a mock function with given fields: key, def

func (*Driver) GetInt64

func (_m *Driver) GetInt64(key string, def ...int64) int64

GetInt64 provides a mock function with given fields: key, def

func (*Driver) GetString

func (_m *Driver) GetString(key string, def ...string) string

GetString provides a mock function with given fields: key, def

func (*Driver) Has

func (_m *Driver) Has(key string) bool

Has provides a mock function with given fields: key

func (*Driver) Increment

func (_m *Driver) Increment(key string, value ...int64) (int64, error)

Increment provides a mock function with given fields: key, value

func (*Driver) Lock

func (_m *Driver) Lock(key string, t ...time.Duration) cache.Lock

Lock provides a mock function with given fields: key, t

func (*Driver) Pull

func (_m *Driver) Pull(key string, def ...interface{}) interface{}

Pull provides a mock function with given fields: key, def

func (*Driver) Put

func (_m *Driver) Put(key string, value interface{}, t time.Duration) error

Put provides a mock function with given fields: key, value, t

func (*Driver) Remember

func (_m *Driver) Remember(key string, ttl time.Duration, callback func() (interface{}, error)) (interface{}, error)

Remember provides a mock function with given fields: key, ttl, callback

func (*Driver) RememberForever

func (_m *Driver) RememberForever(key string, callback func() (interface{}, error)) (interface{}, error)

RememberForever provides a mock function with given fields: key, callback

func (*Driver) WithContext

func (_m *Driver) WithContext(ctx context.Context) cache.Driver

WithContext provides a mock function with given fields: ctx

type Driver_Add_Call

type Driver_Add_Call struct {
	*mock.Call
}

Driver_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'

func (*Driver_Add_Call) Return

func (_c *Driver_Add_Call) Return(_a0 bool) *Driver_Add_Call

func (*Driver_Add_Call) Run

func (_c *Driver_Add_Call) Run(run func(key string, value interface{}, t time.Duration)) *Driver_Add_Call

func (*Driver_Add_Call) RunAndReturn

func (_c *Driver_Add_Call) RunAndReturn(run func(string, interface{}, time.Duration) bool) *Driver_Add_Call

type Driver_Decrement_Call

type Driver_Decrement_Call struct {
	*mock.Call
}

Driver_Decrement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decrement'

func (*Driver_Decrement_Call) Return

func (*Driver_Decrement_Call) Run

func (_c *Driver_Decrement_Call) Run(run func(key string, value ...int64)) *Driver_Decrement_Call

func (*Driver_Decrement_Call) RunAndReturn

func (_c *Driver_Decrement_Call) RunAndReturn(run func(string, ...int64) (int64, error)) *Driver_Decrement_Call

type Driver_Expecter

type Driver_Expecter struct {
	// contains filtered or unexported fields
}

func (*Driver_Expecter) Add

func (_e *Driver_Expecter) Add(key interface{}, value interface{}, t interface{}) *Driver_Add_Call

Add is a helper method to define mock.On call

  • key string
  • value interface{}
  • t time.Duration

func (*Driver_Expecter) Decrement

func (_e *Driver_Expecter) Decrement(key interface{}, value ...interface{}) *Driver_Decrement_Call

Decrement is a helper method to define mock.On call

  • key string
  • value ...int64

func (*Driver_Expecter) Flush

func (_e *Driver_Expecter) Flush() *Driver_Flush_Call

Flush is a helper method to define mock.On call

func (*Driver_Expecter) Forever

func (_e *Driver_Expecter) Forever(key interface{}, value interface{}) *Driver_Forever_Call

Forever is a helper method to define mock.On call

  • key string
  • value interface{}

func (*Driver_Expecter) Forget

func (_e *Driver_Expecter) Forget(key interface{}) *Driver_Forget_Call

Forget is a helper method to define mock.On call

  • key string

func (*Driver_Expecter) Get

func (_e *Driver_Expecter) Get(key interface{}, def ...interface{}) *Driver_Get_Call

Get is a helper method to define mock.On call

  • key string
  • def ...interface{}

func (*Driver_Expecter) GetBool

func (_e *Driver_Expecter) GetBool(key interface{}, def ...interface{}) *Driver_GetBool_Call

GetBool is a helper method to define mock.On call

  • key string
  • def ...bool

func (*Driver_Expecter) GetInt

func (_e *Driver_Expecter) GetInt(key interface{}, def ...interface{}) *Driver_GetInt_Call

GetInt is a helper method to define mock.On call

  • key string
  • def ...int

func (*Driver_Expecter) GetInt64

func (_e *Driver_Expecter) GetInt64(key interface{}, def ...interface{}) *Driver_GetInt64_Call

GetInt64 is a helper method to define mock.On call

  • key string
  • def ...int64

func (*Driver_Expecter) GetString

func (_e *Driver_Expecter) GetString(key interface{}, def ...interface{}) *Driver_GetString_Call

GetString is a helper method to define mock.On call

  • key string
  • def ...string

func (*Driver_Expecter) Has

func (_e *Driver_Expecter) Has(key interface{}) *Driver_Has_Call

Has is a helper method to define mock.On call

  • key string

func (*Driver_Expecter) Increment

func (_e *Driver_Expecter) Increment(key interface{}, value ...interface{}) *Driver_Increment_Call

Increment is a helper method to define mock.On call

  • key string
  • value ...int64

func (*Driver_Expecter) Lock

func (_e *Driver_Expecter) Lock(key interface{}, t ...interface{}) *Driver_Lock_Call

Lock is a helper method to define mock.On call

  • key string
  • t ...time.Duration

func (*Driver_Expecter) Pull

func (_e *Driver_Expecter) Pull(key interface{}, def ...interface{}) *Driver_Pull_Call

Pull is a helper method to define mock.On call

  • key string
  • def ...interface{}

func (*Driver_Expecter) Put

func (_e *Driver_Expecter) Put(key interface{}, value interface{}, t interface{}) *Driver_Put_Call

Put is a helper method to define mock.On call

  • key string
  • value interface{}
  • t time.Duration

func (*Driver_Expecter) Remember

func (_e *Driver_Expecter) Remember(key interface{}, ttl interface{}, callback interface{}) *Driver_Remember_Call

Remember is a helper method to define mock.On call

  • key string
  • ttl time.Duration
  • callback func()(interface{} , error)

func (*Driver_Expecter) RememberForever

func (_e *Driver_Expecter) RememberForever(key interface{}, callback interface{}) *Driver_RememberForever_Call

RememberForever is a helper method to define mock.On call

  • key string
  • callback func()(interface{} , error)

func (*Driver_Expecter) WithContext

func (_e *Driver_Expecter) WithContext(ctx interface{}) *Driver_WithContext_Call

WithContext is a helper method to define mock.On call

  • ctx context.Context

type Driver_Flush_Call

type Driver_Flush_Call struct {
	*mock.Call
}

Driver_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'

func (*Driver_Flush_Call) Return

func (_c *Driver_Flush_Call) Return(_a0 bool) *Driver_Flush_Call

func (*Driver_Flush_Call) Run

func (_c *Driver_Flush_Call) Run(run func()) *Driver_Flush_Call

func (*Driver_Flush_Call) RunAndReturn

func (_c *Driver_Flush_Call) RunAndReturn(run func() bool) *Driver_Flush_Call

type Driver_Forever_Call

type Driver_Forever_Call struct {
	*mock.Call
}

Driver_Forever_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Forever'

func (*Driver_Forever_Call) Return

func (_c *Driver_Forever_Call) Return(_a0 bool) *Driver_Forever_Call

func (*Driver_Forever_Call) Run

func (_c *Driver_Forever_Call) Run(run func(key string, value interface{})) *Driver_Forever_Call

func (*Driver_Forever_Call) RunAndReturn

func (_c *Driver_Forever_Call) RunAndReturn(run func(string, interface{}) bool) *Driver_Forever_Call

type Driver_Forget_Call

type Driver_Forget_Call struct {
	*mock.Call
}

Driver_Forget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Forget'

func (*Driver_Forget_Call) Return

func (_c *Driver_Forget_Call) Return(_a0 bool) *Driver_Forget_Call

func (*Driver_Forget_Call) Run

func (_c *Driver_Forget_Call) Run(run func(key string)) *Driver_Forget_Call

func (*Driver_Forget_Call) RunAndReturn

func (_c *Driver_Forget_Call) RunAndReturn(run func(string) bool) *Driver_Forget_Call

type Driver_GetBool_Call

type Driver_GetBool_Call struct {
	*mock.Call
}

Driver_GetBool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBool'

func (*Driver_GetBool_Call) Return

func (_c *Driver_GetBool_Call) Return(_a0 bool) *Driver_GetBool_Call

func (*Driver_GetBool_Call) Run

func (_c *Driver_GetBool_Call) Run(run func(key string, def ...bool)) *Driver_GetBool_Call

func (*Driver_GetBool_Call) RunAndReturn

func (_c *Driver_GetBool_Call) RunAndReturn(run func(string, ...bool) bool) *Driver_GetBool_Call

type Driver_GetInt64_Call

type Driver_GetInt64_Call struct {
	*mock.Call
}

Driver_GetInt64_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInt64'

func (*Driver_GetInt64_Call) Return

func (*Driver_GetInt64_Call) Run

func (_c *Driver_GetInt64_Call) Run(run func(key string, def ...int64)) *Driver_GetInt64_Call

func (*Driver_GetInt64_Call) RunAndReturn

func (_c *Driver_GetInt64_Call) RunAndReturn(run func(string, ...int64) int64) *Driver_GetInt64_Call

type Driver_GetInt_Call

type Driver_GetInt_Call struct {
	*mock.Call
}

Driver_GetInt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInt'

func (*Driver_GetInt_Call) Return

func (_c *Driver_GetInt_Call) Return(_a0 int) *Driver_GetInt_Call

func (*Driver_GetInt_Call) Run

func (_c *Driver_GetInt_Call) Run(run func(key string, def ...int)) *Driver_GetInt_Call

func (*Driver_GetInt_Call) RunAndReturn

func (_c *Driver_GetInt_Call) RunAndReturn(run func(string, ...int) int) *Driver_GetInt_Call

type Driver_GetString_Call

type Driver_GetString_Call struct {
	*mock.Call
}

Driver_GetString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetString'

func (*Driver_GetString_Call) Return

func (*Driver_GetString_Call) Run

func (_c *Driver_GetString_Call) Run(run func(key string, def ...string)) *Driver_GetString_Call

func (*Driver_GetString_Call) RunAndReturn

func (_c *Driver_GetString_Call) RunAndReturn(run func(string, ...string) string) *Driver_GetString_Call

type Driver_Get_Call

type Driver_Get_Call struct {
	*mock.Call
}

Driver_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*Driver_Get_Call) Return

func (_c *Driver_Get_Call) Return(_a0 interface{}) *Driver_Get_Call

func (*Driver_Get_Call) Run

func (_c *Driver_Get_Call) Run(run func(key string, def ...interface{})) *Driver_Get_Call

func (*Driver_Get_Call) RunAndReturn

func (_c *Driver_Get_Call) RunAndReturn(run func(string, ...interface{}) interface{}) *Driver_Get_Call

type Driver_Has_Call

type Driver_Has_Call struct {
	*mock.Call
}

Driver_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has'

func (*Driver_Has_Call) Return

func (_c *Driver_Has_Call) Return(_a0 bool) *Driver_Has_Call

func (*Driver_Has_Call) Run

func (_c *Driver_Has_Call) Run(run func(key string)) *Driver_Has_Call

func (*Driver_Has_Call) RunAndReturn

func (_c *Driver_Has_Call) RunAndReturn(run func(string) bool) *Driver_Has_Call

type Driver_Increment_Call

type Driver_Increment_Call struct {
	*mock.Call
}

Driver_Increment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Increment'

func (*Driver_Increment_Call) Return

func (*Driver_Increment_Call) Run

func (_c *Driver_Increment_Call) Run(run func(key string, value ...int64)) *Driver_Increment_Call

func (*Driver_Increment_Call) RunAndReturn

func (_c *Driver_Increment_Call) RunAndReturn(run func(string, ...int64) (int64, error)) *Driver_Increment_Call

type Driver_Lock_Call

type Driver_Lock_Call struct {
	*mock.Call
}

Driver_Lock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lock'

func (*Driver_Lock_Call) Return

func (_c *Driver_Lock_Call) Return(_a0 cache.Lock) *Driver_Lock_Call

func (*Driver_Lock_Call) Run

func (_c *Driver_Lock_Call) Run(run func(key string, t ...time.Duration)) *Driver_Lock_Call

func (*Driver_Lock_Call) RunAndReturn

func (_c *Driver_Lock_Call) RunAndReturn(run func(string, ...time.Duration) cache.Lock) *Driver_Lock_Call

type Driver_Pull_Call

type Driver_Pull_Call struct {
	*mock.Call
}

Driver_Pull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pull'

func (*Driver_Pull_Call) Return

func (_c *Driver_Pull_Call) Return(_a0 interface{}) *Driver_Pull_Call

func (*Driver_Pull_Call) Run

func (_c *Driver_Pull_Call) Run(run func(key string, def ...interface{})) *Driver_Pull_Call

func (*Driver_Pull_Call) RunAndReturn

func (_c *Driver_Pull_Call) RunAndReturn(run func(string, ...interface{}) interface{}) *Driver_Pull_Call

type Driver_Put_Call

type Driver_Put_Call struct {
	*mock.Call
}

Driver_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'

func (*Driver_Put_Call) Return

func (_c *Driver_Put_Call) Return(_a0 error) *Driver_Put_Call

func (*Driver_Put_Call) Run

func (_c *Driver_Put_Call) Run(run func(key string, value interface{}, t time.Duration)) *Driver_Put_Call

func (*Driver_Put_Call) RunAndReturn

func (_c *Driver_Put_Call) RunAndReturn(run func(string, interface{}, time.Duration) error) *Driver_Put_Call

type Driver_RememberForever_Call

type Driver_RememberForever_Call struct {
	*mock.Call
}

Driver_RememberForever_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RememberForever'

func (*Driver_RememberForever_Call) Return

func (_c *Driver_RememberForever_Call) Return(_a0 interface{}, _a1 error) *Driver_RememberForever_Call

func (*Driver_RememberForever_Call) Run

func (_c *Driver_RememberForever_Call) Run(run func(key string, callback func() (interface{}, error))) *Driver_RememberForever_Call

func (*Driver_RememberForever_Call) RunAndReturn

func (_c *Driver_RememberForever_Call) RunAndReturn(run func(string, func() (interface{}, error)) (interface{}, error)) *Driver_RememberForever_Call

type Driver_Remember_Call

type Driver_Remember_Call struct {
	*mock.Call
}

Driver_Remember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remember'

func (*Driver_Remember_Call) Return

func (_c *Driver_Remember_Call) Return(_a0 interface{}, _a1 error) *Driver_Remember_Call

func (*Driver_Remember_Call) Run

func (_c *Driver_Remember_Call) Run(run func(key string, ttl time.Duration, callback func() (interface{}, error))) *Driver_Remember_Call

func (*Driver_Remember_Call) RunAndReturn

func (_c *Driver_Remember_Call) RunAndReturn(run func(string, time.Duration, func() (interface{}, error)) (interface{}, error)) *Driver_Remember_Call

type Driver_WithContext_Call

type Driver_WithContext_Call struct {
	*mock.Call
}

Driver_WithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithContext'

func (*Driver_WithContext_Call) Return

func (*Driver_WithContext_Call) Run

func (*Driver_WithContext_Call) RunAndReturn

type Lock

type Lock struct {
	mock.Mock
}

Lock is an autogenerated mock type for the Lock type

func NewLock

func NewLock(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*Lock) Block

func (_m *Lock) Block(t time.Duration, callback ...func()) bool

Block provides a mock function with given fields: t, callback

func (*Lock) EXPECT

func (_m *Lock) EXPECT() *Lock_Expecter

func (*Lock) ForceRelease

func (_m *Lock) ForceRelease() bool

ForceRelease provides a mock function with given fields:

func (*Lock) Get

func (_m *Lock) Get(callback ...func()) bool

Get provides a mock function with given fields: callback

func (*Lock) Release

func (_m *Lock) Release() bool

Release provides a mock function with given fields:

type Lock_Block_Call

type Lock_Block_Call struct {
	*mock.Call
}

Lock_Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Block'

func (*Lock_Block_Call) Return

func (_c *Lock_Block_Call) Return(_a0 bool) *Lock_Block_Call

func (*Lock_Block_Call) Run

func (_c *Lock_Block_Call) Run(run func(t time.Duration, callback ...func())) *Lock_Block_Call

func (*Lock_Block_Call) RunAndReturn

func (_c *Lock_Block_Call) RunAndReturn(run func(time.Duration, ...func()) bool) *Lock_Block_Call

type Lock_Expecter

type Lock_Expecter struct {
	// contains filtered or unexported fields
}

func (*Lock_Expecter) Block

func (_e *Lock_Expecter) Block(t interface{}, callback ...interface{}) *Lock_Block_Call

Block is a helper method to define mock.On call

  • t time.Duration
  • callback ...func()

func (*Lock_Expecter) ForceRelease

func (_e *Lock_Expecter) ForceRelease() *Lock_ForceRelease_Call

ForceRelease is a helper method to define mock.On call

func (*Lock_Expecter) Get

func (_e *Lock_Expecter) Get(callback ...interface{}) *Lock_Get_Call

Get is a helper method to define mock.On call

  • callback ...func()

func (*Lock_Expecter) Release

func (_e *Lock_Expecter) Release() *Lock_Release_Call

Release is a helper method to define mock.On call

type Lock_ForceRelease_Call

type Lock_ForceRelease_Call struct {
	*mock.Call
}

Lock_ForceRelease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceRelease'

func (*Lock_ForceRelease_Call) Return

func (*Lock_ForceRelease_Call) Run

func (_c *Lock_ForceRelease_Call) Run(run func()) *Lock_ForceRelease_Call

func (*Lock_ForceRelease_Call) RunAndReturn

func (_c *Lock_ForceRelease_Call) RunAndReturn(run func() bool) *Lock_ForceRelease_Call

type Lock_Get_Call

type Lock_Get_Call struct {
	*mock.Call
}

Lock_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*Lock_Get_Call) Return

func (_c *Lock_Get_Call) Return(_a0 bool) *Lock_Get_Call

func (*Lock_Get_Call) Run

func (_c *Lock_Get_Call) Run(run func(callback ...func())) *Lock_Get_Call

func (*Lock_Get_Call) RunAndReturn

func (_c *Lock_Get_Call) RunAndReturn(run func(...func()) bool) *Lock_Get_Call

type Lock_Release_Call

type Lock_Release_Call struct {
	*mock.Call
}

Lock_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'

func (*Lock_Release_Call) Return

func (_c *Lock_Release_Call) Return(_a0 bool) *Lock_Release_Call

func (*Lock_Release_Call) Run

func (_c *Lock_Release_Call) Run(run func()) *Lock_Release_Call

func (*Lock_Release_Call) RunAndReturn

func (_c *Lock_Release_Call) RunAndReturn(run func() bool) *Lock_Release_Call

Jump to

Keyboard shortcuts

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