Documentation
¶
Index ¶
- type Client
- func (_m *Client) ClearAllTTLMaps()
- func (_m *Client) CreateTTLMap(name string, ttl time.Duration) *cache.TTLMap
- func (_m *Client) Delete(ctx context.Context, key string) error
- func (_m *Client) DeleteAllByGatewayID(ctx context.Context, gatewayID string) error
- func (_m *Client) EXPECT() *Client_Expecter
- func (_m *Client) Get(ctx context.Context, key string) (string, error)
- func (_m *Client) GetGateway(ctx context.Context, id string) (*gateway.Gateway, error)
- func (_m *Client) GetTTLMap(name string) *cache.TTLMap
- func (_m *Client) InvalidateAll(ctx context.Context) error
- func (_m *Client) RedisClient() *redis.Client
- func (_m *Client) SaveGateway(ctx context.Context, _a1 *gateway.Gateway) error
- func (_m *Client) Set(ctx context.Context, key string, value string, expiration time.Duration) error
- type Client_ClearAllTTLMaps_Call
- type Client_CreateTTLMap_Call
- func (_c *Client_CreateTTLMap_Call) Return(_a0 *cache.TTLMap) *Client_CreateTTLMap_Call
- func (_c *Client_CreateTTLMap_Call) Run(run func(name string, ttl time.Duration)) *Client_CreateTTLMap_Call
- func (_c *Client_CreateTTLMap_Call) RunAndReturn(run func(string, time.Duration) *cache.TTLMap) *Client_CreateTTLMap_Call
- type Client_DeleteAllByGatewayID_Call
- func (_c *Client_DeleteAllByGatewayID_Call) Return(_a0 error) *Client_DeleteAllByGatewayID_Call
- func (_c *Client_DeleteAllByGatewayID_Call) Run(run func(ctx context.Context, gatewayID string)) *Client_DeleteAllByGatewayID_Call
- func (_c *Client_DeleteAllByGatewayID_Call) RunAndReturn(run func(context.Context, string) error) *Client_DeleteAllByGatewayID_Call
- type Client_Delete_Call
- type Client_Expecter
- func (_e *Client_Expecter) ClearAllTTLMaps() *Client_ClearAllTTLMaps_Call
- func (_e *Client_Expecter) CreateTTLMap(name interface{}, ttl interface{}) *Client_CreateTTLMap_Call
- func (_e *Client_Expecter) Delete(ctx interface{}, key interface{}) *Client_Delete_Call
- func (_e *Client_Expecter) DeleteAllByGatewayID(ctx interface{}, gatewayID interface{}) *Client_DeleteAllByGatewayID_Call
- func (_e *Client_Expecter) Get(ctx interface{}, key interface{}) *Client_Get_Call
- func (_e *Client_Expecter) GetGateway(ctx interface{}, id interface{}) *Client_GetGateway_Call
- func (_e *Client_Expecter) GetTTLMap(name interface{}) *Client_GetTTLMap_Call
- func (_e *Client_Expecter) InvalidateAll(ctx interface{}) *Client_InvalidateAll_Call
- func (_e *Client_Expecter) RedisClient() *Client_RedisClient_Call
- func (_e *Client_Expecter) SaveGateway(ctx interface{}, _a1 interface{}) *Client_SaveGateway_Call
- func (_e *Client_Expecter) Set(ctx interface{}, key interface{}, value interface{}, expiration interface{}) *Client_Set_Call
- type Client_GetGateway_Call
- func (_c *Client_GetGateway_Call) Return(_a0 *gateway.Gateway, _a1 error) *Client_GetGateway_Call
- func (_c *Client_GetGateway_Call) Run(run func(ctx context.Context, id string)) *Client_GetGateway_Call
- func (_c *Client_GetGateway_Call) RunAndReturn(run func(context.Context, string) (*gateway.Gateway, error)) *Client_GetGateway_Call
- type Client_GetTTLMap_Call
- type Client_Get_Call
- type Client_InvalidateAll_Call
- type Client_RedisClient_Call
- type Client_SaveGateway_Call
- func (_c *Client_SaveGateway_Call) Return(_a0 error) *Client_SaveGateway_Call
- func (_c *Client_SaveGateway_Call) Run(run func(ctx context.Context, _a1 *gateway.Gateway)) *Client_SaveGateway_Call
- func (_c *Client_SaveGateway_Call) RunAndReturn(run func(context.Context, *gateway.Gateway) error) *Client_SaveGateway_Call
- type Client_Set_Call
- type EventPublisher
- type EventPublisher_Expecter
- type EventPublisher_Publish_Call
- func (_c *EventPublisher_Publish_Call) Return(_a0 error) *EventPublisher_Publish_Call
- func (_c *EventPublisher_Publish_Call) Run(run func(ctx context.Context, ev event.Event)) *EventPublisher_Publish_Call
- func (_c *EventPublisher_Publish_Call) RunAndReturn(run func(context.Context, event.Event) error) *EventPublisher_Publish_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an autogenerated mock type for the Client type
func NewClient ¶
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 ¶
CreateTTLMap provides a mock function with given fields: name, ttl
func (*Client) DeleteAllByGatewayID ¶
DeleteAllByGatewayID provides a mock function with given fields: ctx, gatewayID
func (*Client) EXPECT ¶
func (_m *Client) EXPECT() *Client_Expecter
func (*Client) GetGateway ¶
GetGateway provides a mock function with given fields: ctx, id
func (*Client) InvalidateAll ¶
InvalidateAll provides a mock function with given fields: ctx
func (*Client) RedisClient ¶
RedisClient provides a mock function with no fields
func (*Client) SaveGateway ¶
SaveGateway provides a mock function with given fields: ctx, _a1
type Client_ClearAllTTLMaps_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 (_c *Client_ClearAllTTLMaps_Call) Return() *Client_ClearAllTTLMaps_Call
func (*Client_ClearAllTTLMaps_Call) Run ¶
func (_c *Client_ClearAllTTLMaps_Call) Run(run func()) *Client_ClearAllTTLMaps_Call
func (*Client_ClearAllTTLMaps_Call) RunAndReturn ¶
func (_c *Client_ClearAllTTLMaps_Call) RunAndReturn(run func()) *Client_ClearAllTTLMaps_Call
type Client_CreateTTLMap_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 (_c *Client_CreateTTLMap_Call) Return(_a0 *cache.TTLMap) *Client_CreateTTLMap_Call
func (*Client_CreateTTLMap_Call) Run ¶
func (_c *Client_CreateTTLMap_Call) Run(run func(name string, ttl time.Duration)) *Client_CreateTTLMap_Call
func (*Client_CreateTTLMap_Call) RunAndReturn ¶
func (_c *Client_CreateTTLMap_Call) RunAndReturn(run func(string, time.Duration) *cache.TTLMap) *Client_CreateTTLMap_Call
type Client_DeleteAllByGatewayID_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 (_c *Client_DeleteAllByGatewayID_Call) Return(_a0 error) *Client_DeleteAllByGatewayID_Call
func (*Client_DeleteAllByGatewayID_Call) Run ¶
func (_c *Client_DeleteAllByGatewayID_Call) Run(run func(ctx context.Context, gatewayID string)) *Client_DeleteAllByGatewayID_Call
func (*Client_DeleteAllByGatewayID_Call) RunAndReturn ¶
func (_c *Client_DeleteAllByGatewayID_Call) RunAndReturn(run func(context.Context, string) error) *Client_DeleteAllByGatewayID_Call
type Client_Delete_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 ¶
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 (_c *Client_GetGateway_Call) Return(_a0 *gateway.Gateway, _a1 error) *Client_GetGateway_Call
func (*Client_GetGateway_Call) Run ¶
func (_c *Client_GetGateway_Call) Run(run func(ctx context.Context, id string)) *Client_GetGateway_Call
func (*Client_GetGateway_Call) RunAndReturn ¶
func (_c *Client_GetGateway_Call) RunAndReturn(run func(context.Context, string) (*gateway.Gateway, error)) *Client_GetGateway_Call
type Client_GetTTLMap_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 (_c *Client_GetTTLMap_Call) Return(_a0 *cache.TTLMap) *Client_GetTTLMap_Call
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 ¶
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 ¶
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 (_c *Client_InvalidateAll_Call) Return(_a0 error) *Client_InvalidateAll_Call
func (*Client_InvalidateAll_Call) Run ¶
func (_c *Client_InvalidateAll_Call) Run(run func(ctx context.Context)) *Client_InvalidateAll_Call
func (*Client_InvalidateAll_Call) RunAndReturn ¶
func (_c *Client_InvalidateAll_Call) RunAndReturn(run func(context.Context) error) *Client_InvalidateAll_Call
type Client_RedisClient_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 (_c *Client_RedisClient_Call) Return(_a0 *redis.Client) *Client_RedisClient_Call
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 ¶
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 (_c *Client_SaveGateway_Call) Return(_a0 error) *Client_SaveGateway_Call
func (*Client_SaveGateway_Call) Run ¶
func (_c *Client_SaveGateway_Call) Run(run func(ctx context.Context, _a1 *gateway.Gateway)) *Client_SaveGateway_Call
func (*Client_SaveGateway_Call) RunAndReturn ¶
func (_c *Client_SaveGateway_Call) RunAndReturn(run func(context.Context, *gateway.Gateway) error) *Client_SaveGateway_Call
type Client_Set_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 ¶
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 (_m *EventPublisher) EXPECT() *EventPublisher_Expecter
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 ¶
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 (_c *EventPublisher_Publish_Call) Return(_a0 error) *EventPublisher_Publish_Call
func (*EventPublisher_Publish_Call) Run ¶
func (_c *EventPublisher_Publish_Call) Run(run func(ctx context.Context, ev event.Event)) *EventPublisher_Publish_Call
func (*EventPublisher_Publish_Call) RunAndReturn ¶
func (_c *EventPublisher_Publish_Call) RunAndReturn(run func(context.Context, event.Event) error) *EventPublisher_Publish_Call