mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

View Source
const DefaultNS = "did:sidetree"

DefaultNS is default namespace used in mocks.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnchorGraph added in v0.1.2

type AnchorGraph struct {
	GetDidAnchorsStub func(string, string) ([]graph.Anchor, error)

	ReadStub func(string) (*linkset.Linkset, error)
	// contains filtered or unexported fields
}

func (*AnchorGraph) GetDidAnchors added in v0.1.2

func (fake *AnchorGraph) GetDidAnchors(arg1 string, arg2 string) ([]graph.Anchor, error)

func (*AnchorGraph) GetDidAnchorsArgsForCall added in v0.1.2

func (fake *AnchorGraph) GetDidAnchorsArgsForCall(i int) (string, string)

func (*AnchorGraph) GetDidAnchorsCallCount added in v0.1.2

func (fake *AnchorGraph) GetDidAnchorsCallCount() int

func (*AnchorGraph) GetDidAnchorsCalls added in v1.0.0

func (fake *AnchorGraph) GetDidAnchorsCalls(stub func(string, string) ([]graph.Anchor, error))

func (*AnchorGraph) GetDidAnchorsReturns added in v0.1.2

func (fake *AnchorGraph) GetDidAnchorsReturns(result1 []graph.Anchor, result2 error)

func (*AnchorGraph) GetDidAnchorsReturnsOnCall added in v0.1.2

func (fake *AnchorGraph) GetDidAnchorsReturnsOnCall(i int, result1 []graph.Anchor, result2 error)

func (*AnchorGraph) Invocations added in v0.1.2

func (fake *AnchorGraph) Invocations() map[string][][]interface{}

func (*AnchorGraph) Read added in v0.1.2

func (fake *AnchorGraph) Read(arg1 string) (*linkset.Linkset, error)

func (*AnchorGraph) ReadArgsForCall added in v0.1.2

func (fake *AnchorGraph) ReadArgsForCall(i int) string

func (*AnchorGraph) ReadCallCount added in v0.1.2

func (fake *AnchorGraph) ReadCallCount() int

func (*AnchorGraph) ReadCalls added in v1.0.0

func (fake *AnchorGraph) ReadCalls(stub func(string) (*linkset.Linkset, error))

func (*AnchorGraph) ReadReturns added in v0.1.2

func (fake *AnchorGraph) ReadReturns(result1 *linkset.Linkset, result2 error)

func (*AnchorGraph) ReadReturnsOnCall added in v0.1.2

func (fake *AnchorGraph) ReadReturnsOnCall(i int, result1 *linkset.Linkset, result2 error)

type AnchorLinkStore added in v1.0.0

type AnchorLinkStore struct {
	DeleteLinksStub func([]*url.URL) error

	DeletePendingLinksStub func([]*url.URL) error

	GetLinksStub func(string) ([]*url.URL, error)

	PutLinksStub func([]*url.URL) error
	// contains filtered or unexported fields
}
func (fake *AnchorLinkStore) DeleteLinks(arg1 []*url.URL) error

func (*AnchorLinkStore) DeleteLinksArgsForCall added in v1.0.0

func (fake *AnchorLinkStore) DeleteLinksArgsForCall(i int) []*url.URL

func (*AnchorLinkStore) DeleteLinksCallCount added in v1.0.0

func (fake *AnchorLinkStore) DeleteLinksCallCount() int

func (*AnchorLinkStore) DeleteLinksCalls added in v1.0.0

func (fake *AnchorLinkStore) DeleteLinksCalls(stub func([]*url.URL) error)

func (*AnchorLinkStore) DeleteLinksReturns added in v1.0.0

func (fake *AnchorLinkStore) DeleteLinksReturns(result1 error)

func (*AnchorLinkStore) DeleteLinksReturnsOnCall added in v1.0.0

func (fake *AnchorLinkStore) DeleteLinksReturnsOnCall(i int, result1 error)
func (fake *AnchorLinkStore) DeletePendingLinks(arg1 []*url.URL) error

func (*AnchorLinkStore) DeletePendingLinksArgsForCall added in v1.0.0

func (fake *AnchorLinkStore) DeletePendingLinksArgsForCall(i int) []*url.URL

func (*AnchorLinkStore) DeletePendingLinksCallCount added in v1.0.0

func (fake *AnchorLinkStore) DeletePendingLinksCallCount() int

