databasemocks

package
v0.0.0-...-93e01a0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 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 Callbacks

type Callbacks struct {
	mock.Mock
}

Callbacks is an autogenerated mock type for the Callbacks type

func (*Callbacks) HashCollectionNSEvent

func (_m *Callbacks) HashCollectionNSEvent(resType database.HashCollectionNS, eventType fftypes.ChangeEventType, ns string, hash *fftypes.Bytes32)

HashCollectionNSEvent provides a mock function with given fields: resType, eventType, ns, hash

func (*Callbacks) OrderedCollectionEvent

func (_m *Callbacks) OrderedCollectionEvent(resType database.OrderedCollection, eventType fftypes.ChangeEventType, sequence int64)

OrderedCollectionEvent provides a mock function with given fields: resType, eventType, sequence

func (*Callbacks) OrderedUUIDCollectionNSEvent

func (_m *Callbacks) OrderedUUIDCollectionNSEvent(resType database.OrderedUUIDCollectionNS, eventType fftypes.ChangeEventType, ns string, id *fftypes.UUID, sequence int64)

OrderedUUIDCollectionNSEvent provides a mock function with given fields: resType, eventType, ns, id, sequence

func (*Callbacks) UUIDCollectionEvent

func (_m *Callbacks) UUIDCollectionEvent(resType database.UUIDCollection, eventType fftypes.ChangeEventType, id *fftypes.UUID)

UUIDCollectionEvent provides a mock function with given fields: resType, eventType, id

func (*Callbacks) UUIDCollectionNSEvent

func (_m *Callbacks) UUIDCollectionNSEvent(resType database.UUIDCollectionNS, eventType fftypes.ChangeEventType, ns string, id *fftypes.UUID)

UUIDCollectionNSEvent provides a mock function with given fields: resType, eventType, ns, id

type Plugin

type Plugin struct {
	mock.Mock
}

Plugin is an autogenerated mock type for the Plugin type

func (*Plugin) Capabilities

func (_m *Plugin) Capabilities() *database.Capabilities

Capabilities provides a mock function with given fields:

func (*Plugin) DeleteBlob

func (_m *Plugin) DeleteBlob(ctx context.Context, sequence int64) error

DeleteBlob provides a mock function with given fields: ctx, sequence

func (*Plugin) DeleteConfigRecord

func (_m *Plugin) DeleteConfigRecord(ctx context.Context, key string) error

DeleteConfigRecord provides a mock function with given fields: ctx, key

func (*Plugin) DeleteNamespace

func (_m *Plugin) DeleteNamespace(ctx context.Context, id *fftypes.UUID) error

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

func (*Plugin) DeleteNextPin

func (_m *Plugin) DeleteNextPin(ctx context.Context, sequence int64) error

DeleteNextPin provides a mock function with given fields: ctx, sequence

func (*Plugin) DeleteNonce

func (_m *Plugin) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) error

DeleteNonce provides a mock function with given fields: ctx, hash

func (*Plugin) DeleteOffset

func (_m *Plugin) DeleteOffset(ctx context.Context, t fftypes.FFEnum, name string) error

DeleteOffset provides a mock function with given fields: ctx, t, name

func (*Plugin) DeletePin

func (_m *Plugin) DeletePin(ctx context.Context, sequence int64) error

DeletePin provides a mock function with given fields: ctx, sequence

func (*Plugin) DeleteSubscriptionByID

func (_m *Plugin) DeleteSubscriptionByID(ctx context.Context, id *fftypes.UUID) error

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

func (*Plugin) GetBatchByID

func (_m *Plugin) GetBatchByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Batch, error)

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

func (*Plugin) GetBatches

func (_m *Plugin) GetBatches(ctx context.Context, filter database.Filter) ([]*fftypes.Batch, *database.FilterResult, error)

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

func (*Plugin) GetBlobMatchingHash

func (_m *Plugin) GetBlobMatchingHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Blob, error)

GetBlobMatchingHash provides a mock function with given fields: ctx, hash

func (*Plugin) GetBlobs

