mocks

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentStoreMock

type DocumentStoreMock struct {
	mock.Mock
}

DocumentStoreMock - Mock of DocumentStoreInterface

func (*DocumentStoreMock) GetDocument

func (ds *DocumentStoreMock) GetDocument(ctx context.Context, ie interfaces.IncomingEventInterface) map[string]interface{}

Get - Get value from store, return with remaining time

type SenderMock

type SenderMock struct {
	mock.Mock
}

SenderMock - Mock of SenderInterface

func (*SenderMock) SendEvent

SendEvent - Send an event

type StoreMock

type StoreMock struct {
	mock.Mock
}

StoreMock - Mock of StoreInterface

func (*StoreMock) DataKey

DataKey - Generate DataKey with events and destination (Won't Mock)

func (*StoreMock) Enqueue

func (s *StoreMock) Enqueue(ctx context.Context, key string, value string, ttl time.Duration) (bool, error)

func (*StoreMock) Get

func (s *StoreMock) Get(ctx context.Context, key string) (string, bool, time.Duration, error)

Get - Get value from store, return with remaining time

func (*StoreMock) GetQueue

func (s *StoreMock) GetQueue(ctx context.Context, key string) ([]string, bool, time.Duration, error)

func (*StoreMock) Remove

func (s *StoreMock) Remove(ctx context.Context, key string) (bool, error)

Remove - Remove value for key

func (*StoreMock) Set

func (s *StoreMock) Set(ctx context.Context, key string, value string, ttl time.Duration) (bool, error)

Set - Set value into store with ttl

func (*StoreMock) Update

func (s *StoreMock) Update(ctx context.Context, key string, value string) (bool, error)

Update - Update value for key

type ThrottleMock

type ThrottleMock struct {
	mock.Mock
}

ThrottleMock - Mock ThrottleInterface

func (*ThrottleMock) CanTrigger

func (t *ThrottleMock) CanTrigger(ctx context.Context, id string, period time.Duration) (bool, time.Duration, error)

Jump to

Keyboard shortcuts

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