func (*AnchorLinkStore) DeletePendingLinksCalls added in v1.0.0

func (fake *AnchorLinkStore) DeletePendingLinksCalls(stub func([]*url.URL) error)

func (*AnchorLinkStore) DeletePendingLinksReturns added in v1.0.0

func (fake *AnchorLinkStore) DeletePendingLinksReturns(result1 error)

func (*AnchorLinkStore) DeletePendingLinksReturnsOnCall added in v1.0.0

func (fake *AnchorLinkStore) DeletePendingLinksReturnsOnCall(i int, result1 error)
func (fake *AnchorLinkStore) GetLinks(arg1 string) ([]*url.URL, error)

func (*AnchorLinkStore) GetLinksArgsForCall added in v1.0.0

func (fake *AnchorLinkStore) GetLinksArgsForCall(i int) string

func (*AnchorLinkStore) GetLinksCallCount added in v1.0.0

func (fake *AnchorLinkStore) GetLinksCallCount() int

func (*AnchorLinkStore) GetLinksCalls added in v1.0.0

func (fake *AnchorLinkStore) GetLinksCalls(stub func(string) ([]*url.URL, error))

func (*AnchorLinkStore) GetLinksReturns added in v1.0.0

func (fake *AnchorLinkStore) GetLinksReturns(result1 []*url.URL, result2 error)

func (*AnchorLinkStore) GetLinksReturnsOnCall added in v1.0.0

func (fake *AnchorLinkStore) GetLinksReturnsOnCall(i int, result1 []*url.URL, result2 error)

func (*AnchorLinkStore) Invocations added in v1.0.0

func (fake *AnchorLinkStore) Invocations() map[string][][]interface{}
func (fake *AnchorLinkStore) PutLinks(arg1 []*url.URL) error

func (*AnchorLinkStore) PutLinksArgsForCall added in v1.0.0

func (fake *AnchorLinkStore) PutLinksArgsForCall(i int) []*url.URL

func (*AnchorLinkStore) PutLinksCallCount added in v1.0.0

func (fake *AnchorLinkStore) PutLinksCallCount() int

func (*AnchorLinkStore) PutLinksCalls added in v1.0.0

func (fake *AnchorLinkStore) PutLinksCalls(stub func([]*url.URL) error)

func (*AnchorLinkStore) PutLinksReturns added in v1.0.0

func (fake *AnchorLinkStore) PutLinksReturns(result1 error)

func (*AnchorLinkStore) PutLinksReturnsOnCall added in v1.0.0

func (fake *AnchorLinkStore) PutLinksReturnsOnCall(i int, result1 error)

type ConfigRetriever added in v1.0.0

type ConfigRetriever struct {
	GetValueStub func(string) ([]byte, error)
	// contains filtered or unexported fields
}

func (*ConfigRetriever) GetValue added in v1.0.0

func (fake *ConfigRetriever) GetValue(arg1 string) ([]byte, error)

func (*ConfigRetriever) GetValueArgsForCall added in v1.0.0

func (fake *ConfigRetriever) GetValueArgsForCall(i int) string

func (*ConfigRetriever) GetValueCallCount added in v1.0.0

func (fake *ConfigRetriever) GetValueCallCount() int

func (*ConfigRetriever) GetValueCalls added in v1.0.0

func (fake *ConfigRetriever) GetValueCalls(stub func(string) ([]byte, error))

func (*ConfigRetriever) GetValueReturns added in v1.0.0

func (fake *ConfigRetriever) GetValueReturns(result1 []byte, result2 error)

func (*ConfigRetriever) GetValueReturnsOnCall added in v1.0.0

func (fake *ConfigRetriever) GetValueReturnsOnCall(i int, result1 []byte, result2 error)

func (*ConfigRetriever) Invocations added in v1.0.0

func (fake *ConfigRetriever) Invocations() map[string][][]interface{}

type DomainResolver added in v1.0.0

type DomainResolver struct {
	ResolveDomainForDIDStub func(string) (string, error)
	// contains filtered or unexported fields
}

func (*DomainResolver) Invocations added in v1.0.0

func (fake *DomainResolver) Invocations() map[string][][]interface{}

func (*DomainResolver) ResolveDomainForDID added in v1.0.0

func (fake *DomainResolver) ResolveDomainForDID(arg1 string) (string, error)

