persistencemocks

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Persistence

type Persistence struct {
	mock.Mock
}

Persistence is an autogenerated mock type for the Persistence type

func NewPersistence added in v1.2.1

func NewPersistence(t interface {
	mock.TestingT
	Cleanup(func())
}) *Persistence

NewPersistence creates a new instance of Persistence. 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 (*Persistence) AddSubStatusAction added in v1.3.0

func (_m *Persistence) AddSubStatusAction(ctx context.Context, txID string, subStatus apitypes.TxSubStatus, action apitypes.TxAction, info *fftypes.JSONAny, err *fftypes.JSONAny) error

AddSubStatusAction provides a mock function with given fields: ctx, txID, subStatus, action, info, err

func (*Persistence) AddTransactionConfirmations added in v1.3.0

func (_m *Persistence) AddTransactionConfirmations(ctx context.Context, txID string, clearExisting bool, confirmations ...*apitypes.Confirmation) error

AddTransactionConfirmations provides a mock function with given fields: ctx, txID, clearExisting, confirmations

func (*Persistence) Close

func (_m *Persistence) Close(ctx context.Context)

Close provides a mock function with given fields: ctx

func (*Persistence) DeleteCheckpoint

func (_m *Persistence) DeleteCheckpoint(ctx context.Context, streamID *fftypes.UUID) error

DeleteCheckpoint provides a mock function with given fields: ctx, streamID

func (*Persistence) DeleteListener

func (_m *Persistence) DeleteListener(ctx context.Context, listenerID *fftypes.UUID) error

DeleteListener provides a mock function with given fields: ctx, listenerID

func (*Persistence) DeleteStream

func (_m *Persistence) DeleteStream(ctx context.Context, streamID *fftypes.UUID) error

DeleteStream provides a mock function with given fields: ctx, streamID

func (*Persistence) DeleteTransaction

func (_m *Persistence) DeleteTransaction(ctx context.Context, txID string) error

DeleteTransaction provides a mock function with given fields: ctx, txID

func (*Persistence) GetCheckpoint

func (_m *Persistence) GetCheckpoint(ctx context.Context, streamID *fftypes.UUID) (*apitypes.EventStreamCheckpoint, error)

GetCheckpoint provides a mock function with given fields: ctx, streamID

func (*Persistence) GetListener

func (_m *Persistence) GetListener(ctx context.Context, listenerID *fftypes.UUID) (*apitypes.Listener, error)

GetListener provides a mock function with given fields: ctx, listenerID

func (*Persistence) GetStream

func (_m *Persistence) GetStream(ctx context.Context, streamID *fftypes.UUID) (*apitypes.EventStream, error)

GetStream provides a mock function with given fields: ctx, streamID

func (*Persistence) GetTransactionByID

func (_m *Persistence) GetTransactionByID(ctx context.Context, txID string) (*apitypes.ManagedTX, error)

GetTransactionByID provides a mock function with given fields: ctx, txID

func (*Persistence) GetTransactionByIDWithStatus added in v1.3.0

func (_m *Persistence) GetTransactionByIDWithStatus(ctx context.Context, txID string, history bool) (*apitypes.TXWithStatus, error)

GetTransactionByIDWithStatus provides a mock function with given fields: ctx, txID, history

func (*Persistence) GetTransactionByNonce

func (_m *Persistence) GetTransactionByNonce(ctx context.Context, signer string, nonce *fftypes.FFBigInt) (*apitypes.ManagedTX, error)

GetTransactionByNonce provides a mock function with given fields: ctx, signer, nonce

func (*Persistence) GetTransactionConfirmations added in v1.3.0

func (_m *Persistence) GetTransactionConfirmations(ctx context.Context, txID string) ([]*apitypes.Confirmation, error)

GetTransactionConfirmations provides a mock function with given fields: ctx, txID

func (*Persistence) GetTransactionReceipt added in v1.3.0

func (_m *Persistence) GetTransactionReceipt(ctx context.Context, txID string) (*ffcapi.TransactionReceiptResponse, error)

GetTransactionReceipt provides a mock function with given fields: ctx, txID

func (*Persistence) InsertTransactionPreAssignedNonce added in v1.3.1

