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.
Index ¶
- Constants
- type AnchorGraph
- func (fake *AnchorGraph) GetDidAnchors(arg1 string, arg2 string) ([]graph.Anchor, error)
- func (fake *AnchorGraph) GetDidAnchorsArgsForCall(i int) (string, string)
- func (fake *AnchorGraph) GetDidAnchorsCallCount() int
- func (fake *AnchorGraph) GetDidAnchorsCalls(stub func(string, string) ([]graph.Anchor, error))
- func (fake *AnchorGraph) GetDidAnchorsReturns(result1 []graph.Anchor, result2 error)
- func (fake *AnchorGraph) GetDidAnchorsReturnsOnCall(i int, result1 []graph.Anchor, result2 error)
- func (fake *AnchorGraph) Invocations() map[string][][]interface{}
- func (fake *AnchorGraph) Read(arg1 string) (*linkset.Linkset, error)
- func (fake *AnchorGraph) ReadArgsForCall(i int) string
- func (fake *AnchorGraph) ReadCallCount() int
- func (fake *AnchorGraph) ReadCalls(stub func(string) (*linkset.Linkset, error))
- func (fake *AnchorGraph) ReadReturns(result1 *linkset.Linkset, result2 error)
- func (fake *AnchorGraph) ReadReturnsOnCall(i int, result1 *linkset.Linkset, result2 error)
- type AnchorLinkStore
- func (fake *AnchorLinkStore) DeleteLinks(arg1 []*url.URL) error
- func (fake *AnchorLinkStore) DeleteLinksArgsForCall(i int) []*url.URL
- func (fake *AnchorLinkStore) DeleteLinksCallCount() int
- func (fake *AnchorLinkStore) DeleteLinksCalls(stub func([]*url.URL) error)
- func (fake *AnchorLinkStore) DeleteLinksReturns(result1 error)
- func (fake *AnchorLinkStore) DeleteLinksReturnsOnCall(i int, result1 error)
- func (fake *AnchorLinkStore) GetLinks(arg1 string) ([]*url.URL, error)
- func (fake *AnchorLinkStore) GetLinksArgsForCall(i int) string
- func (fake *AnchorLinkStore) GetLinksCallCount() int
- func (fake *AnchorLinkStore) GetLinksCalls(stub func(string) ([]*url.URL, error))
- func (fake *AnchorLinkStore) GetLinksReturns(result1 []*url.URL, result2 error)
- func (fake *AnchorLinkStore) GetLinksReturnsOnCall(i int, result1 []*url.URL, result2 error)
- func (fake *AnchorLinkStore) Invocations() map[string][][]interface{}
- func (fake *AnchorLinkStore) PutLinks(arg1 []*url.URL) error
- func (fake *AnchorLinkStore) PutLinksArgsForCall(i int) []*url.URL
- func (fake *AnchorLinkStore) PutLinksCallCount() int
- func (fake *AnchorLinkStore) PutLinksCalls(stub func([]*url.URL) error)
- func (fake *AnchorLinkStore) PutLinksReturns(result1 error)
- func (fake *AnchorLinkStore) PutLinksReturnsOnCall(i int, result1 error)
- type ConfigRetriever
- func (fake *ConfigRetriever) GetValue(arg1 string) ([]byte, error)
- func (fake *ConfigRetriever) GetValueArgsForCall(i int) string
- func (fake *ConfigRetriever) GetValueCallCount() int
- func (fake *ConfigRetriever) GetValueCalls(stub func(string) ([]byte, error))
- func (fake *ConfigRetriever) GetValueReturns(result1 []byte, result2 error)
- func (fake *ConfigRetriever) GetValueReturnsOnCall(i int, result1 []byte, result2 error)
- func (fake *ConfigRetriever) Invocations() map[string][][]interface{}
- type DomainResolver
- func (fake *DomainResolver) Invocations() map[string][][]interface{}
- func (fake *DomainResolver) ResolveDomainForDID(arg1 string) (string, error)
- func (fake *DomainResolver) ResolveDomainForDIDArgsForCall(i int) string
- func (fake *DomainResolver) ResolveDomainForDIDCallCount() int
- func (fake *DomainResolver) ResolveDomainForDIDCalls(stub func(string) (string, error))
- func (fake *DomainResolver) ResolveDomainForDIDReturns(result1 string, result2 error)
- func (fake *DomainResolver) ResolveDomainForDIDReturnsOnCall(i int, result1 string, result2 error)
- type MetricsProvider
- func (m *MetricsProvider) AddOperationTime(value time.Duration)
- func (m *MetricsProvider) AddProofParseCredential(value time.Duration)
- func (m *MetricsProvider) AddProofSign(value time.Duration)
- func (m *MetricsProvider) BatchCutTime(value time.Duration)
- func (m *MetricsProvider) BatchRollbackTime(value time.Duration)
- func (m *MetricsProvider) BatchSize(float64)
- func (m *MetricsProvider) CASIncrementCacheHitCount()
- func (m *MetricsProvider) CASReadTime(casType string, value time.Duration)
- func (m *MetricsProvider) CASResolveTime(value time.Duration)
- func (m *MetricsProvider) CASWriteTime(value time.Duration)
- func (m *MetricsProvider) CalculateUnpublishedOperationKey(value time.Duration)
- func (m *MetricsProvider) DecorateTime(value time.Duration)
- func (m *MetricsProvider) DeleteDocumentFromCreateDocumentStoreTime(value time.Duration)
- func (m *MetricsProvider) DocumentCreateUpdateTime(value time.Duration)
- func (m *MetricsProvider) DocumentResolveTime(value time.Duration)
- func (m *MetricsProvider) GetAOEndpointAndResolveDocumentFromAOTime(value time.Duration)
- func (m *MetricsProvider) GetAnchorOriginEndpointTime(value time.Duration)
- func (m *MetricsProvider) GetPublishedOperations(value time.Duration)
- func (m *MetricsProvider) GetUnpublishedOperations(value time.Duration)
- func (m *MetricsProvider) InboxHandlerTime(activityType string, value time.Duration)
- func (m *MetricsProvider) OutboxIncrementActivityCount(activityType string)
- func (m *MetricsProvider) OutboxPostTime(value time.Duration)
- func (m *MetricsProvider) OutboxResolveInboxesTime(value time.Duration)
- func (m *MetricsProvider) ProcessAnchorTime(value time.Duration)
- func (m *MetricsProvider) ProcessDIDTime(value time.Duration)
- func (m *MetricsProvider) ProcessWitnessedAnchorCredentialTime(value time.Duration)
- func (m *MetricsProvider) ProcessorResolveTime(value time.Duration)
- func (m *MetricsProvider) PutPublishedOperations(value time.Duration)
- func (m *MetricsProvider) PutUnpublishedOperation(value time.Duration)
- func (m *MetricsProvider) RequestDiscoveryTime(value time.Duration)
- func (m *MetricsProvider) ResolveDocumentFromAnchorOriginTime(value time.Duration)
- func (m *MetricsProvider) ResolveDocumentFromCreateDocumentStoreTime(value time.Duration)
- func (m *MetricsProvider) ResolveDocumentLocallyTime(value time.Duration)
- func (m *MetricsProvider) SignerAddLinkedDataProof(value time.Duration)
- func (m *MetricsProvider) SignerGetKey(value time.Duration)
- func (m *MetricsProvider) SignerSign(value time.Duration)
- func (m *MetricsProvider) VerifyCIDTime(value time.Duration)
- func (m *MetricsProvider) WebDocumentResolveTime(value time.Duration)
- func (m *MetricsProvider) WitnessAddProof(value time.Duration)
- func (m *MetricsProvider) WitnessAddProofVctNil(value time.Duration)
- func (m *MetricsProvider) WitnessAddVC(value time.Duration)
- func (m *MetricsProvider) WitnessAnchorCredentialTime(value time.Duration)
- func (m *MetricsProvider) WitnessVerifyVCTSignature(value time.Duration)
- func (m *MetricsProvider) WitnessWebFinger(value time.Duration)
- func (m *MetricsProvider) WriteAnchorBuildCredentialTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorGetPreviousAnchorsGetBulkTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorGetPreviousAnchorsTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorGetWitnessesTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorPostOfferActivityTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorResolveHostMetaLinkTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorSignCredentialTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorSignLocalWatchTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorSignLocalWitnessLogTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorSignWithLocalWitnessTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorSignWithServerKeyTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorStoreTime(value time.Duration)
- func (m *MetricsProvider) WriteAnchorTime(value time.Duration)
- type MockOpStoreProvider
- type MockOperationStore
- type MockProtocolClient
- type MockProtocolClientProvider
- func (m *MockProtocolClientProvider) ForNamespace(namespace string) (protocol.Client, error)
- func (m *MockProtocolClientProvider) WithAllowedOrigins(origins []string) *MockProtocolClientProvider
- func (m *MockProtocolClientProvider) WithAnchorGraph(anchorGraph common.AnchorGraph) *MockProtocolClientProvider
- func (m *MockProtocolClientProvider) WithBase(enabled bool) *MockProtocolClientProvider
- func (m *MockProtocolClientProvider) WithCasClient(casClient cas.Client) *MockProtocolClientProvider
- func (m *MockProtocolClientProvider) WithMethodContext(ctx []string) *MockProtocolClientProvider
- func (m *MockProtocolClientProvider) WithOpStore(opStore common.OperationStore) *MockProtocolClientProvider
- type PubSub
- func (fake *PubSub) Close() error
- func (fake *PubSub) CloseCallCount() int
- func (fake *PubSub) CloseReturns(result1 error)
- func (fake *PubSub) CloseReturnsOnCall(i int, result1 error)
- func (fake *PubSub) Invocations() map[string][][]interface{}
- func (fake *PubSub) Publish(topic string, messages ...*message.Message) error
- func (fake *PubSub) PublishArgsForCall(i int) (string, []*message.Message)
- func (fake *PubSub) PublishCallCount() int
- func (fake *PubSub) PublishReturns(result1 error)
- func (fake *PubSub) PublishReturnsOnCall(i int, result1 error)
- func (fake *PubSub) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error)
- func (fake *PubSub) SubscribeArgsForCall(i int) (context.Context, string)
- func (fake *PubSub) SubscribeCallCount() int
- func (fake *PubSub) SubscribeReturns(result1 <-chan *message.Message, result2 error)
- func (fake *PubSub) SubscribeReturnsOnCall(i int, result1 <-chan *message.Message, result2 error)
- func (fake *PubSub) SubscribeWithOpts(ctx context.Context, topic string, opts ...spi.Option) (<-chan *message.Message, error)
- func (fake *PubSub) SubscribeWithOptsArgsForCall(i int) (context.Context, string, []spi.Option)
- func (fake *PubSub) SubscribeWithOptsCallCount() int
- func (fake *PubSub) SubscribeWithOptsReturns(result1 <-chan *message.Message, result2 error)
- func (fake *PubSub) SubscribeWithOptsReturnsOnCall(i int, result1 <-chan *message.Message, result2 error)
Constants ¶
const DefaultNS = "did:sidetree"
DefaultNS is default namespace used in mocks.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorGraph ¶
type AnchorGraph struct { GetDidAnchorsStub func(string, string) ([]graph.Anchor, error) ReadStub func(string) (*linkset.Linkset, error) // contains filtered or unexported fields }
func (*AnchorGraph) GetDidAnchors ¶
func (*AnchorGraph) GetDidAnchorsArgsForCall ¶
func (fake *AnchorGraph) GetDidAnchorsArgsForCall(i int) (string, string)
func (*AnchorGraph) GetDidAnchorsCallCount ¶
func (fake *AnchorGraph) GetDidAnchorsCallCount() int
func (*AnchorGraph) GetDidAnchorsCalls ¶
func (*AnchorGraph) GetDidAnchorsReturns ¶
func (fake *AnchorGraph) GetDidAnchorsReturns(result1 []graph.Anchor, result2 error)
func (*AnchorGraph) GetDidAnchorsReturnsOnCall ¶
func (fake *AnchorGraph) GetDidAnchorsReturnsOnCall(i int, result1 []graph.Anchor, result2 error)
func (*AnchorGraph) Invocations ¶
func (fake *AnchorGraph) Invocations() map[string][][]interface{}
func (*AnchorGraph) ReadArgsForCall ¶
func (fake *AnchorGraph) ReadArgsForCall(i int) string
func (*AnchorGraph) ReadCallCount ¶
func (fake *AnchorGraph) ReadCallCount() int
func (*AnchorGraph) ReadCalls ¶
func (fake *AnchorGraph) ReadCalls(stub func(string) (*linkset.Linkset, error))
func (*AnchorGraph) ReadReturns ¶
func (fake *AnchorGraph) ReadReturns(result1 *linkset.Linkset, result2 error)
func (*AnchorGraph) ReadReturnsOnCall ¶
func (fake *AnchorGraph) ReadReturnsOnCall(i int, result1 *linkset.Linkset, result2 error)
type AnchorLinkStore ¶
type AnchorLinkStore struct { DeleteLinksStub func([]*url.URL) error GetLinksStub func(string) ([]*url.URL, error) PutLinksStub func([]*url.URL) error // contains filtered or unexported fields }
func (*AnchorLinkStore) DeleteLinks ¶
func (fake *AnchorLinkStore) DeleteLinks(arg1 []*url.URL) error
func (*AnchorLinkStore) DeleteLinksArgsForCall ¶
func (fake *AnchorLinkStore) DeleteLinksArgsForCall(i int) []*url.URL
func (*AnchorLinkStore) DeleteLinksCallCount ¶
func (fake *AnchorLinkStore) DeleteLinksCallCount() int
func (*AnchorLinkStore) DeleteLinksCalls ¶
func (fake *AnchorLinkStore) DeleteLinksCalls(stub func([]*url.URL) error)
func (*AnchorLinkStore) DeleteLinksReturns ¶
func (fake *AnchorLinkStore) DeleteLinksReturns(result1 error)
func (*AnchorLinkStore) DeleteLinksReturnsOnCall ¶
func (fake *AnchorLinkStore) DeleteLinksReturnsOnCall(i int, result1 error)
func (*AnchorLinkStore) GetLinks ¶
func (fake *AnchorLinkStore) GetLinks(arg1 string) ([]*url.URL, error)
func (*AnchorLinkStore) GetLinksArgsForCall ¶
func (fake *AnchorLinkStore) GetLinksArgsForCall(i int) string
func (*AnchorLinkStore) GetLinksCallCount ¶
func (fake *AnchorLinkStore) GetLinksCallCount() int
func (*AnchorLinkStore) GetLinksCalls ¶
func (fake *AnchorLinkStore) GetLinksCalls(stub func(string) ([]*url.URL, error))
func (*AnchorLinkStore) GetLinksReturns ¶
func (fake *AnchorLinkStore) GetLinksReturns(result1 []*url.URL, result2 error)
func (*AnchorLinkStore) GetLinksReturnsOnCall ¶
func (fake *AnchorLinkStore) GetLinksReturnsOnCall(i int, result1 []*url.URL, result2 error)
func (*AnchorLinkStore) Invocations ¶
func (fake *AnchorLinkStore) Invocations() map[string][][]interface{}
func (*AnchorLinkStore) PutLinksArgsForCall ¶
func (fake *AnchorLinkStore) PutLinksArgsForCall(i int) []*url.URL
func (*AnchorLinkStore) PutLinksCallCount ¶
func (fake *AnchorLinkStore) PutLinksCallCount() int
func (*AnchorLinkStore) PutLinksCalls ¶
func (fake *AnchorLinkStore) PutLinksCalls(stub func([]*url.URL) error)
func (*AnchorLinkStore) PutLinksReturns ¶
func (fake *AnchorLinkStore) PutLinksReturns(result1 error)
func (*AnchorLinkStore) PutLinksReturnsOnCall ¶
func (fake *AnchorLinkStore) PutLinksReturnsOnCall(i int, result1 error)
type ConfigRetriever ¶
type ConfigRetriever struct { GetValueStub func(string) ([]byte, error) // contains filtered or unexported fields }
func (*ConfigRetriever) GetValue ¶
func (fake *ConfigRetriever) GetValue(arg1 string) ([]byte, error)
func (*ConfigRetriever) GetValueArgsForCall ¶
func (fake *ConfigRetriever) GetValueArgsForCall(i int) string
func (*ConfigRetriever) GetValueCallCount ¶
func (fake *ConfigRetriever) GetValueCallCount() int
func (*ConfigRetriever) GetValueCalls ¶
func (fake *ConfigRetriever) GetValueCalls(stub func(string) ([]byte, error))
func (*ConfigRetriever) GetValueReturns ¶
func (fake *ConfigRetriever) GetValueReturns(result1 []byte, result2 error)
func (*ConfigRetriever) GetValueReturnsOnCall ¶
func (fake *ConfigRetriever) GetValueReturnsOnCall(i int, result1 []byte, result2 error)
func (*ConfigRetriever) Invocations ¶
func (fake *ConfigRetriever) Invocations() map[string][][]interface{}
type DomainResolver ¶
type DomainResolver struct { ResolveDomainForDIDStub func(string) (string, error) // contains filtered or unexported fields }
func (*DomainResolver) Invocations ¶
func (fake *DomainResolver) Invocations() map[string][][]interface{}
func (*DomainResolver) ResolveDomainForDID ¶
func (fake *DomainResolver) ResolveDomainForDID(arg1 string) (string, error)
func (*DomainResolver) ResolveDomainForDIDArgsForCall ¶
func (fake *DomainResolver) ResolveDomainForDIDArgsForCall(i int) string
func (*DomainResolver) ResolveDomainForDIDCallCount ¶
func (fake *DomainResolver) ResolveDomainForDIDCallCount() int
func (*DomainResolver) ResolveDomainForDIDCalls ¶
func (fake *DomainResolver) ResolveDomainForDIDCalls(stub func(string) (string, error))
func (*DomainResolver) ResolveDomainForDIDReturns ¶
func (fake *DomainResolver) ResolveDomainForDIDReturns(result1 string, result2 error)
func (*DomainResolver) ResolveDomainForDIDReturnsOnCall ¶
func (fake *DomainResolver) ResolveDomainForDIDReturnsOnCall(i int, result1 string, result2 error)
type MetricsProvider ¶
type MetricsProvider struct{}
MetricsProvider implements a mock ActivityPub metrics provider.
func (*MetricsProvider) AddOperationTime ¶
func (m *MetricsProvider) AddOperationTime(value time.Duration)
AddOperationTime records the time it takes to add an operation to the queue.
func (*MetricsProvider) AddProofParseCredential ¶
func (m *MetricsProvider) AddProofParseCredential(value time.Duration)
AddProofParseCredential records vct parse credential in add proof.
func (*MetricsProvider) AddProofSign ¶
func (m *MetricsProvider) AddProofSign(value time.Duration)
AddProofSign records vct sign in add proof.
func (*MetricsProvider) BatchCutTime ¶
func (m *MetricsProvider) BatchCutTime(value time.Duration)
BatchCutTime records the time it takes to cut an operation batch.
func (*MetricsProvider) BatchRollbackTime ¶
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 ¶
func (m *MetricsProvider) BatchSize(float64)
BatchSize records the size of an operation batch.
func (*MetricsProvider) CASIncrementCacheHitCount ¶
func (m *MetricsProvider) CASIncrementCacheHitCount()
CASIncrementCacheHitCount increments the number of CAS cache hits.
func (*MetricsProvider) CASReadTime ¶
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 ¶
func (m *MetricsProvider) CASResolveTime(value time.Duration)
CASResolveTime records the time it takes to resolve a document from CAS.
func (*MetricsProvider) CASWriteTime ¶
func (m *MetricsProvider) CASWriteTime(value time.Duration)
CASWriteTime records the time it takes to write a document to CAS.
func (*MetricsProvider) CalculateUnpublishedOperationKey ¶
func (m *MetricsProvider) CalculateUnpublishedOperationKey(value time.Duration)
CalculateUnpublishedOperationKey records the time to create unpublished operation key.
func (*MetricsProvider) DecorateTime ¶
func (m *MetricsProvider) DecorateTime(value time.Duration)
DecorateTime records the time it takes to decorate operation (for update handler).
func (*MetricsProvider) DeleteDocumentFromCreateDocumentStoreTime ¶
func (m *MetricsProvider) DeleteDocumentFromCreateDocumentStoreTime(value time.Duration)
DeleteDocumentFromCreateDocumentStoreTime records deleting document from create document store.
func (*MetricsProvider) DocumentCreateUpdateTime ¶
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 ¶
func (m *MetricsProvider) DocumentResolveTime(value time.Duration)
DocumentResolveTime records the time it takes the REST handler to resolve a document.
func (*MetricsProvider) GetAOEndpointAndResolveDocumentFromAOTime ¶
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 ¶
func (m *MetricsProvider) GetAnchorOriginEndpointTime(value time.Duration)
GetAnchorOriginEndpointTime records getting anchor origin endpoint information.
func (*MetricsProvider) GetPublishedOperations ¶
func (m *MetricsProvider) GetPublishedOperations(value time.Duration)
GetPublishedOperations records the time to get published operations for suffix.
func (*MetricsProvider) GetUnpublishedOperations ¶
func (m *MetricsProvider) GetUnpublishedOperations(value time.Duration)
GetUnpublishedOperations records the time it takes to get unpublished operations for suffix.
func (*MetricsProvider) InboxHandlerTime ¶
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 ¶
func (m *MetricsProvider) OutboxIncrementActivityCount(activityType string)
OutboxIncrementActivityCount increments the number of activities of the given type posted to the outbox.
func (*MetricsProvider) OutboxPostTime ¶
func (m *MetricsProvider) OutboxPostTime(value time.Duration)
OutboxPostTime records the time it takes to post a message to the outbox.
func (*MetricsProvider) OutboxResolveInboxesTime ¶
func (m *MetricsProvider) OutboxResolveInboxesTime(value time.Duration)
OutboxResolveInboxesTime records the time it takes to resolve inboxes for an outbox post.
func (*MetricsProvider) ProcessAnchorTime ¶
func (m *MetricsProvider) ProcessAnchorTime(value time.Duration)
ProcessAnchorTime records the time it takes for the Observer to process an anchor credential.
func (*MetricsProvider) ProcessDIDTime ¶
func (m *MetricsProvider) ProcessDIDTime(value time.Duration)
ProcessDIDTime records the time it takes for the Observer to process a DID.
func (*MetricsProvider) ProcessWitnessedAnchorCredentialTime ¶
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 ¶
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 ¶
func (m *MetricsProvider) PutPublishedOperations(value time.Duration)
PutPublishedOperations records the time to store published operations.
func (*MetricsProvider) PutUnpublishedOperation ¶
func (m *MetricsProvider) PutUnpublishedOperation(value time.Duration)
PutUnpublishedOperation records the time it takes to store unpublished operation.
func (*MetricsProvider) RequestDiscoveryTime ¶
func (m *MetricsProvider) RequestDiscoveryTime(value time.Duration)
RequestDiscoveryTime records the time it takes to request discovery.
func (*MetricsProvider) ResolveDocumentFromAnchorOriginTime ¶
func (m *MetricsProvider) ResolveDocumentFromAnchorOriginTime(value time.Duration)
ResolveDocumentFromAnchorOriginTime records resolving document from anchor origin.
func (*MetricsProvider) ResolveDocumentFromCreateDocumentStoreTime ¶
func (m *MetricsProvider) ResolveDocumentFromCreateDocumentStoreTime(value time.Duration)
ResolveDocumentFromCreateDocumentStoreTime records resolving document from create document store.
func (*MetricsProvider) ResolveDocumentLocallyTime ¶
func (m *MetricsProvider) ResolveDocumentLocallyTime(value time.Duration)
ResolveDocumentLocallyTime records resolving document locally.
func (*MetricsProvider) SignerAddLinkedDataProof ¶
func (m *MetricsProvider) SignerAddLinkedDataProof(value time.Duration)
SignerAddLinkedDataProof records add data linked proof.
func (*MetricsProvider) SignerGetKey ¶
func (m *MetricsProvider) SignerGetKey(value time.Duration)
SignerGetKey records get key time.
func (*MetricsProvider) SignerSign ¶
func (m *MetricsProvider) SignerSign(value time.Duration)
SignerSign records sign time.
func (*MetricsProvider) VerifyCIDTime ¶
func (m *MetricsProvider) VerifyCIDTime(value time.Duration)
VerifyCIDTime records verifying CID for document resolution.
func (*MetricsProvider) WebDocumentResolveTime ¶
func (m *MetricsProvider) WebDocumentResolveTime(value time.Duration)
WebDocumentResolveTime records the time it takes the REST handler to resolve a web document.
func (*MetricsProvider) WitnessAddProof ¶
func (m *MetricsProvider) WitnessAddProof(value time.Duration)
WitnessAddProof records vct witness add proof.
func (*MetricsProvider) WitnessAddProofVctNil ¶
func (m *MetricsProvider) WitnessAddProofVctNil(value time.Duration)
WitnessAddProofVctNil records vct witness.
func (*MetricsProvider) WitnessAddVC ¶
func (m *MetricsProvider) WitnessAddVC(value time.Duration)
WitnessAddVC records vct witness add vc.
func (*MetricsProvider) WitnessAnchorCredentialTime ¶
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 ¶
func (m *MetricsProvider) WitnessVerifyVCTSignature(value time.Duration)
WitnessVerifyVCTSignature records vct witness verify vct.
func (*MetricsProvider) WitnessWebFinger ¶
func (m *MetricsProvider) WitnessWebFinger(value time.Duration)
WitnessWebFinger records vct witness web finger.
func (*MetricsProvider) WriteAnchorBuildCredentialTime ¶
func (m *MetricsProvider) WriteAnchorBuildCredentialTime(value time.Duration)
WriteAnchorBuildCredentialTime records the time it takes to build credential inside write anchor.
func (*MetricsProvider) WriteAnchorGetPreviousAnchorsGetBulkTime ¶
func (m *MetricsProvider) WriteAnchorGetPreviousAnchorsGetBulkTime(value time.Duration)
WriteAnchorGetPreviousAnchorsGetBulkTime records the time it takes to get bulk inside previous anchor.
func (*MetricsProvider) WriteAnchorGetPreviousAnchorsTime ¶
func (m *MetricsProvider) WriteAnchorGetPreviousAnchorsTime(value time.Duration)
WriteAnchorGetPreviousAnchorsTime records the time it takes to get previous anchor.
func (*MetricsProvider) WriteAnchorGetWitnessesTime ¶
func (m *MetricsProvider) WriteAnchorGetWitnessesTime(value time.Duration)
WriteAnchorGetWitnessesTime records the time it takes to get witnesses inside write anchor.
func (*MetricsProvider) WriteAnchorPostOfferActivityTime ¶
func (m *MetricsProvider) WriteAnchorPostOfferActivityTime(value time.Duration)
WriteAnchorPostOfferActivityTime records the time it takes to post offer activity inside write anchor.
func (*MetricsProvider) WriteAnchorResolveHostMetaLinkTime ¶
func (m *MetricsProvider) WriteAnchorResolveHostMetaLinkTime(value time.Duration)
WriteAnchorResolveHostMetaLinkTime records the time it takes to resolve host meta link.
func (*MetricsProvider) WriteAnchorSignCredentialTime ¶
func (m *MetricsProvider) WriteAnchorSignCredentialTime(value time.Duration)
WriteAnchorSignCredentialTime records the time it takes to sign credential inside write anchor.
func (*MetricsProvider) WriteAnchorSignLocalWatchTime ¶
func (m *MetricsProvider) WriteAnchorSignLocalWatchTime(value time.Duration)
WriteAnchorSignLocalWatchTime records the time it takes to watch inside sign local.
func (*MetricsProvider) WriteAnchorSignLocalWitnessLogTime ¶
func (m *MetricsProvider) WriteAnchorSignLocalWitnessLogTime(value time.Duration)
WriteAnchorSignLocalWitnessLogTime records the time it takes to witness log inside sign local.
func (*MetricsProvider) WriteAnchorSignWithLocalWitnessTime ¶
func (m *MetricsProvider) WriteAnchorSignWithLocalWitnessTime(value time.Duration)
WriteAnchorSignWithLocalWitnessTime records the time it takes to sign with local witness.
func (*MetricsProvider) WriteAnchorSignWithServerKeyTime ¶
func (m *MetricsProvider) WriteAnchorSignWithServerKeyTime(value time.Duration)
WriteAnchorSignWithServerKeyTime records the time it takes to sign with server key.
func (*MetricsProvider) WriteAnchorStoreTime ¶
func (m *MetricsProvider) WriteAnchorStoreTime(value time.Duration)
WriteAnchorStoreTime records the time it takes to store inside sign local.
func (*MetricsProvider) WriteAnchorTime ¶
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 ¶
func (m *MockOpStoreProvider) ForNamespace(string) (observer.OperationStore, error)
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 ¶
func (m *MockOperationStore) Get(suffix string) ([]*operation.AnchoredOperation, error)
Get retrieves the operations for the given suffix.
func (*MockOperationStore) Put ¶
func (m *MockOperationStore) Put(ops []*operation.AnchoredOperation) error
Put stores the given operations.
type MockProtocolClient ¶
type MockProtocolClient struct {
// contains filtered or unexported fields
}
MockProtocolClient mocks protocol for testing purposes.
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 ¶
func (m *MockProtocolClientProvider) WithAnchorGraph(anchorGraph common.AnchorGraph) *MockProtocolClientProvider
WithAnchorGraph sets the anchor graph.
func (*MockProtocolClientProvider) WithBase ¶
func (m *MockProtocolClientProvider) WithBase(enabled bool) *MockProtocolClientProvider
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 ¶
func (m *MockProtocolClientProvider) WithOpStore(opStore common.OperationStore) *MockProtocolClientProvider
WithOpStore sets the operation store.
type PubSub ¶
type PubSub struct { SubscribeStub func(ctx context.Context, topic string) (<-chan *message.Message, error) SubscribeWithOptsStub func(ctx context.Context, topic string, opts ...spi.Option) (<-chan *message.Message, error) PublishStub func(topic string, messages ...*message.Message) error CloseStub func() error // contains filtered or unexported fields }