func (*DomainResolver) ResolveDomainForDIDArgsForCall added in v1.0.0

func (fake *DomainResolver) ResolveDomainForDIDArgsForCall(i int) string

func (*DomainResolver) ResolveDomainForDIDCallCount added in v1.0.0

func (fake *DomainResolver) ResolveDomainForDIDCallCount() int

func (*DomainResolver) ResolveDomainForDIDCalls added in v1.0.0

func (fake *DomainResolver) ResolveDomainForDIDCalls(stub func(string) (string, error))

func (*DomainResolver) ResolveDomainForDIDReturns added in v1.0.0

func (fake *DomainResolver) ResolveDomainForDIDReturns(result1 string, result2 error)

func (*DomainResolver) ResolveDomainForDIDReturnsOnCall added in v1.0.0

func (fake *DomainResolver) ResolveDomainForDIDReturnsOnCall(i int, result1 string, result2 error)

type ExpiryService added in v1.0.0

type ExpiryService struct {
	RegisterStub func(storage.Store, string, string, ...expiry.Option)
	// contains filtered or unexported fields
}

func (*ExpiryService) Invocations added in v1.0.0

func (fake *ExpiryService) Invocations() map[string][][]interface{}

func (*ExpiryService) Register added in v1.0.0

func (fake *ExpiryService) Register(arg1 storage.Store, arg2 string, arg3 string, arg4 ...expiry.Option)

func (*ExpiryService) RegisterArgsForCall added in v1.0.0

func (fake *ExpiryService) RegisterArgsForCall(i int) (storage.Store, string, string, []expiry.Option)

func (*ExpiryService) RegisterCallCount added in v1.0.0

func (fake *ExpiryService) RegisterCallCount() int

func (*ExpiryService) RegisterCalls added in v1.0.0

func (fake *ExpiryService) RegisterCalls(stub func(storage.Store, string, string, ...expiry.Option))

type MetricsProvider added in v0.1.3

type MetricsProvider struct{}

MetricsProvider implements a mock ActivityPub metrics provider.

func (*MetricsProvider) AddOperationTime added in v0.1.3

func (m *MetricsProvider) AddOperationTime(value time.Duration)

AddOperationTime records the time it takes to add an operation to the queue.

func (*MetricsProvider) AddProofParseCredential added in v0.1.3

func (m *MetricsProvider) AddProofParseCredential(value time.Duration)

AddProofParseCredential records vct parse credential in add proof.

func (*MetricsProvider) AddProofSign added in v0.1.3

func (m *MetricsProvider) AddProofSign(value time.Duration)

AddProofSign records vct sign in add proof.

func (*MetricsProvider) BatchCutTime added in v0.1.3

func (m *MetricsProvider) BatchCutTime(value time.Duration)

BatchCutTime records the time it takes to cut an operation batch.

func (*MetricsProvider) BatchRollbackTime added in v0.1.3

func (m *MetricsProvider) BatchRollbackTime(value time.Duration)

BatchRollbackTime records the time it takes to roll back an operation batch (in case of a transient error).

func (*MetricsProvider) BatchSize added in v0.1.3

func (m *MetricsProvider) BatchSize(float64)

BatchSize records the size of an operation batch.

func (*MetricsProvider) CASIncrementCacheHitCount added in v0.1.3

func (m *MetricsProvider) CASIncrementCacheHitCount()

CASIncrementCacheHitCount increments the number of CAS cache hits.

func (*MetricsProvider) CASReadTime added in v0.1.3

func (m *MetricsProvider) CASReadTime(casType string, value time.Duration)

CASReadTime records the time it takes to read a document from CAS storage.

func (*MetricsProvider) CASResolveTime added in v0.1.3

func (m *MetricsProvider) CASResolveTime(value time.Duration)

CASResolveTime records the time it takes to resolve a document from CAS.

func (*MetricsProvider) CASWriteTime added in v0.1.3

func (m *MetricsProvider) CASWriteTime(value time.Duration)

CASWriteTime records the time it takes to write a document to CAS.

func (*MetricsProvider) CalculateUnpublishedOperationKey added in v1.0.0

func (m *MetricsProvider) CalculateUnpublishedOperationKey(value time.Duration)

CalculateUnpublishedOperationKey records the time to create unpublished operation key.

func (*MetricsProvider) DecorateTime added in v1.0.0

