ttl_cache_service_mock

package
v0.0.0-...-9f5e8be Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TTLCacheService

type TTLCacheService[K comparable, V interface{}] struct {
	mock.Mock
}

TTLCacheService is an autogenerated mock type for the TTLCacheService type

func NewTTLCacheService

func NewTTLCacheService[K comparable, V interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *TTLCacheService[K, V]

NewTTLCacheService creates a new instance of TTLCacheService. 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 (*TTLCacheService[K, V]) DeleteExpired

func (_m *TTLCacheService[K, V]) DeleteExpired()

DeleteExpired provides a mock function with given fields:

func (*TTLCacheService[K, V]) EXPECT

func (_m *TTLCacheService[K, V]) EXPECT() *TTLCacheService_Expecter[K, V]

func (*TTLCacheService[K, V]) Get

func (_m *TTLCacheService[K, V]) Get(key K, opts ...ttlcache.Option[K, V]) *ttlcache.Item[K, V]

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

func (*TTLCacheService[K, V]) Has

func (_m *TTLCacheService[K, V]) Has(key K) bool

Has provides a mock function with given fields: key

func (*TTLCacheService[K, V]) Items

func (_m *TTLCacheService[K, V]) Items() map[K]*ttlcache.Item[K, V]

Items provides a mock function with given fields:

func (*TTLCacheService[K, V]) Set

func (_m *TTLCacheService[K, V]) Set(key K, value V, ttl time.Duration) *ttlcache.Item[K, V]

Set provides a mock function with given fields: key, value, ttl

func (*TTLCacheService[K, V]) Start

func (_m *TTLCacheService[K, V]) Start()

Start provides a mock function with given fields:

type TTLCacheService_DeleteExpired_Call

type TTLCacheService_DeleteExpired_Call[K comparable, V interface{}] struct {
	*mock.Call
}

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

func (*TTLCacheService_DeleteExpired_Call[K, V]) Return

func (*TTLCacheService_DeleteExpired_Call[K, V]) Run

func (*TTLCacheService_DeleteExpired_Call[K, V]) RunAndReturn

func (_c *TTLCacheService_DeleteExpired_Call[K, V]) RunAndReturn(run func()) *TTLCacheService_DeleteExpired_Call[K, V]

type TTLCacheService_Expecter

type TTLCacheService_Expecter[K comparable, V interface{}] struct {
	// contains filtered or unexported fields
}

func (*TTLCacheService_Expecter[K, V]) DeleteExpired

func (_e *TTLCacheService_Expecter[K, V]) DeleteExpired() *TTLCacheService_DeleteExpired_Call[K, V]

DeleteExpired is a helper method to define mock.On call

func (*TTLCacheService_Expecter[K, V]) Get

func (_e *TTLCacheService_Expecter[K, V]) Get(key interface{}, opts ...interface{}) *TTLCacheService_Get_Call[K, V]

Get is a helper method to define mock.On call

  • key K
  • opts ...ttlcache.Option[K,V]

func (*TTLCacheService_Expecter[K, V]) Has

func (_e *TTLCacheService_Expecter[K, V]) Has(key interface{}) *TTLCacheService_Has_Call[K, V]

Has is a helper method to define mock.On call

  • key K

func (*TTLCacheService_Expecter[K, V]) Items

func (_e *TTLCacheService_Expecter[K, V]) Items() *TTLCacheService_Items_Call[K, V]

Items is a helper method to define mock.On call

func (*TTLCacheService_Expecter[K, V]) Set

func (_e *TTLCacheService_Expecter[K, V]) Set(key interface{}, value interface{}, ttl interface{}) *TTLCacheService_Set_Call[K, V]

Set is a helper method to define mock.On call

  • key K
  • value V
  • ttl time.Duration

func (*TTLCacheService_Expecter[K, V]) Start

func (_e *TTLCacheService_Expecter[K, V]) Start() *TTLCacheService_Start_Call[K, V]

Start is a helper method to define mock.On call

type TTLCacheService_Get_Call

type TTLCacheService_Get_Call[K comparable, V interface{}] struct {
	*mock.Call
}

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

func (*TTLCacheService_Get_Call[K, V]) Return

func (_c *TTLCacheService_Get_Call[K, V]) Return(_a0 *ttlcache.Item[K, V]) *TTLCacheService_Get_Call[K, V]

func (*TTLCacheService_Get_Call[K, V]) Run

func (_c *TTLCacheService_Get_Call[K, V]) Run(run func(key K, opts ...ttlcache.Option[K, V])) *TTLCacheService_Get_Call[K, V]

func (*TTLCacheService_Get_Call[K, V]) RunAndReturn

func (_c *TTLCacheService_Get_Call[K, V]) RunAndReturn(run func(K, ...ttlcache.Option[K, V]) *ttlcache.Item[K, V]) *TTLCacheService_Get_Call[K, V]

type TTLCacheService_Has_Call

type TTLCacheService_Has_Call[K comparable, V interface{}] struct {
	*mock.Call
}

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

func (*TTLCacheService_Has_Call[K, V]) Return

func (_c *TTLCacheService_Has_Call[K, V]) Return(_a0 bool) *TTLCacheService_Has_Call[K, V]

func (*TTLCacheService_Has_Call[K, V]) Run

func (_c *TTLCacheService_Has_Call[K, V]) Run(run func(key K)) *TTLCacheService_Has_Call[K, V]

func (*TTLCacheService_Has_Call[K, V]) RunAndReturn

func (_c *TTLCacheService_Has_Call[K, V]) RunAndReturn(run func(K) bool) *TTLCacheService_Has_Call[K, V]

type TTLCacheService_Items_Call

type TTLCacheService_Items_Call[K comparable, V interface{}] struct {
	*mock.Call
}

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

func (*TTLCacheService_Items_Call[K, V]) Return

func (_c *TTLCacheService_Items_Call[K, V]) Return(_a0 map[K]*ttlcache.Item[K, V]) *TTLCacheService_Items_Call[K, V]

func (*TTLCacheService_Items_Call[K, V]) Run

func (_c *TTLCacheService_Items_Call[K, V]) Run(run func()) *TTLCacheService_Items_Call[K, V]

func (*TTLCacheService_Items_Call[K, V]) RunAndReturn

func (_c *TTLCacheService_Items_Call[K, V]) RunAndReturn(run func() map[K]*ttlcache.Item[K, V]) *TTLCacheService_Items_Call[K, V]

type TTLCacheService_Set_Call

type TTLCacheService_Set_Call[K comparable, V interface{}] struct {
	*mock.Call
}

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

func (*TTLCacheService_Set_Call[K, V]) Return

func (_c *TTLCacheService_Set_Call[K, V]) Return(_a0 *ttlcache.Item[K, V]) *TTLCacheService_Set_Call[K, V]

func (*TTLCacheService_Set_Call[K, V]) Run

func (_c *TTLCacheService_Set_Call[K, V]) Run(run func(key K, value V, ttl time.Duration)) *TTLCacheService_Set_Call[K, V]

func (*TTLCacheService_Set_Call[K, V]) RunAndReturn

func (_c *TTLCacheService_Set_Call[K, V]) RunAndReturn(run func(K, V, time.Duration) *ttlcache.Item[K, V]) *TTLCacheService_Set_Call[K, V]

type TTLCacheService_Start_Call

type TTLCacheService_Start_Call[K comparable, V interface{}] struct {
	*mock.Call
}

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

func (*TTLCacheService_Start_Call[K, V]) Return

func (_c *TTLCacheService_Start_Call[K, V]) Return() *TTLCacheService_Start_Call[K, V]

func (*TTLCacheService_Start_Call[K, V]) Run

func (_c *TTLCacheService_Start_Call[K, V]) Run(run func()) *TTLCacheService_Start_Call[K, V]

func (*TTLCacheService_Start_Call[K, V]) RunAndReturn

func (_c *TTLCacheService_Start_Call[K, V]) RunAndReturn(run func()) *TTLCacheService_Start_Call[K, V]

Jump to

Keyboard shortcuts

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