func (_m *Plugin) GetBlobs(ctx context.Context, filter database.Filter) ([]*fftypes.Blob, *database.FilterResult, error)

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

func (*Plugin) GetConfigRecord

func (_m *Plugin) GetConfigRecord(ctx context.Context, key string) (*fftypes.ConfigRecord, error)

GetConfigRecord provides a mock function with given fields: ctx, key

func (*Plugin) GetConfigRecords

func (_m *Plugin) GetConfigRecords(ctx context.Context, filter database.Filter) ([]*fftypes.ConfigRecord, *database.FilterResult, error)

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

func (*Plugin) GetData

func (_m *Plugin) GetData(ctx context.Context, filter database.Filter) ([]*fftypes.Data, *database.FilterResult, error)

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

func (*Plugin) GetDataByID

func (_m *Plugin) GetDataByID(ctx context.Context, id *fftypes.UUID, withValue bool) (*fftypes.Data, error)

GetDataByID provides a mock function with given fields: ctx, id, withValue

func (*Plugin) GetDataRefs

func (_m *Plugin) GetDataRefs(ctx context.Context, filter database.Filter) (fftypes.DataRefs, *database.FilterResult, error)

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

func (*Plugin) GetDatatypeByID

func (_m *Plugin) GetDatatypeByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Datatype, error)

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

func (*Plugin) GetDatatypeByName

func (_m *Plugin) GetDatatypeByName(ctx context.Context, ns string, name string, version string) (*fftypes.Datatype, error)

GetDatatypeByName provides a mock function with given fields: ctx, ns, name, version

func (*Plugin) GetDatatypes

func (_m *Plugin) GetDatatypes(ctx context.Context, filter database.Filter) ([]*fftypes.Datatype, *database.FilterResult, error)

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

func (*Plugin) GetEventByID

func (_m *Plugin) GetEventByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Event, error)

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

func (*Plugin) GetEvents

func (_m *Plugin) GetEvents(ctx context.Context, filter database.Filter) ([]*fftypes.Event, *database.FilterResult, error)

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

func (*Plugin) GetGroupByHash

func (_m *Plugin) GetGroupByHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Group, error)

GetGroupByHash provides a mock function with given fields: ctx, hash

func (*Plugin) GetGroups

func (_m *Plugin) GetGroups(ctx context.Context, filter database.Filter) ([]*fftypes.Group, *database.FilterResult, error)

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

func (*Plugin) GetMessageByID

func (_m *Plugin) GetMessageByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Message, error)

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

func (*Plugin) GetMessageRefs

func (_m *Plugin) GetMessageRefs(ctx context.Context, filter database.Filter) ([]*fftypes.MessageRef, *database.FilterResult, error)

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

func (*Plugin) GetMessages

func (_m *Plugin) GetMessages(ctx context.Context, filter database.Filter) ([]*fftypes.Message, *database.FilterResult, error)

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

func (*Plugin) GetMessagesForData

func (_m *Plugin) GetMessagesForData(ctx context.Context, dataID *fftypes.UUID, filter database.Filter) ([]*fftypes.Message, *database.FilterResult, error)

GetMessagesForData provides a mock function with given fields: ctx, dataID, filter

func (*Plugin) GetNamespace

func (_m *Plugin) GetNamespace(ctx context.Context, name string) (*fftypes.Namespace, error)

GetNamespace provides a mock function with given fields: ctx, name

func (*Plugin) GetNamespaces

func (_m *Plugin) GetNamespaces(ctx context.Context, filter database.Filter) ([]*fftypes.Namespace, *database.FilterResult, error)

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

func (*Plugin) GetNextPinByContextAndIdentity

func (_m *Plugin) GetNextPinByContextAndIdentity(ctx context.Context, _a1 *fftypes.Bytes32, identity string) (*fftypes.NextPin, error)

GetNextPinByContextAndIdentity provides a mock function with given fields: ctx, _a1, identity

func (*Plugin) GetNextPinByHash

func (_m *Plugin) GetNextPinByHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.NextPin, error)

GetNextPinByHash provides a mock function with given fields: ctx, hash