func (m *MetricsProvider) DecorateTime(value time.Duration)

DecorateTime records the time it takes to decorate operation (for update handler).

func (*MetricsProvider) DeleteDocumentFromCreateDocumentStoreTime added in v1.0.0

func (m *MetricsProvider) DeleteDocumentFromCreateDocumentStoreTime(value time.Duration)

DeleteDocumentFromCreateDocumentStoreTime records deleting document from create document store.

func (*MetricsProvider) DocumentCreateUpdateTime added in v0.1.3

func (m *MetricsProvider) DocumentCreateUpdateTime(value time.Duration)

DocumentCreateUpdateTime records the time it takes the REST handler to process a create/update operation.

func (*MetricsProvider) DocumentResolveTime added in v0.1.3

func (m *MetricsProvider) DocumentResolveTime(value time.Duration)

DocumentResolveTime records the time it takes the REST handler to resolve a document.

func (*MetricsProvider) GetAOEndpointAndResolveDocumentFromAOTime added in v1.0.0

func (m *MetricsProvider) GetAOEndpointAndResolveDocumentFromAOTime(value time.Duration)

GetAOEndpointAndResolveDocumentFromAOTime records the time it takes to get anchor origin endpoint and resolve document from anchor origin when decorating operation (for update handler).

func (*MetricsProvider) GetAnchorOriginEndpointTime added in v1.0.0

func (m *MetricsProvider) GetAnchorOriginEndpointTime(value time.Duration)

GetAnchorOriginEndpointTime records getting anchor origin endpoint information.

func (*MetricsProvider) GetPublishedOperations added in v1.0.0

func (m *MetricsProvider) GetPublishedOperations(value time.Duration)

GetPublishedOperations records the time to get published operations for suffix.

func (*MetricsProvider) GetUnpublishedOperations added in v1.0.0

func (m *MetricsProvider) GetUnpublishedOperations(value time.Duration)

GetUnpublishedOperations records the time it takes to get unpublished operations for suffix.

func (*MetricsProvider) InboxHandlerTime added in v0.1.3

func (m *MetricsProvider) InboxHandlerTime(activityType string, value time.Duration)

InboxHandlerTime records the time it takes to handle an activity posted to the inbox.

func (*MetricsProvider) OutboxIncrementActivityCount added in v0.1.3

func (m *MetricsProvider) OutboxIncrementActivityCount(activityType string)

OutboxIncrementActivityCount increments the number of activities of the given type posted to the outbox.

func (*MetricsProvider) OutboxPostTime added in v0.1.3

func (m *MetricsProvider) OutboxPostTime(value time.Duration)

OutboxPostTime records the time it takes to post a message to the outbox.

func (*MetricsProvider) OutboxResolveInboxesTime added in v0.1.3

func (m *MetricsProvider) OutboxResolveInboxesTime(value time.Duration)

OutboxResolveInboxesTime records the time it takes to resolve inboxes for an outbox post.

func (*MetricsProvider) ProcessAnchorTime added in v0.1.3

func (m *MetricsProvider) ProcessAnchorTime(value time.Duration)

ProcessAnchorTime records the time it takes for the Observer to process an anchor credential.

func (*MetricsProvider) ProcessDIDTime added in v0.1.3

func (m *MetricsProvider) ProcessDIDTime(value time.Duration)

ProcessDIDTime records the time it takes for the Observer to process a DID.

func (*MetricsProvider) ProcessWitnessedAnchorCredentialTime added in v0.1.3

func (m *MetricsProvider) ProcessWitnessedAnchorCredentialTime(value time.Duration)

ProcessWitnessedAnchorCredentialTime records the time it takes to process a witnessed anchor credential by publishing it to the Observer and posting a 'Create' activity.

func (*MetricsProvider) ProcessorResolveTime added in v1.0.0

func (m *MetricsProvider) ProcessorResolveTime(value time.Duration)

ProcessorResolveTime records the time it takes for processor to resolve document when decorating operation (for update handler).

func (*MetricsProvider) PutPublishedOperations added in v1.0.0

func (m *MetricsProvider) PutPublishedOperations(value time.Duration)

PutPublishedOperations records the time to store published operations.

func (*MetricsProvider) PutUnpublishedOperation added in v1.0.0

func (m *MetricsProvider) PutUnpublishedOperation(value time.Duration)

