mocks

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFetcher

type EventFetcher struct {
	mock.Mock
}

EventFetcher is an autogenerated mock type for the EventFetcher type

func NewEventFetcher

func NewEventFetcher(t interface {
	mock.TestingT
	Cleanup(func())
}) *EventFetcher

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

func (_m *EventFetcher) EXPECT() *EventFetcher_Expecter

func (*EventFetcher) Events

func (_m *EventFetcher) Events() <-chan *streaming.Batch[interface{}]

Events provides a mock function with no fields

func (*EventFetcher) Start

func (_m *EventFetcher) Start(ctx context.Context, offset int64)

Start provides a mock function with given fields: ctx, offset

type EventFetcher_Events_Call

type EventFetcher_Events_Call struct {
	*mock.Call
}

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

func (*EventFetcher_Events_Call) Return

func (_c *EventFetcher_Events_Call) Return(_a0 <-chan *streaming.Batch[interface{}]) *EventFetcher_Events_Call

func (*EventFetcher_Events_Call) Run

func (*EventFetcher_Events_Call) RunAndReturn

func (_c *EventFetcher_Events_Call) RunAndReturn(run func() <-chan *streaming.Batch[interface{}]) *EventFetcher_Events_Call

type EventFetcher_Expecter

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

func (*EventFetcher_Expecter) Events

Events is a helper method to define mock.On call

func (*EventFetcher_Expecter) Start

func (_e *EventFetcher_Expecter) Start(ctx interface{}, offset interface{}) *EventFetcher_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context
  • offset int64

type EventFetcher_Start_Call

type EventFetcher_Start_Call struct {
	*mock.Call
}

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

func (*EventFetcher_Start_Call) Return

func (*EventFetcher_Start_Call) Run

func (_c *EventFetcher_Start_Call) Run(run func(ctx context.Context, offset int64)) *EventFetcher_Start_Call

func (*EventFetcher_Start_Call) RunAndReturn

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

NewStore creates a new instance of Store. 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 (*Store) ApplyBalanceDelta

func (_m *Store) ApplyBalanceDelta(ctx context.Context, partyID string, instrumentAdmin string, instrumentID string, delta string) error

ApplyBalanceDelta provides a mock function with given fields: ctx, partyID, instrumentAdmin, instrumentID, delta

func (*Store) ApplySupplyDelta

func (_m *Store) ApplySupplyDelta(ctx context.Context, instrumentAdmin string, instrumentID string, delta string) error

ApplySupplyDelta provides a mock function with given fields: ctx, instrumentAdmin, instrumentID, delta

func (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) InsertEvent

func (_m *Store) InsertEvent(ctx context.Context, event *indexer.ParsedEvent) (bool, error)

InsertEvent provides a mock function with given fields: ctx, event

func (*Store) InsertHolding

func (_m *Store) InsertHolding(ctx context.Context, h *indexer.HoldingChange) error

InsertHolding provides a mock function with given fields: ctx, h

func (*Store) InsertPendingOffer

func (_m *Store) InsertPendingOffer(ctx context.Context, offer *indexer.PendingOffer) error

InsertPendingOffer provides a mock function with given fields: ctx, offer

func (*Store) LatestOffset

func (_m *Store) LatestOffset(ctx context.Context) (int64, error)

LatestOffset provides a mock function with given fields: ctx

func (*Store) MarkOfferAccepted

func (_m *Store) MarkOfferAccepted(ctx context.Context, contractID string) error

MarkOfferAccepted provides a mock function with given fields: ctx, contractID

func (*Store) RunInTx

func (_m *Store) RunInTx(ctx context.Context, fn func(context.Context, engine.Store) error) error

RunInTx provides a mock function with given fields: ctx, fn

func (*Store) SaveOffset

func (_m *Store) SaveOffset(ctx context.Context, offset int64) error

SaveOffset provides a mock function with given fields: ctx, offset

