mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 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 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) 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 ...int) (int, error)

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

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 ...int) (int, 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{}) (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{}) (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 Driver

type Driver struct {
	mock.Mock
}

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) 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 ...int) (int, error)

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

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 ...int) (int, 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{}) (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{}) (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 Lock

type Lock struct {
	mock.Mock
}

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) Block

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

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

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:

Jump to

Keyboard shortcuts

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