PutUnpublishedOperation records the time it takes to store unpublished operation.

func (*MetricsProvider) RequestDiscoveryTime added in v1.0.0

func (m *MetricsProvider) RequestDiscoveryTime(value time.Duration)

RequestDiscoveryTime records the time it takes to request discovery.

func (*MetricsProvider) ResolveDocumentFromAnchorOriginTime added in v1.0.0

func (m *MetricsProvider) ResolveDocumentFromAnchorOriginTime(value time.Duration)

ResolveDocumentFromAnchorOriginTime records resolving document from anchor origin.

func (*MetricsProvider) ResolveDocumentFromCreateDocumentStoreTime added in v1.0.0

func (m *MetricsProvider) ResolveDocumentFromCreateDocumentStoreTime(value time.Duration)

ResolveDocumentFromCreateDocumentStoreTime records resolving document from create document store.

func (*MetricsProvider) ResolveDocumentLocallyTime added in v1.0.0

func (m *MetricsProvider) ResolveDocumentLocallyTime(value time.Duration)

ResolveDocumentLocallyTime records resolving document locally.

func (*MetricsProvider) SignerAddLinkedDataProof added in v0.1.3

func (m *MetricsProvider) SignerAddLinkedDataProof(value time.Duration)

SignerAddLinkedDataProof records add data linked proof.

func (*MetricsProvider) SignerGetKey added in v0.1.3

func (m *MetricsProvider) SignerGetKey(value time.Duration)

SignerGetKey records get key time.

func (*MetricsProvider) SignerSign added in v0.1.3

func (m *MetricsProvider) SignerSign(value time.Duration)

SignerSign records sign time.

func (*MetricsProvider) VerifyCIDTime added in v1.0.0

func (m *MetricsProvider) VerifyCIDTime(value time.Duration)

VerifyCIDTime records verifying CID for document resolution.

func (*MetricsProvider) WebDocumentResolveTime added in v1.0.0

func (m *MetricsProvider) WebDocumentResolveTime(value time.Duration)

WebDocumentResolveTime records the time it takes the REST handler to resolve a web document.

func (*MetricsProvider) WitnessAddProof added in v0.1.3

func (m *MetricsProvider) WitnessAddProof(value time.Duration)

WitnessAddProof records vct witness add proof.

func (*MetricsProvider) WitnessAddProofVctNil added in v0.1.3

func (m *MetricsProvider) WitnessAddProofVctNil(value time.Duration)

WitnessAddProofVctNil records vct witness.

func (*MetricsProvider) WitnessAddVC added in v0.1.3

func (m *MetricsProvider) WitnessAddVC(value time.Duration)

WitnessAddVC records vct witness add vc.

func (*MetricsProvider) WitnessAnchorCredentialTime added in v0.1.3

func (m *MetricsProvider) WitnessAnchorCredentialTime(value time.Duration)

WitnessAnchorCredentialTime records the time it takes for a verifiable credential to gather proofs from all required witnesses (according to witness policy). The start time is when the verifiable credential is issued and the end time is the time that the witness policy is satisfied.

func (*MetricsProvider) WitnessVerifyVCTSignature added in v0.1.3

func (m *MetricsProvider) WitnessVerifyVCTSignature(value time.Duration)

WitnessVerifyVCTSignature records vct witness verify vct.

func (*MetricsProvider) WitnessWebFinger added in v0.1.3

func (m *MetricsProvider) WitnessWebFinger(value time.Duration)

WitnessWebFinger records vct witness web finger.

func (*MetricsProvider) WriteAnchorBuildCredentialTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorBuildCredentialTime(value time.Duration)

WriteAnchorBuildCredentialTime records the time it takes to build credential inside write anchor.

func (*MetricsProvider) WriteAnchorGetPreviousAnchorsGetBulkTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorGetPreviousAnchorsGetBulkTime(value time.Duration)

WriteAnchorGetPreviousAnchorsGetBulkTime records the time it takes to get bulk inside previous anchor.

func (*MetricsProvider) WriteAnchorGetPreviousAnchorsTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorGetPreviousAnchorsTime(value time.Duration)

WriteAnchorGetPreviousAnchorsTime records the time it takes to get previous anchor.

func (*MetricsProvider) WriteAnchorGetWitnessesTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorGetWitnessesTime(value time.Duration)