func (_m *Persistence) InsertTransactionPreAssignedNonce(ctx context.Context, tx *apitypes.ManagedTX) error

InsertTransactionPreAssignedNonce provides a mock function with given fields: ctx, tx

func (*Persistence) InsertTransactionWithNextNonce added in v1.3.0

func (_m *Persistence) InsertTransactionWithNextNonce(ctx context.Context, tx *apitypes.ManagedTX, lookupNextNonce txhandler.NextNonceCallback) error

InsertTransactionWithNextNonce provides a mock function with given fields: ctx, tx, lookupNextNonce

func (*Persistence) ListListenersByCreateTime added in v1.3.0

func (_m *Persistence) ListListenersByCreateTime(ctx context.Context, after *fftypes.UUID, limit int, dir txhandler.SortDirection) ([]*apitypes.Listener, error)

ListListenersByCreateTime provides a mock function with given fields: ctx, after, limit, dir

func (*Persistence) ListStreamListenersByCreateTime added in v1.3.0

func (_m *Persistence) ListStreamListenersByCreateTime(ctx context.Context, after *fftypes.UUID, limit int, dir txhandler.SortDirection, streamID *fftypes.UUID) ([]*apitypes.Listener, error)

ListStreamListenersByCreateTime provides a mock function with given fields: ctx, after, limit, dir, streamID

func (*Persistence) ListStreamsByCreateTime added in v1.3.0

func (_m *Persistence) ListStreamsByCreateTime(ctx context.Context, after *fftypes.UUID, limit int, dir txhandler.SortDirection) ([]*apitypes.EventStream, error)

ListStreamsByCreateTime provides a mock function with given fields: ctx, after, limit, dir

func (*Persistence) ListTransactionsByCreateTime

func (_m *Persistence) ListTransactionsByCreateTime(ctx context.Context, after *apitypes.ManagedTX, limit int, dir txhandler.SortDirection) ([]*apitypes.ManagedTX, error)

ListTransactionsByCreateTime provides a mock function with given fields: ctx, after, limit, dir

func (*Persistence) ListTransactionsByNonce

func (_m *Persistence) ListTransactionsByNonce(ctx context.Context, signer string, after *fftypes.FFBigInt, limit int, dir txhandler.SortDirection) ([]*apitypes.ManagedTX, error)

ListTransactionsByNonce provides a mock function with given fields: ctx, signer, after, limit, dir

func (*Persistence) ListTransactionsPending

func (_m *Persistence) ListTransactionsPending(ctx context.Context, afterSequenceID string, limit int, dir txhandler.SortDirection) ([]*apitypes.ManagedTX, error)

ListTransactionsPending provides a mock function with given fields: ctx, afterSequenceID, limit, dir

func (*Persistence) RichQuery added in v1.3.0

func (_m *Persistence) RichQuery() persistence.RichQuery

RichQuery provides a mock function with given fields:

func (*Persistence) SetTransactionReceipt added in v1.3.0

func (_m *Persistence) SetTransactionReceipt(ctx context.Context, txID string, receipt *ffcapi.TransactionReceiptResponse) error

SetTransactionReceipt provides a mock function with given fields: ctx, txID, receipt

func (*Persistence) UpdateTransaction added in v1.3.0

func (_m *Persistence) UpdateTransaction(ctx context.Context, txID string, updates *apitypes.TXUpdates) error

UpdateTransaction provides a mock function with given fields: ctx, txID, updates

func (*Persistence) WriteCheckpoint

func (_m *Persistence) WriteCheckpoint(ctx context.Context, checkpoint *apitypes.EventStreamCheckpoint) error

WriteCheckpoint provides a mock function with given fields: ctx, checkpoint

func (*Persistence) WriteListener

func (_m *Persistence) WriteListener(ctx context.Context, spec *apitypes.Listener) error

WriteListener provides a mock function with given fields: ctx, spec

func (*Persistence) WriteStream

func (_m *Persistence) WriteStream(ctx context.Context, spec *apitypes.EventStream) error

WriteStream provides a mock function with given fields: ctx, spec

type RichQuery added in v1.3.0

type RichQuery struct {
	mock.Mock
}