func (*Plugin) GetNextPins

func (_m *Plugin) GetNextPins(ctx context.Context, filter database.Filter) ([]*fftypes.NextPin, *database.FilterResult, error)

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

func (*Plugin) GetNode

func (_m *Plugin) GetNode(ctx context.Context, owner string, name string) (*fftypes.Node, error)

GetNode provides a mock function with given fields: ctx, owner, name

func (*Plugin) GetNodeByID

func (_m *Plugin) GetNodeByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Node, error)

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

func (*Plugin) GetNodes

func (_m *Plugin) GetNodes(ctx context.Context, filter database.Filter) ([]*fftypes.Node, *database.FilterResult, error)

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

func (*Plugin) GetNonce

func (_m *Plugin) GetNonce(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Nonce, error)

GetNonce provides a mock function with given fields: ctx, hash

func (*Plugin) GetNonces

func (_m *Plugin) GetNonces(ctx context.Context, filter database.Filter) ([]*fftypes.Nonce, *database.FilterResult, error)

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

func (*Plugin) GetOffset

func (_m *Plugin) GetOffset(ctx context.Context, t fftypes.FFEnum, name string) (*fftypes.Offset, error)

GetOffset provides a mock function with given fields: ctx, t, name

func (*Plugin) GetOffsets

func (_m *Plugin) GetOffsets(ctx context.Context, filter database.Filter) ([]*fftypes.Offset, *database.FilterResult, error)

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

func (*Plugin) GetOperationByID

func (_m *Plugin) GetOperationByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Operation, error)

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

func (*Plugin) GetOperations

func (_m *Plugin) GetOperations(ctx context.Context, filter database.Filter) ([]*fftypes.Operation, *database.FilterResult, error)

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

func (*Plugin) GetOrganizationByID

func (_m *Plugin) GetOrganizationByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Organization, error)

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

func (*Plugin) GetOrganizationByIdentity

func (_m *Plugin) GetOrganizationByIdentity(ctx context.Context, identity string) (*fftypes.Organization, error)

GetOrganizationByIdentity provides a mock function with given fields: ctx, identity

func (*Plugin) GetOrganizationByName

func (_m *Plugin) GetOrganizationByName(ctx context.Context, name string) (*fftypes.Organization, error)

GetOrganizationByName provides a mock function with given fields: ctx, name

func (*Plugin) GetOrganizations

func (_m *Plugin) GetOrganizations(ctx context.Context, filter database.Filter) ([]*fftypes.Organization, *database.FilterResult, error)

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

func (*Plugin) GetPins

func (_m *Plugin) GetPins(ctx context.Context, filter database.Filter) ([]*fftypes.Pin, *database.FilterResult, error)

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

func (*Plugin) GetSubscriptionByID

func (_m *Plugin) GetSubscriptionByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Subscription, error)

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

func (*Plugin) GetSubscriptionByName

func (_m *Plugin) GetSubscriptionByName(ctx context.Context, ns string, name string) (*fftypes.Subscription, error)

GetSubscriptionByName provides a mock function with given fields: ctx, ns, name

func (*Plugin) GetSubscriptions

func (_m *Plugin) GetSubscriptions(ctx context.Context, filter database.Filter) ([]*fftypes.Subscription, *database.FilterResult, error)

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

func (*Plugin) GetTokenAccount

func (_m *Plugin) GetTokenAccount(ctx context.Context, protocolID string, tokenIndex string, identity string) (*fftypes.TokenAccount, error)

GetTokenAccount provides a mock function with given fields: ctx, protocolID, tokenIndex, identity

func (*Plugin) GetTokenAccounts

func (_m *Plugin) GetTokenAccounts(ctx context.Context, filter database.Filter) ([]*fftypes.TokenAccount, *database.FilterResult, error)

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

func (*Plugin) GetTokenPool

func (_m *Plugin) GetTokenPool(ctx context.Context, ns string, name string) (*fftypes.TokenPool, error)

GetTokenPool provides a mock function with given fields: ctx, ns, name

func (*Plugin) GetTokenPoolByID