func (*Store) TakeHolding

func (_m *Store) TakeHolding(ctx context.Context, contractID string) (indexer.HoldingChange, bool, error)

TakeHolding provides a mock function with given fields: ctx, contractID

func (*Store) UpsertToken

func (_m *Store) UpsertToken(ctx context.Context, token *indexer.Token) error

UpsertToken provides a mock function with given fields: ctx, token

type Store_ApplyBalanceDelta_Call

type Store_ApplyBalanceDelta_Call struct {
	*mock.Call
}

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

func (*Store_ApplyBalanceDelta_Call) Return

func (*Store_ApplyBalanceDelta_Call) Run

func (_c *Store_ApplyBalanceDelta_Call) Run(run func(ctx context.Context, partyID string, instrumentAdmin string, instrumentID string, delta string)) *Store_ApplyBalanceDelta_Call

func (*Store_ApplyBalanceDelta_Call) RunAndReturn

type Store_ApplySupplyDelta_Call

type Store_ApplySupplyDelta_Call struct {
	*mock.Call
}

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

func (*Store_ApplySupplyDelta_Call) Return

func (*Store_ApplySupplyDelta_Call) Run

func (_c *Store_ApplySupplyDelta_Call) Run(run func(ctx context.Context, instrumentAdmin string, instrumentID string, delta string)) *Store_ApplySupplyDelta_Call

func (*Store_ApplySupplyDelta_Call) RunAndReturn

type Store_Expecter

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

func (*Store_Expecter) ApplyBalanceDelta

func (_e *Store_Expecter) ApplyBalanceDelta(ctx interface{}, partyID interface{}, instrumentAdmin interface{}, instrumentID interface{}, delta interface{}) *Store_ApplyBalanceDelta_Call

ApplyBalanceDelta is a helper method to define mock.On call

  • ctx context.Context
  • partyID string
  • instrumentAdmin string
  • instrumentID string
  • delta string

func (*Store_Expecter) ApplySupplyDelta

func (_e *Store_Expecter) ApplySupplyDelta(ctx interface{}, instrumentAdmin interface{}, instrumentID interface{}, delta interface{}) *Store_ApplySupplyDelta_Call

ApplySupplyDelta is a helper method to define mock.On call

  • ctx context.Context
  • instrumentAdmin string
  • instrumentID string
  • delta string

func (*Store_Expecter) InsertEvent

func (_e *Store_Expecter) InsertEvent(ctx interface{}, event interface{}) *Store_InsertEvent_Call

InsertEvent is a helper method to define mock.On call

  • ctx context.Context
  • event *indexer.ParsedEvent

func (*Store_Expecter) InsertHolding

func (_e *Store_Expecter) InsertHolding(ctx interface{}, h interface{}) *Store_InsertHolding_Call

InsertHolding is a helper method to define mock.On call

  • ctx context.Context
  • h *indexer.HoldingChange

func (*Store_Expecter) InsertPendingOffer

func (_e *Store_Expecter) InsertPendingOffer(ctx interface{}, offer interface{}) *Store_InsertPendingOffer_Call

InsertPendingOffer is a helper method to define mock.On call

  • ctx context.Context
  • offer *indexer.PendingOffer

func (*Store_Expecter) LatestOffset

func (_e *Store_Expecter) LatestOffset(ctx interface{}) *Store_LatestOffset_Call

LatestOffset is a helper method to define mock.On call

  • ctx context.Context

func (*Store_Expecter) MarkOfferAccepted

func (_e *Store_Expecter) MarkOfferAccepted(ctx interface{}, contractID interface{}) *Store_MarkOfferAccepted_Call

MarkOfferAccepted is a helper method to define mock.On call

  • ctx context.Context
  • contractID string

func (*Store_Expecter) RunInTx

func (_e *Store_Expecter) RunInTx(ctx interface{}, fn interface{}) *Store_RunInTx_Call