WriteAnchorGetWitnessesTime records the time it takes to get witnesses inside write anchor.

func (*MetricsProvider) WriteAnchorPostOfferActivityTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorPostOfferActivityTime(value time.Duration)

WriteAnchorPostOfferActivityTime records the time it takes to post offer activity inside write anchor.

func (*MetricsProvider) WriteAnchorResolveHostMetaLinkTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorResolveHostMetaLinkTime(value time.Duration)

WriteAnchorResolveHostMetaLinkTime records the time it takes to resolve host meta link.

func (*MetricsProvider) WriteAnchorSignCredentialTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorSignCredentialTime(value time.Duration)

WriteAnchorSignCredentialTime records the time it takes to sign credential inside write anchor.

func (*MetricsProvider) WriteAnchorSignLocalWatchTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorSignLocalWatchTime(value time.Duration)

WriteAnchorSignLocalWatchTime records the time it takes to watch inside sign local.

func (*MetricsProvider) WriteAnchorSignLocalWitnessLogTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorSignLocalWitnessLogTime(value time.Duration)

WriteAnchorSignLocalWitnessLogTime records the time it takes to witness log inside sign local.

func (*MetricsProvider) WriteAnchorSignWithLocalWitnessTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorSignWithLocalWitnessTime(value time.Duration)

WriteAnchorSignWithLocalWitnessTime records the time it takes to sign with local witness.

func (*MetricsProvider) WriteAnchorSignWithServerKeyTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorSignWithServerKeyTime(value time.Duration)

WriteAnchorSignWithServerKeyTime records the time it takes to sign with server key.

func (*MetricsProvider) WriteAnchorStoreTime added in v1.0.0

func (m *MetricsProvider) WriteAnchorStoreTime(value time.Duration)

WriteAnchorStoreTime records the time it takes to store inside sign local.

func (*MetricsProvider) WriteAnchorTime added in v0.1.3

func (m *MetricsProvider) WriteAnchorTime(value time.Duration)

WriteAnchorTime records the time it takes to write an anchor credential and post an 'Offer' activity.

type MockOpStoreProvider

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

MockOpStoreProvider is a mock operation store provider.

func NewMockOpStoreProvider

func NewMockOpStoreProvider(opStore observer.OperationStore) *MockOpStoreProvider

NewMockOpStoreProvider returns a new mock operation store provider.

func (*MockOpStoreProvider) ForNamespace

ForNamespace returns a mock operation store for the given namespace.

type MockOperationStore

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

MockOperationStore is a mock operation store.

func NewMockOperationStore

func NewMockOperationStore() *MockOperationStore

NewMockOperationStore returns a new mock operation store.

func (*MockOperationStore) Get

Get retrieves the operations for the given suffix.

func (*MockOperationStore) Put

Put stores the given operations.

type MockProtocolClient

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

MockProtocolClient mocks protocol for testing purposes.

func (*MockProtocolClient) Current

func (m *MockProtocolClient) Current() (protocol.Version, error)

Current mocks getting last protocol version.

func (*MockProtocolClient) Get

func (m *MockProtocolClient) Get(transactionTime uint64) (protocol.Version, error)

Get mocks getting protocol version based on blockchain(transaction) time.

type MockProtocolClientProvider

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

MockProtocolClientProvider implements mock protocol client provider.

func NewMockProtocolClientProvider

func NewMockProtocolClientProvider() *MockProtocolClientProvider

NewMockProtocolClientProvider creates new mock protocol client provider.

func (*MockProtocolClientProvider) ForNamespace

func (m *MockProtocolClientProvider) ForNamespace(namespace string) (protocol.Client, error)

ForNamespace will return protocol client for that namespace.

func (*MockProtocolClientProvider) WithAllowedOrigins

func (m *MockProtocolClientProvider) WithAllowedOrigins(origins []string) *MockProtocolClientProvider

WithAllowedOrigins allows for specifying allowed origins.

func (*MockProtocolClientProvider) WithAnchorGraph

WithAnchorGraph sets the anchor graph.

func (*MockProtocolClientProvider) WithBase

WithBase enables @base property during document transformation.

func (*MockProtocolClientProvider) WithCasClient

func (m *MockProtocolClientProvider) WithCasClient(casClient cas.Client) *MockProtocolClientProvider

WithCasClient sets the CAS client.

func (*MockProtocolClientProvider) WithMethodContext