RichQuery is an autogenerated mock type for the RichQuery type

func NewRichQuery added in v1.3.0

func NewRichQuery(t interface {
	mock.TestingT
	Cleanup(func())
}) *RichQuery

NewRichQuery creates a new instance of RichQuery. 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 (*RichQuery) ListListeners added in v1.3.0

func (_m *RichQuery) ListListeners(ctx context.Context, filter ffapi.AndFilter) ([]*apitypes.Listener, *ffapi.FilterResult, error)

ListListeners provides a mock function with given fields: ctx, filter

func (*RichQuery) ListStreamListeners added in v1.3.0

func (_m *RichQuery) ListStreamListeners(ctx context.Context, streamID *fftypes.UUID, filter ffapi.AndFilter) ([]*apitypes.Listener, *ffapi.FilterResult, error)

ListStreamListeners provides a mock function with given fields: ctx, streamID, filter

func (*RichQuery) ListStreams added in v1.3.0

func (_m *RichQuery) ListStreams(ctx context.Context, filter ffapi.AndFilter) ([]*apitypes.EventStream, *ffapi.FilterResult, error)

ListStreams provides a mock function with given fields: ctx, filter

func (*RichQuery) ListTransactionConfirmations added in v1.3.0

func (_m *RichQuery) ListTransactionConfirmations(ctx context.Context, txID string, filter ffapi.AndFilter) ([]*apitypes.ConfirmationRecord, *ffapi.FilterResult, error)

ListTransactionConfirmations provides a mock function with given fields: ctx, txID, filter

func (*RichQuery) ListTransactionHistory added in v1.3.0

func (_m *RichQuery) ListTransactionHistory(ctx context.Context, txID string, filter ffapi.AndFilter) ([]*apitypes.TXHistoryRecord, *ffapi.FilterResult, error)

ListTransactionHistory provides a mock function with given fields: ctx, txID, filter

func (*RichQuery) ListTransactions added in v1.3.0

func (_m *RichQuery) ListTransactions(ctx context.Context, filter ffapi.AndFilter) ([]*apitypes.ManagedTX, *ffapi.FilterResult, error)

ListTransactions provides a mock function with given fields: ctx, filter

func (*RichQuery) NewConfirmationFilter added in v1.3.0

func (_m *RichQuery) NewConfirmationFilter(ctx context.Context) ffapi.FilterBuilder

NewConfirmationFilter provides a mock function with given fields: ctx

func (*RichQuery) NewListenerFilter added in v1.3.0

func (_m *RichQuery) NewListenerFilter(ctx context.Context) ffapi.FilterBuilder

NewListenerFilter provides a mock function with given fields: ctx

func (*RichQuery) NewStreamFilter added in v1.3.0

func (_m *RichQuery) NewStreamFilter(ctx context.Context) ffapi.FilterBuilder

NewStreamFilter provides a mock function with given fields: ctx

func (*RichQuery) NewTransactionFilter added in v1.3.0

func (_m *RichQuery) NewTransactionFilter(ctx context.Context) ffapi.FilterBuilder

NewTransactionFilter provides a mock function with given fields: ctx

func (*RichQuery) NewTxHistoryFilter added in v1.3.0

func (_m *RichQuery) NewTxHistoryFilter(ctx context.Context) ffapi.FilterBuilder

NewTxHistoryFilter provides a mock function with given fields: ctx

type TransactionPersistence added in v1.2.4

type TransactionPersistence struct {
	mock.Mock
}

TransactionPersistence is an autogenerated mock type for the TransactionPersistence type

func NewTransactionPersistence added in v1.2.4

func NewTransactionPersistence(t interface {
	mock.TestingT
	Cleanup(func())
}) *TransactionPersistence

NewTransactionPersistence creates a new instance of TransactionPersistence. 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 (*TransactionPersistence) AddTransactionConfirmations added in v1.3.0

func (_m *TransactionPersistence) AddTransactionConfirmations(ctx context.Context, txID string, clearExisting bool, confirmations ...*apitypes.Confirmation) error

AddTransactionConfirmations provides a mock function with given fields: ctx, txID, clearExisting, confirmations

func (*TransactionPersistence) DeleteTransaction added in v1.2.4