RunInTx is a helper method to define mock.On call

  • ctx context.Context
  • fn func(context.Context , engine.Store) error

func (*Store_Expecter) SaveOffset

func (_e *Store_Expecter) SaveOffset(ctx interface{}, offset interface{}) *Store_SaveOffset_Call

SaveOffset is a helper method to define mock.On call

  • ctx context.Context
  • offset int64

func (*Store_Expecter) TakeHolding

func (_e *Store_Expecter) TakeHolding(ctx interface{}, contractID interface{}) *Store_TakeHolding_Call

TakeHolding is a helper method to define mock.On call

  • ctx context.Context
  • contractID string

func (*Store_Expecter) UpsertToken

func (_e *Store_Expecter) UpsertToken(ctx interface{}, token interface{}) *Store_UpsertToken_Call

UpsertToken is a helper method to define mock.On call

  • ctx context.Context
  • token *indexer.Token

type Store_InsertEvent_Call

type Store_InsertEvent_Call struct {
	*mock.Call
}

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

func (*Store_InsertEvent_Call) Return

func (_c *Store_InsertEvent_Call) Return(inserted bool, err error) *Store_InsertEvent_Call

func (*Store_InsertEvent_Call) Run

func (*Store_InsertEvent_Call) RunAndReturn

type Store_InsertHolding_Call

type Store_InsertHolding_Call struct {
	*mock.Call
}

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

func (*Store_InsertHolding_Call) Return

func (*Store_InsertHolding_Call) Run

func (*Store_InsertHolding_Call) RunAndReturn

type Store_InsertPendingOffer_Call

type Store_InsertPendingOffer_Call struct {
	*mock.Call
}

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

func (*Store_InsertPendingOffer_Call) Return

func (*Store_InsertPendingOffer_Call) Run

func (*Store_InsertPendingOffer_Call) RunAndReturn

type Store_LatestOffset_Call

type Store_LatestOffset_Call struct {
	*mock.Call
}

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

func (*Store_LatestOffset_Call) Return

func (*Store_LatestOffset_Call) Run

func (*Store_LatestOffset_Call) RunAndReturn

type Store_MarkOfferAccepted_Call

type Store_MarkOfferAccepted_Call struct {
	*mock.Call
}

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

func (*Store_MarkOfferAccepted_Call) Return

func (*Store_MarkOfferAccepted_Call) Run

func (*Store_MarkOfferAccepted_Call) RunAndReturn

type Store_RunInTx_Call

type Store_RunInTx_Call struct {
	*mock.Call
}

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

func (*Store_RunInTx_Call) Return

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

func (*Store_RunInTx_Call) Run

func (*Store_RunInTx_Call) RunAndReturn

type Store_SaveOffset_Call

type Store_SaveOffset_Call struct {
	*mock.Call
}

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

func (*Store_SaveOffset_Call) Return

func (*Store_SaveOffset_Call) Run

func (_c *Store_SaveOffset_Call) Run(run func(ctx context.Context, offset int64)) *Store_SaveOffset_Call

func (*Store_SaveOffset_Call) RunAndReturn

func (_c *Store_SaveOffset_Call) RunAndReturn(run func(context.Context, int64) error) *Store_SaveOffset_Call

type Store_TakeHolding_Call

type Store_TakeHolding_Call struct {
	*mock.Call
}

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

func (*Store_TakeHolding_Call) Return

func (*Store_TakeHolding_Call) Run

func (_c *Store_TakeHolding_Call) Run(run func(ctx context.Context, contractID string)) *Store_TakeHolding_Call

func (*Store_TakeHolding_Call) RunAndReturn

type Store_UpsertToken_Call

type Store_UpsertToken_Call struct {
	*mock.Call
}

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

func (*Store_UpsertToken_Call) Return

func (*Store_UpsertToken_Call) Run

func (*Store_UpsertToken_Call) RunAndReturn

Jump to

Keyboard shortcuts

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