func (m *MockProtocolClientProvider) WithMethodContext(ctx []string) *MockProtocolClientProvider

WithMethodContext sets method context for document transformer.

func (*MockProtocolClientProvider) WithOpStore

WithOpStore sets the operation store.

type PubSub added in v0.1.2

type PubSub struct {
	CloseStub func() error

	PublishStub func(string, ...*message.Message) error

	SubscribeStub func(context.Context, string) (<-chan *message.Message, error)

	SubscribeWithOptsStub func(context.Context, string, ...spi.Option) (<-chan *message.Message, error)
	// contains filtered or unexported fields
}

func (*PubSub) Close added in v0.1.2

func (fake *PubSub) Close() error

func (*PubSub) CloseCallCount added in v0.1.2

func (fake *PubSub) CloseCallCount() int

func (*PubSub) CloseCalls added in v1.0.0

func (fake *PubSub) CloseCalls(stub func() error)

func (*PubSub) CloseReturns added in v0.1.2

func (fake *PubSub) CloseReturns(result1 error)

func (*PubSub) CloseReturnsOnCall added in v0.1.2

func (fake *PubSub) CloseReturnsOnCall(i int, result1 error)

func (*PubSub) Invocations added in v0.1.2

func (fake *PubSub) Invocations() map[string][][]interface{}

func (*PubSub) Publish added in v0.1.2

func (fake *PubSub) Publish(arg1 string, arg2 ...*message.Message) error

func (*PubSub) PublishArgsForCall added in v0.1.2

func (fake *PubSub) PublishArgsForCall(i int) (string, []*message.Message)

func (*PubSub) PublishCallCount added in v0.1.2

func (fake *PubSub) PublishCallCount() int

func (*PubSub) PublishCalls added in v1.0.0

func (fake *PubSub) PublishCalls(stub func(string, ...*message.Message) error)

func (*PubSub) PublishReturns added in v0.1.2

func (fake *PubSub) PublishReturns(result1 error)

func (*PubSub) PublishReturnsOnCall added in v0.1.2

func (fake *PubSub) PublishReturnsOnCall(i int, result1 error)

func (*PubSub) Subscribe added in v0.1.2

func (fake *PubSub) Subscribe(arg1 context.Context, arg2 string) (<-chan *message.Message, error)

func (*PubSub) SubscribeArgsForCall added in v0.1.2

func (fake *PubSub) SubscribeArgsForCall(i int) (context.Context, string)

func (*PubSub) SubscribeCallCount added in v0.1.2

func (fake *PubSub) SubscribeCallCount() int

func (*PubSub) SubscribeCalls added in v1.0.0

func (fake *PubSub) SubscribeCalls(stub func(context.Context, string) (<-chan *message.Message, error))

func (*PubSub) SubscribeReturns added in v0.1.2

func (fake *PubSub) SubscribeReturns(result1 <-chan *message.Message, result2 error)

func (*PubSub) SubscribeReturnsOnCall added in v0.1.2

func (fake *PubSub) SubscribeReturnsOnCall(i int, result1 <-chan *message.Message, result2 error)

func (*PubSub) SubscribeWithOpts added in v1.0.0

func (fake *PubSub) SubscribeWithOpts(arg1 context.Context, arg2 string, arg3 ...spi.Option) (<-chan *message.Message, error)

func (*PubSub) SubscribeWithOptsArgsForCall added in v1.0.0

func (fake *PubSub) SubscribeWithOptsArgsForCall(i int) (context.Context, string, []spi.Option)

func (*PubSub) SubscribeWithOptsCallCount added in v1.0.0

func (fake *PubSub) SubscribeWithOptsCallCount() int

func (*PubSub) SubscribeWithOptsCalls added in v1.0.0

func (fake *PubSub) SubscribeWithOptsCalls(stub func(context.Context, string, ...spi.Option) (<-chan *message.Message, error))

func (*PubSub) SubscribeWithOptsReturns added in v1.0.0

func (fake *PubSub) SubscribeWithOptsReturns(result1 <-chan *message.Message, result2 error)

func (*PubSub) SubscribeWithOptsReturnsOnCall added in v1.0.0

func (fake *PubSub) SubscribeWithOptsReturnsOnCall(i int, result1 <-chan *message.Message, result2 error)

Jump to

Keyboard shortcuts

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