func (_m *Plugin) GetTokenPoolByID(ctx context.Context, id *fftypes.UUID) (*fftypes.TokenPool, error)

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

func (*Plugin) GetTokenPoolByProtocolID

func (_m *Plugin) GetTokenPoolByProtocolID(ctx context.Context, id string) (*fftypes.TokenPool, error)

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

func (*Plugin) GetTokenPools

func (_m *Plugin) GetTokenPools(ctx context.Context, filter database.Filter) ([]*fftypes.TokenPool, *database.FilterResult, error)

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

func (*Plugin) GetTransactionByID

func (_m *Plugin) GetTransactionByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Transaction, error)

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

func (*Plugin) GetTransactions

func (_m *Plugin) GetTransactions(ctx context.Context, filter database.Filter) ([]*fftypes.Transaction, *database.FilterResult, error)

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

func (*Plugin) Init

func (_m *Plugin) Init(ctx context.Context, prefix config.Prefix, callbacks database.Callbacks) error

Init provides a mock function with given fields: ctx, prefix, callbacks

func (*Plugin) InitPrefix

func (_m *Plugin) InitPrefix(prefix config.Prefix)

InitPrefix provides a mock function with given fields: prefix

func (*Plugin) InsertBlob

func (_m *Plugin) InsertBlob(ctx context.Context, blob *fftypes.Blob) error

InsertBlob provides a mock function with given fields: ctx, blob

func (*Plugin) InsertEvent

func (_m *Plugin) InsertEvent(ctx context.Context, data *fftypes.Event) error

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

func (*Plugin) InsertMessageLocal

func (_m *Plugin) InsertMessageLocal(ctx context.Context, message *fftypes.Message) error

InsertMessageLocal provides a mock function with given fields: ctx, message

func (*Plugin) InsertNextPin

func (_m *Plugin) InsertNextPin(ctx context.Context, nextpin *fftypes.NextPin) error

InsertNextPin provides a mock function with given fields: ctx, nextpin

func (*Plugin) Name

func (_m *Plugin) Name() string

Name provides a mock function with given fields:

func (*Plugin) RunAsGroup

func (_m *Plugin) RunAsGroup(ctx context.Context, fn func(context.Context) error) error

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

func (*Plugin) SetPinDispatched

func (_m *Plugin) SetPinDispatched(ctx context.Context, sequence int64) error

SetPinDispatched provides a mock function with given fields: ctx, sequence

func (*Plugin) UpdateBatch