func (_m *TransactionPersistence) DeleteTransaction(ctx context.Context, txID string) error

DeleteTransaction provides a mock function with given fields: ctx, txID

func (*TransactionPersistence) GetTransactionByID added in v1.2.4

func (_m *TransactionPersistence) GetTransactionByID(ctx context.Context, txID string) (*apitypes.ManagedTX, error)

GetTransactionByID provides a mock function with given fields: ctx, txID

func (*TransactionPersistence) GetTransactionByIDWithStatus added in v1.3.0

func (_m *TransactionPersistence) GetTransactionByIDWithStatus(ctx context.Context, txID string, history bool) (*apitypes.TXWithStatus, error)

GetTransactionByIDWithStatus provides a mock function with given fields: ctx, txID, history

func (*TransactionPersistence) GetTransactionByNonce added in v1.2.4

func (_m *TransactionPersistence) GetTransactionByNonce(ctx context.Context, signer string, nonce *fftypes.FFBigInt) (*apitypes.ManagedTX, error)

GetTransactionByNonce provides a mock function with given fields: ctx, signer, nonce

func (*TransactionPersistence) GetTransactionConfirmations added in v1.3.0

func (_m *TransactionPersistence) GetTransactionConfirmations(ctx context.Context, txID string) ([]*apitypes.Confirmation, error)

GetTransactionConfirmations provides a mock function with given fields: ctx, txID

func (*TransactionPersistence) GetTransactionReceipt added in v1.3.0

func (_m *TransactionPersistence) GetTransactionReceipt(ctx context.Context, txID string) (*ffcapi.TransactionReceiptResponse, error)

GetTransactionReceipt provides a mock function with given fields: ctx, txID

func (*TransactionPersistence) InsertTransactionPreAssignedNonce added in v1.3.1

func (_m *TransactionPersistence) InsertTransactionPreAssignedNonce(ctx context.Context, tx *apitypes.ManagedTX) error

InsertTransactionPreAssignedNonce provides a mock function with given fields: ctx, tx

func (*TransactionPersistence) InsertTransactionWithNextNonce added in v1.3.0

func (_m *TransactionPersistence) InsertTransactionWithNextNonce(ctx context.Context, tx *apitypes.ManagedTX, lookupNextNonce txhandler.NextNonceCallback) error

InsertTransactionWithNextNonce provides a mock function with given fields: ctx, tx, lookupNextNonce

func (*TransactionPersistence) ListTransactionsByCreateTime added in v1.2.4

func (_m *TransactionPersistence) ListTransactionsByCreateTime(ctx context.Context, after *apitypes.ManagedTX, limit int, dir txhandler.SortDirection) ([]*apitypes.ManagedTX, error)

ListTransactionsByCreateTime provides a mock function with given fields: ctx, after, limit, dir

func (*TransactionPersistence) ListTransactionsByNonce added in v1.2.4

func (_m *TransactionPersistence) ListTransactionsByNonce(ctx context.Context, signer string, after *fftypes.FFBigInt, limit int, dir txhandler.SortDirection) ([]*apitypes.ManagedTX, error)

ListTransactionsByNonce provides a mock function with given fields: ctx, signer, after, limit, dir

func (*TransactionPersistence) ListTransactionsPending added in v1.2.4

func (_m *TransactionPersistence) ListTransactionsPending(ctx context.Context, afterSequenceID string, limit int, dir txhandler.SortDirection) ([]*apitypes.ManagedTX, error)

ListTransactionsPending provides a mock function with given fields: ctx, afterSequenceID, limit, dir

func (*TransactionPersistence) SetTransactionReceipt added in v1.3.0

func (_m *TransactionPersistence) SetTransactionReceipt(ctx context.Context, txID string, receipt *ffcapi.TransactionReceiptResponse) error

SetTransactionReceipt provides a mock function with given fields: ctx, txID, receipt

func (*TransactionPersistence) UpdateTransaction added in v1.3.0

func (_m *TransactionPersistence) UpdateTransaction(ctx context.Context, txID string, updates *apitypes.TXUpdates) error

UpdateTransaction provides a mock function with given fields: ctx, txID, updates

Jump to

Keyboard shortcuts

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