mocks

package
v0.32.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) ClearAllTTLMaps

func (_m *Client) ClearAllTTLMaps()

ClearAllTTLMaps provides a mock function with no fields

func (*Client) CreateTTLMap

func (_m *Client) CreateTTLMap(name string, ttl time.Duration) *cache.TTLMap

CreateTTLMap provides a mock function with given fields: name, ttl

func (*Client) Delete

func (_m *Client) Delete(ctx context.Context, key string) error

Delete provides a mock function with given fields: ctx, key

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) Get

func (_m *Client) Get(ctx context.Context, key string) (string, error)

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

func (*Client) GetTTLMap

func (_m *Client) GetTTLMap(name string) *cache.TTLMap

GetTTLMap provides a mock function with given fields: name

func (*Client) RedisClient

func (_m *Client) RedisClient() *redis.Client

RedisClient provides a mock function with no fields

func (*Client) Set

func (_m *Client) Set(ctx context.Context, key string, value string, expiration time.Duration) error

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

type Client_ClearAllTTLMaps_Call

type Client_ClearAllTTLMaps_Call struct {
	*mock.Call
}

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

func (*Client_ClearAllTTLMaps_Call) Return

func (*Client_ClearAllTTLMaps_Call) Run

func (*Client_ClearAllTTLMaps_Call) RunAndReturn

func (_c *Client_ClearAllTTLMaps_Call) RunAndReturn(run func()) *Client_ClearAllTTLMaps_Call

type Client_CreateTTLMap_Call

type Client_CreateTTLMap_Call struct {
	*mock.Call
}

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

func (*Client_CreateTTLMap_Call) Return

func (*Client_CreateTTLMap_Call) Run

func (*Client_CreateTTLMap_Call) RunAndReturn

type Client_Delete_Call

type Client_Delete_Call struct {
	*mock.Call
}

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

func (*Client_Delete_Call) Return

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

func (*Client_Delete_Call) Run

func (_c *Client_Delete_Call) Run(run func(ctx context.Context, key string)) *Client_Delete_Call

func (*Client_Delete_Call) RunAndReturn

func (_c *Client_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Client_Delete_Call

type Client_Expecter

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

func (*Client_Expecter) ClearAllTTLMaps

func (_e *Client_Expecter) ClearAllTTLMaps() *Client_ClearAllTTLMaps_Call

ClearAllTTLMaps is a helper method to define mock.On call

func (*Client_Expecter) CreateTTLMap

func (_e *Client_Expecter) CreateTTLMap(name interface{}, ttl interface{}) *Client_CreateTTLMap_Call

CreateTTLMap is a helper method to define mock.On call

  • name string
  • ttl time.Duration

func (*Client_Expecter) Delete

func (_e *Client_Expecter) Delete(ctx interface{}, key interface{}) *Client_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*Client_Expecter) Get

func (_e *Client_Expecter) Get(ctx interface{}, key interface{}) *Client_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*Client_Expecter) GetTTLMap

func (_e *Client_Expecter) GetTTLMap(name interface{}) *Client_GetTTLMap_Call

GetTTLMap is a helper method to define mock.On call

  • name string

func (*Client_Expecter) RedisClient

func (_e *Client_Expecter) RedisClient() *Client_RedisClient_Call

RedisClient is a helper method to define mock.On call

func (*Client_Expecter) Set

func (_e *Client_Expecter) Set(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *Client_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value string
  • expiration time.Duration

type Client_GetTTLMap_Call

type Client_GetTTLMap_Call struct {
	*mock.Call
}

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

func (*Client_GetTTLMap_Call) Return

func (*Client_GetTTLMap_Call) Run

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

func (*Client_GetTTLMap_Call) RunAndReturn

func (_c *Client_GetTTLMap_Call) RunAndReturn(run func(string) *cache.TTLMap) *Client_GetTTLMap_Call

type Client_Get_Call

type Client_Get_Call struct {
	*mock.Call
}

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

func (*Client_Get_Call) Return

func (_c *Client_Get_Call) Return(_a0 string, _a1 error) *Client_Get_Call

func (*Client_Get_Call) Run

func (_c *Client_Get_Call) Run(run func(ctx context.Context, key string)) *Client_Get_Call

func (*Client_Get_Call) RunAndReturn

func (_c *Client_Get_Call) RunAndReturn(run func(context.Context, string) (string, error)) *Client_Get_Call

type Client_RedisClient_Call

type Client_RedisClient_Call struct {
	*mock.Call
}

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

func (*Client_RedisClient_Call) Return

func (*Client_RedisClient_Call) Run

func (_c *Client_RedisClient_Call) Run(run func()) *Client_RedisClient_Call

func (*Client_RedisClient_Call) RunAndReturn

func (_c *Client_RedisClient_Call) RunAndReturn(run func() *redis.Client) *Client_RedisClient_Call

type Client_Set_Call

type Client_Set_Call struct {
	*mock.Call
}

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

func (*Client_Set_Call) Return

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

func (*Client_Set_Call) Run

func (_c *Client_Set_Call) Run(run func(ctx context.Context, key string, value string, expiration time.Duration)) *Client_Set_Call

func (*Client_Set_Call) RunAndReturn

func (_c *Client_Set_Call) RunAndReturn(run func(context.Context, string, string, time.Duration) error) *Client_Set_Call

type EventPublisher

type EventPublisher struct {
	mock.Mock
}

EventPublisher is an autogenerated mock type for the EventPublisher type

func NewEventPublisher

func NewEventPublisher(t interface {
	mock.TestingT
	Cleanup(func())
}) *EventPublisher

NewEventPublisher creates a new instance of EventPublisher. 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 (*EventPublisher) EXPECT

func (*EventPublisher) Publish

func (_m *EventPublisher) Publish(ctx context.Context, ev event.Event) error

Publish provides a mock function with given fields: ctx, ev

type EventPublisher_Expecter

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

func (*EventPublisher_Expecter) Publish

func (_e *EventPublisher_Expecter) Publish(ctx interface{}, ev interface{}) *EventPublisher_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • ev event.Event

type EventPublisher_Publish_Call

type EventPublisher_Publish_Call struct {
	*mock.Call
}

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

func (*EventPublisher_Publish_Call) Return

func (*EventPublisher_Publish_Call) Run

func (*EventPublisher_Publish_Call) RunAndReturn

Jump to

Keyboard shortcuts

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