func (_m *Plugin) UpdateBatch(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateBatch provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateData

func (_m *Plugin) UpdateData(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateData provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateDatatype

func (_m *Plugin) UpdateDatatype(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateDatatype provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateEvent

func (_m *Plugin) UpdateEvent(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateEvent provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateGroup

func (_m *Plugin) UpdateGroup(ctx context.Context, hash *fftypes.Bytes32, update database.Update) error

UpdateGroup provides a mock function with given fields: ctx, hash, update

func (*Plugin) UpdateMessage

func (_m *Plugin) UpdateMessage(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateMessage provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateMessages

func (_m *Plugin) UpdateMessages(ctx context.Context, filter database.Filter, update database.Update) error

UpdateMessages provides a mock function with given fields: ctx, filter, update

func (*Plugin) UpdateNextPin

func (_m *Plugin) UpdateNextPin(ctx context.Context, sequence int64, update database.Update) error

UpdateNextPin provides a mock function with given fields: ctx, sequence, update

func (*Plugin) UpdateNode

func (_m *Plugin) UpdateNode(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateNode provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateOffset

func (_m *Plugin) UpdateOffset(ctx context.Context, rowID int64, update database.Update) error

UpdateOffset provides a mock function with given fields: ctx, rowID, update

func (*Plugin) UpdateOperation

func (_m *Plugin) UpdateOperation(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateOperation provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateOrganization

func (_m *Plugin) UpdateOrganization(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateOrganization provides a mock function with given fields: ctx, id, update

func (*Plugin) UpdateSubscription

func (_m *Plugin) UpdateSubscription(ctx context.Context, ns string, name string, update database.Update) error

UpdateSubscription provides a mock function with given fields: ctx, ns, name, update

func (*Plugin) UpdateTransaction

func (_m *Plugin) UpdateTransaction(ctx context.Context, id *fftypes.UUID, update database.Update) error

UpdateTransaction provides a mock function with given fields: ctx, id, update

func (*Plugin) UpsertBatch

func (_m *Plugin) UpsertBatch(ctx context.Context, data *fftypes.Batch, allowHashUpdate bool) error

UpsertBatch provides a mock function with given fields: ctx, data, allowHashUpdate

func (*Plugin) UpsertConfigRecord

func (_m *Plugin) UpsertConfigRecord(ctx context.Context, data *fftypes.ConfigRecord, allowExisting bool) error

UpsertConfigRecord provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertData

func (_m *Plugin) UpsertData(ctx context.Context, data *fftypes.Data, allowExisting bool, allowHashUpdate bool) error

UpsertData provides a mock function with given fields: ctx, data, allowExisting, allowHashUpdate

func (*Plugin) UpsertDatatype

func (_m *Plugin) UpsertDatatype(ctx context.Context, datadef *fftypes.Datatype, allowExisting bool) error

UpsertDatatype provides a mock function with given fields: ctx, datadef, allowExisting

func (*Plugin) UpsertGroup

func (_m *Plugin) UpsertGroup(ctx context.Context, data *fftypes.Group, allowExisting bool) error

UpsertGroup provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertMessage

func (_m *Plugin) UpsertMessage(ctx context.Context, message *fftypes.Message, allowExisting bool, allowHashUpdate bool) error

UpsertMessage provides a mock function with given fields: ctx, message, allowExisting, allowHashUpdate

func (*Plugin) UpsertNamespace

func (_m *Plugin) UpsertNamespace(ctx context.Context, data *fftypes.Namespace, allowExisting bool) error

UpsertNamespace provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertNode

func (_m *Plugin) UpsertNode(ctx context.Context, data *fftypes.Node, allowExisting bool) error

UpsertNode provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertNonceNext

func (_m *Plugin) UpsertNonceNext(ctx context.Context, _a1 *fftypes.Nonce) error

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

func (*Plugin) UpsertOffset

func (_m *Plugin) UpsertOffset(ctx context.Context, data *fftypes.Offset, allowExisting bool) error

UpsertOffset provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertOperation

func (_m *Plugin) UpsertOperation(ctx context.Context, operation *fftypes.Operation, allowExisting bool) error

UpsertOperation provides a mock function with given fields: ctx, operation, allowExisting

func (*Plugin) UpsertOrganization

func (_m *Plugin) UpsertOrganization(ctx context.Context, data *fftypes.Organization, allowExisting bool) error

UpsertOrganization provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertPin

func (_m *Plugin) UpsertPin(ctx context.Context, parked *fftypes.Pin) error

UpsertPin provides a mock function with given fields: ctx, parked

func (*Plugin) UpsertSubscription

func (_m *Plugin) UpsertSubscription(ctx context.Context, data *fftypes.Subscription, allowExisting bool) error

UpsertSubscription provides a mock function with given fields: ctx, data, allowExisting

func (*Plugin) UpsertTokenAccount

func (_m *Plugin) UpsertTokenAccount(ctx context.Context, account *fftypes.TokenAccount) error

UpsertTokenAccount provides a mock function with given fields: ctx, account

func (*Plugin) UpsertTokenPool

func (_m *Plugin) UpsertTokenPool(ctx context.Context, pool *fftypes.TokenPool) error

UpsertTokenPool provides a mock function with given fields: ctx, pool

func (*Plugin) UpsertTransaction

func (_m *Plugin) UpsertTransaction(ctx context.Context, data *fftypes.Transaction, allowHashUpdate bool) error

UpsertTransaction provides a mock function with given fields: ctx, data, allowHashUpdate

Jump to

Keyboard shortcuts

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