mocks

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 7 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) DeleteAllByGatewayID

func (_m *Client) DeleteAllByGatewayID(ctx context.Context, gatewayID string) error

DeleteAllByGatewayID provides a mock function with given fields: ctx, gatewayID

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

func (_m *Client) GetGateway(ctx context.Context, id string) (*gateway.Gateway, error)

GetGateway provides a mock function with given fields: ctx, id

func (*Client) GetTTLMap

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

GetTTLMap provides a mock function with given fields: name

func (*Client) InvalidateAll

func (_m *Client) InvalidateAll(ctx context.Context) error

InvalidateAll provides a mock function with given fields: ctx

func (*Client) RedisClient

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

RedisClient provides a mock function with no fields

func (*Client) SaveGateway

func (_m *Client) SaveGateway(ctx context.Context, _a1 *gateway.Gateway) error

SaveGateway provides a mock function with given fields: ctx, _a1

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_DeleteAllByGatewayID_Call

type Client_DeleteAllByGatewayID_Call struct {
	*mock.Call
}

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

func (*Client_DeleteAllByGatewayID_Call) Return

func (*Client_DeleteAllByGatewayID_Call) Run

func (*Client_DeleteAllByGatewayID_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) DeleteAllByGatewayID

func (_e *Client_Expecter) DeleteAllByGatewayID(ctx interface{}, gatewayID interface{}) *Client_DeleteAllByGatewayID_Call

DeleteAllByGatewayID is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID 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) GetGateway

func (_e *Client_Expecter) GetGateway(ctx interface{}, id interface{}) *Client_GetGateway_Call

GetGateway is a helper method to define mock.On call

  • ctx context.Context
  • id 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) InvalidateAll

func (_e *Client_Expecter) InvalidateAll(ctx interface{}) *Client_InvalidateAll_Call

InvalidateAll is a helper method to define mock.On call

  • ctx context.Context

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

func (_e *Client_Expecter) SaveGateway(ctx interface{}, _a1 interface{}) *Client_SaveGateway_Call

SaveGateway is a helper method to define mock.On call

  • ctx context.Context
  • _a1 *gateway.Gateway

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_GetGateway_Call

type Client_GetGateway_Call struct {
	*mock.Call
}

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

func (*Client_GetGateway_Call) Return

func (*Client_GetGateway_Call) Run

func (*Client_GetGateway_Call) RunAndReturn

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_InvalidateAll_Call

type Client_InvalidateAll_Call struct {
	*mock.Call
}

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

func (*Client_InvalidateAll_Call) Return

func (*Client_InvalidateAll_Call) Run

func (*Client_InvalidateAll_Call) RunAndReturn

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_SaveGateway_Call

type Client_SaveGateway_Call struct {
	*mock.Call
}

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

func (*Client_SaveGateway_Call) Return

func (*Client_SaveGateway_Call) Run

func (*Client_SaveGateway_Call) RunAndReturn

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