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
- 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) DeletePendingLinks(arg1 []*url.URL) error
- func (fake *AnchorLinkStore) DeletePendingLinksArgsForCall(i int) []*url.URL
- func (fake *AnchorLinkStore) DeletePendingLinksCallCount() int
- func (fake *AnchorLinkStore) DeletePendingLinksCalls(stub func([]*url.URL) error)
- func (fake *AnchorLinkStore) DeletePendingLinksReturns(result1 error)
- func (fake *AnchorLinkStore) DeletePendingLinksReturnsOnCall(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 ExpiryService
- func (fake *ExpiryService) Invocations() map[string][][]interface{}
- func (fake *ExpiryService) Register(arg1 storage.Store, arg2 string, arg3 string, arg4 ...expiry.Option)
- func (fake *ExpiryService) RegisterArgsForCall(i int) (storage.Store, string, string, []expiry.Option)
- func (fake *ExpiryService) RegisterCallCount() int
- func (fake *ExpiryService) RegisterCalls(stub func(storage.Store, string, string, ...expiry.Option))
- 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) CloseCalls(stub func() error)
- 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(arg1 string, arg2 ...*message.Message) error
- func (fake *PubSub) PublishArgsForCall(i int) (string, []*message.Message)
- func (fake *PubSub) PublishCallCount() int
- func (fake *PubSub) PublishCalls(stub func(string, ...*message.Message) error)
- func (fake *PubSub) PublishReturns(result1 error)
- func (fake *PubSub) PublishReturnsOnCall(i int, result1 error)
- func (fake *PubSub) Subscribe(arg1 context.Context, arg2 string) (<-chan *message.Message, error)
- func (fake *PubSub) SubscribeArgsForCall(i int) (context.Context, string)
- func (fake *PubSub) SubscribeCallCount() int
- func (fake *PubSub) SubscribeCalls(stub func(context.Context, string) (<-chan *message.Message, error))
- 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(arg1 context.Context, arg2 string, arg3 ...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) SubscribeWithOptsCalls(...)
- 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 ¶ 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 (*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 (*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 (*AnchorLinkStore) DeleteLinks ¶ added in v1.0.0
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 (*AnchorLinkStore) DeletePendingLinks ¶ added in v1.0.0
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 (*AnchorLinkStore) GetLinks ¶ added in v1.0.0
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 (*AnchorLinkStore) PutLinks ¶ added in v1.0.0
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) RegisterArgsForCall ¶ added in v1.0.0
func (*ExpiryService) RegisterCallCount ¶ added in v1.0.0
func (fake *ExpiryService) RegisterCallCount() int
func (*ExpiryService) RegisterCalls ¶ added in v1.0.0
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 ¶
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 ¶ 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 }