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 ¶
- type AcceptFollowHandler
- type AcceptListMgr
- func (fake *AcceptListMgr) Get(target string) ([]*url.URL, error)
- func (fake *AcceptListMgr) GetArgsForCall(i int) string
- func (fake *AcceptListMgr) GetCallCount() int
- func (fake *AcceptListMgr) GetReturns(result1 []*url.URL, result2 error)
- func (fake *AcceptListMgr) GetReturnsOnCall(i int, result1 []*url.URL, result2 error)
- func (fake *AcceptListMgr) Invocations() map[string][][]interface{}
- type Activities
- type ActivityHandler
- func (fake *ActivityHandler) HandleActivity(arg1 *url.URL, arg2 *vocab.ActivityType) error
- func (fake *ActivityHandler) HandleActivityArgsForCall(i int) (*url.URL, *vocab.ActivityType)
- func (fake *ActivityHandler) HandleActivityCallCount() int
- func (fake *ActivityHandler) HandleActivityCalls(stub func(*url.URL, *vocab.ActivityType) error)
- func (fake *ActivityHandler) HandleActivityReturns(result1 error)
- func (fake *ActivityHandler) HandleActivityReturnsOnCall(i int, result1 error)
- func (fake *ActivityHandler) Invocations() map[string][][]interface{}
- func (fake *ActivityHandler) Start()
- func (fake *ActivityHandler) StartCallCount() int
- func (fake *ActivityHandler) StartCalls(stub func())
- func (fake *ActivityHandler) State() uint32
- func (fake *ActivityHandler) StateCallCount() int
- func (fake *ActivityHandler) StateCalls(stub func() uint32)
- func (fake *ActivityHandler) StateReturns(result1 uint32)
- func (fake *ActivityHandler) StateReturnsOnCall(i int, result1 uint32)
- func (fake *ActivityHandler) Stop()
- func (fake *ActivityHandler) StopCallCount() int
- func (fake *ActivityHandler) StopCalls(stub func())
- func (fake *ActivityHandler) Subscribe() <-chan *vocab.ActivityType
- func (fake *ActivityHandler) SubscribeCallCount() int
- func (fake *ActivityHandler) SubscribeCalls(stub func() <-chan *vocab.ActivityType)
- func (fake *ActivityHandler) SubscribeReturns(result1 <-chan *vocab.ActivityType)
- func (fake *ActivityHandler) SubscribeReturnsOnCall(i int, result1 <-chan *vocab.ActivityType)
- type ActivityIterator
- func (fake *ActivityIterator) CurrentPage() *url.URL
- func (fake *ActivityIterator) CurrentPageCallCount() int
- func (fake *ActivityIterator) CurrentPageReturns(result1 *url.URL)
- func (fake *ActivityIterator) CurrentPageReturnsOnCall(i int, result1 *url.URL)
- func (fake *ActivityIterator) Invocations() map[string][][]interface{}
- func (fake *ActivityIterator) Next() (*vocab.ActivityType, error)
- func (fake *ActivityIterator) NextCallCount() int
- func (fake *ActivityIterator) NextIndex() int
- func (fake *ActivityIterator) NextIndexCallCount() int
- func (fake *ActivityIterator) NextIndexReturns(result1 int)
- func (fake *ActivityIterator) NextIndexReturnsOnCall(i int, result1 int)
- func (fake *ActivityIterator) NextPage() (*url.URL, error)
- func (fake *ActivityIterator) NextPageCallCount() int
- func (fake *ActivityIterator) NextPageReturns(result1 *url.URL, result2 error)
- func (fake *ActivityIterator) NextPageReturnsOnCall(i int, result1 *url.URL, result2 error)
- func (fake *ActivityIterator) NextReturns(result1 *vocab.ActivityType, result2 error)
- func (fake *ActivityIterator) NextReturnsOnCall(i int, result1 *vocab.ActivityType, result2 error)
- func (fake *ActivityIterator) SetNextIndex(arg1 int)
- func (fake *ActivityIterator) SetNextIndexArgsForCall(i int) int
- func (fake *ActivityIterator) SetNextIndexCallCount() int
- func (fake *ActivityIterator) TotalItems() int
- func (fake *ActivityIterator) TotalItemsCallCount() int
- func (fake *ActivityIterator) TotalItemsReturns(result1 int)
- func (fake *ActivityIterator) TotalItemsReturnsOnCall(i int, result1 int)
- type ActivityPubClient
- func (m *ActivityPubClient) GetActivities(iri *url.URL, _ client.Order) (client.ActivityIterator, error)
- func (m *ActivityPubClient) GetActor(actorIRI *url.URL) (*vocab.ActorType, error)
- func (m *ActivityPubClient) GetPublicKey(keyIRI *url.URL) (*vocab.PublicKeyType, error)
- func (m *ActivityPubClient) GetReferences(iri *url.URL) (client.ReferenceIterator, error)
- func (m *ActivityPubClient) WithActivities(activities []*vocab.ActivityType) *ActivityPubClient
- func (m *ActivityPubClient) WithActor(actor *vocab.ActorType) *ActivityPubClient
- func (m *ActivityPubClient) WithError(err error) *ActivityPubClient
- func (m *ActivityPubClient) WithPublicKey(key *vocab.PublicKeyType) *ActivityPubClient
- type ActivityStore
- func (fake *ActivityStore) AddActivity(arg1 *vocab.ActivityType) error
- func (fake *ActivityStore) AddActivityArgsForCall(i int) *vocab.ActivityType
- func (fake *ActivityStore) AddActivityCallCount() int
- func (fake *ActivityStore) AddActivityCalls(stub func(*vocab.ActivityType) error)
- func (fake *ActivityStore) AddActivityReturns(result1 error)
- func (fake *ActivityStore) AddActivityReturnsOnCall(i int, result1 error)
- func (fake *ActivityStore) AddReference(arg1 spi.ReferenceType, arg2 *url.URL, arg3 *url.URL, ...) error
- func (fake *ActivityStore) AddReferenceArgsForCall(i int) (spi.ReferenceType, *url.URL, *url.URL, []spi.RefMetadataOpt)
- func (fake *ActivityStore) AddReferenceCallCount() int
- func (fake *ActivityStore) AddReferenceCalls(stub func(spi.ReferenceType, *url.URL, *url.URL, ...spi.RefMetadataOpt) error)
- func (fake *ActivityStore) AddReferenceReturns(result1 error)
- func (fake *ActivityStore) AddReferenceReturnsOnCall(i int, result1 error)
- func (fake *ActivityStore) DeleteReference(arg1 spi.ReferenceType, arg2 *url.URL, arg3 *url.URL) error
- func (fake *ActivityStore) DeleteReferenceArgsForCall(i int) (spi.ReferenceType, *url.URL, *url.URL)
- func (fake *ActivityStore) DeleteReferenceCallCount() int
- func (fake *ActivityStore) DeleteReferenceCalls(stub func(spi.ReferenceType, *url.URL, *url.URL) error)
- func (fake *ActivityStore) DeleteReferenceReturns(result1 error)
- func (fake *ActivityStore) DeleteReferenceReturnsOnCall(i int, result1 error)
- func (fake *ActivityStore) GetActivity(arg1 *url.URL) (*vocab.ActivityType, error)
- func (fake *ActivityStore) GetActivityArgsForCall(i int) *url.URL
- func (fake *ActivityStore) GetActivityCallCount() int
- func (fake *ActivityStore) GetActivityCalls(stub func(*url.URL) (*vocab.ActivityType, error))
- func (fake *ActivityStore) GetActivityReturns(result1 *vocab.ActivityType, result2 error)
- func (fake *ActivityStore) GetActivityReturnsOnCall(i int, result1 *vocab.ActivityType, result2 error)
- func (fake *ActivityStore) GetActor(arg1 *url.URL) (*vocab.ActorType, error)
- func (fake *ActivityStore) GetActorArgsForCall(i int) *url.URL
- func (fake *ActivityStore) GetActorCallCount() int
- func (fake *ActivityStore) GetActorCalls(stub func(*url.URL) (*vocab.ActorType, error))
- func (fake *ActivityStore) GetActorReturns(result1 *vocab.ActorType, result2 error)
- func (fake *ActivityStore) GetActorReturnsOnCall(i int, result1 *vocab.ActorType, result2 error)
- func (fake *ActivityStore) Invocations() map[string][][]interface{}
- func (fake *ActivityStore) PutActor(arg1 *vocab.ActorType) error
- func (fake *ActivityStore) PutActorArgsForCall(i int) *vocab.ActorType
- func (fake *ActivityStore) PutActorCallCount() int
- func (fake *ActivityStore) PutActorCalls(stub func(*vocab.ActorType) error)
- func (fake *ActivityStore) PutActorReturns(result1 error)
- func (fake *ActivityStore) PutActorReturnsOnCall(i int, result1 error)
- func (fake *ActivityStore) QueryActivities(arg1 *spi.Criteria, arg2 ...spi.QueryOpt) (spi.ActivityIterator, error)
- func (fake *ActivityStore) QueryActivitiesArgsForCall(i int) (*spi.Criteria, []spi.QueryOpt)
- func (fake *ActivityStore) QueryActivitiesCallCount() int
- func (fake *ActivityStore) QueryActivitiesCalls(stub func(*spi.Criteria, ...spi.QueryOpt) (spi.ActivityIterator, error))
- func (fake *ActivityStore) QueryActivitiesReturns(result1 spi.ActivityIterator, result2 error)
- func (fake *ActivityStore) QueryActivitiesReturnsOnCall(i int, result1 spi.ActivityIterator, result2 error)
- func (fake *ActivityStore) QueryReferences(arg1 spi.ReferenceType, arg2 *spi.Criteria, arg3 ...spi.QueryOpt) (spi.ReferenceIterator, error)
- func (fake *ActivityStore) QueryReferencesArgsForCall(i int) (spi.ReferenceType, *spi.Criteria, []spi.QueryOpt)
- func (fake *ActivityStore) QueryReferencesCallCount() int
- func (fake *ActivityStore) QueryReferencesCalls(...)
- func (fake *ActivityStore) QueryReferencesReturns(result1 spi.ReferenceIterator, result2 error)
- func (fake *ActivityStore) QueryReferencesReturnsOnCall(i int, result1 spi.ReferenceIterator, result2 error)
- type ActorAuth
- type AnchorEventAcknowledgementHandler
- func (m *AnchorEventAcknowledgementHandler) AnchorEventAcknowledged(actor, anchorRef *url.URL, additionalAnchorRefs []*url.URL) error
- func (m *AnchorEventAcknowledgementHandler) Anchors() []*url.URL
- func (m *AnchorEventAcknowledgementHandler) UndoAnchorEventAcknowledgement(actor, anchorRef *url.URL, additionalAnchorRefs []*url.URL) error
- func (m *AnchorEventAcknowledgementHandler) WithError(err error) *AnchorEventAcknowledgementHandler
- type AnchorEventHandler
- type MockPubSub
- func (m *MockPubSub) Close() error
- func (m *MockPubSub) Publish(topic string, messages ...*message.Message) error
- func (m *MockPubSub) Subscribe(_ context.Context, topic string) (<-chan *message.Message, error)
- func (m *MockPubSub) SubscribeWithOpts(ctx context.Context, topic string, _ ...spi.Option) (<-chan *message.Message, error)
- func (m *MockPubSub) WithError(err error) *MockPubSub
- type Outbox
- func (m *Outbox) Activities() Activities
- func (m *Outbox) Post(activity *vocab.ActivityType, _ ...*url.URL) (*url.URL, error)
- func (m *Outbox) Start()
- func (m *Outbox) State() lifecycle.State
- func (m *Outbox) Stop()
- func (m *Outbox) WithActivityID(id *url.URL) *Outbox
- func (m *Outbox) WithError(err error) *Outbox
- type ProofHandler
- type ReferenceIterator
- func (fake *ReferenceIterator) Invocations() map[string][][]interface{}
- func (fake *ReferenceIterator) Next() (*url.URL, error)
- func (fake *ReferenceIterator) NextCallCount() int
- func (fake *ReferenceIterator) NextReturns(result1 *url.URL, result2 error)
- func (fake *ReferenceIterator) NextReturnsOnCall(i int, result1 *url.URL, result2 error)
- func (fake *ReferenceIterator) TotalItems() int
- func (fake *ReferenceIterator) TotalItemsCallCount() int
- func (fake *ReferenceIterator) TotalItemsReturns(result1 int)
- func (fake *ReferenceIterator) TotalItemsReturnsOnCall(i int, result1 int)
- type SignatureVerifier
- func (fake *SignatureVerifier) Invocations() map[string][][]interface{}
- func (fake *SignatureVerifier) VerifyRequest(req *http.Request) (bool, *url.URL, error)
- func (fake *SignatureVerifier) VerifyRequestArgsForCall(i int) *http.Request
- func (fake *SignatureVerifier) VerifyRequestCallCount() int
- func (fake *SignatureVerifier) VerifyRequestReturns(result1 bool, result2 *url.URL, result3 error)
- func (fake *SignatureVerifier) VerifyRequestReturnsOnCall(i int, result1 bool, result2 *url.URL, result3 error)
- type Subscriber
- type TaskManager
- type UndoFollowHandler
- type WebFingerResolver
- type WitnessHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptFollowHandler ¶ added in v1.0.0
type AcceptFollowHandler struct {
// contains filtered or unexported fields
}
AcceptFollowHandler implements a mock accept follow handler.
func NewAcceptFollowHandler ¶ added in v1.0.0
func NewAcceptFollowHandler() *AcceptFollowHandler
NewAcceptFollowHandler returns a mock accept follow handler.
func (*AcceptFollowHandler) Accept ¶ added in v1.0.0
func (m *AcceptFollowHandler) Accept(actor *url.URL) error
Accept accepts/rejects follow request.
func (*AcceptFollowHandler) WithError ¶ added in v1.0.0
func (m *AcceptFollowHandler) WithError(err error) *AcceptFollowHandler
WithError injects an error.
type AcceptListMgr ¶ added in v1.0.0
type AcceptListMgr struct { GetStub func(target string) ([]*url.URL, error) // contains filtered or unexported fields }
func (*AcceptListMgr) Get ¶ added in v1.0.0
func (fake *AcceptListMgr) Get(target string) ([]*url.URL, error)
func (*AcceptListMgr) GetArgsForCall ¶ added in v1.0.0
func (fake *AcceptListMgr) GetArgsForCall(i int) string
func (*AcceptListMgr) GetCallCount ¶ added in v1.0.0
func (fake *AcceptListMgr) GetCallCount() int
func (*AcceptListMgr) GetReturns ¶ added in v1.0.0
func (fake *AcceptListMgr) GetReturns(result1 []*url.URL, result2 error)
func (*AcceptListMgr) GetReturnsOnCall ¶ added in v1.0.0
func (fake *AcceptListMgr) GetReturnsOnCall(i int, result1 []*url.URL, result2 error)
func (*AcceptListMgr) Invocations ¶ added in v1.0.0
func (fake *AcceptListMgr) Invocations() map[string][][]interface{}
type Activities ¶
type Activities []*vocab.ActivityType
Activities contains a slice of ActivityType.
func (Activities) QueryByType ¶
func (a Activities) QueryByType(types ...vocab.Type) Activities
QueryByType returns the activities that match the given types.
type ActivityHandler ¶
type ActivityHandler struct { HandleActivityStub func(*url.URL, *vocab.ActivityType) error StartStub func() StateStub func() uint32 StopStub func() SubscribeStub func() <-chan *vocab.ActivityType // contains filtered or unexported fields }
func (*ActivityHandler) HandleActivity ¶
func (fake *ActivityHandler) HandleActivity(arg1 *url.URL, arg2 *vocab.ActivityType) error
func (*ActivityHandler) HandleActivityArgsForCall ¶
func (fake *ActivityHandler) HandleActivityArgsForCall(i int) (*url.URL, *vocab.ActivityType)
func (*ActivityHandler) HandleActivityCallCount ¶
func (fake *ActivityHandler) HandleActivityCallCount() int
func (*ActivityHandler) HandleActivityCalls ¶ added in v1.0.0
func (fake *ActivityHandler) HandleActivityCalls(stub func(*url.URL, *vocab.ActivityType) error)
func (*ActivityHandler) HandleActivityReturns ¶
func (fake *ActivityHandler) HandleActivityReturns(result1 error)
func (*ActivityHandler) HandleActivityReturnsOnCall ¶
func (fake *ActivityHandler) HandleActivityReturnsOnCall(i int, result1 error)
func (*ActivityHandler) Invocations ¶
func (fake *ActivityHandler) Invocations() map[string][][]interface{}
func (*ActivityHandler) Start ¶
func (fake *ActivityHandler) Start()
func (*ActivityHandler) StartCallCount ¶
func (fake *ActivityHandler) StartCallCount() int
func (*ActivityHandler) StartCalls ¶ added in v1.0.0
func (fake *ActivityHandler) StartCalls(stub func())
func (*ActivityHandler) State ¶
func (fake *ActivityHandler) State() uint32
func (*ActivityHandler) StateCallCount ¶
func (fake *ActivityHandler) StateCallCount() int
func (*ActivityHandler) StateCalls ¶ added in v1.0.0
func (fake *ActivityHandler) StateCalls(stub func() uint32)
func (*ActivityHandler) StateReturns ¶
func (fake *ActivityHandler) StateReturns(result1 uint32)
func (*ActivityHandler) StateReturnsOnCall ¶
func (fake *ActivityHandler) StateReturnsOnCall(i int, result1 uint32)
func (*ActivityHandler) Stop ¶
func (fake *ActivityHandler) Stop()
func (*ActivityHandler) StopCallCount ¶
func (fake *ActivityHandler) StopCallCount() int
func (*ActivityHandler) StopCalls ¶ added in v1.0.0
func (fake *ActivityHandler) StopCalls(stub func())
func (*ActivityHandler) Subscribe ¶
func (fake *ActivityHandler) Subscribe() <-chan *vocab.ActivityType
func (*ActivityHandler) SubscribeCallCount ¶
func (fake *ActivityHandler) SubscribeCallCount() int
func (*ActivityHandler) SubscribeCalls ¶ added in v1.0.0
func (fake *ActivityHandler) SubscribeCalls(stub func() <-chan *vocab.ActivityType)
func (*ActivityHandler) SubscribeReturns ¶
func (fake *ActivityHandler) SubscribeReturns(result1 <-chan *vocab.ActivityType)
func (*ActivityHandler) SubscribeReturnsOnCall ¶
func (fake *ActivityHandler) SubscribeReturnsOnCall(i int, result1 <-chan *vocab.ActivityType)
type ActivityIterator ¶ added in v1.0.0
type ActivityIterator struct { NextStub func() (*vocab.ActivityType, error) NextPageStub func() (*url.URL, error) SetNextIndexStub func(int) TotalItemsStub func() int CurrentPageStub func() *url.URL NextIndexStub func() int // contains filtered or unexported fields }
func (*ActivityIterator) CurrentPage ¶ added in v1.0.0
func (fake *ActivityIterator) CurrentPage() *url.URL
func (*ActivityIterator) CurrentPageCallCount ¶ added in v1.0.0
func (fake *ActivityIterator) CurrentPageCallCount() int
func (*ActivityIterator) CurrentPageReturns ¶ added in v1.0.0
func (fake *ActivityIterator) CurrentPageReturns(result1 *url.URL)
func (*ActivityIterator) CurrentPageReturnsOnCall ¶ added in v1.0.0
func (fake *ActivityIterator) CurrentPageReturnsOnCall(i int, result1 *url.URL)
func (*ActivityIterator) Invocations ¶ added in v1.0.0
func (fake *ActivityIterator) Invocations() map[string][][]interface{}
func (*ActivityIterator) Next ¶ added in v1.0.0
func (fake *ActivityIterator) Next() (*vocab.ActivityType, error)
func (*ActivityIterator) NextCallCount ¶ added in v1.0.0
func (fake *ActivityIterator) NextCallCount() int
func (*ActivityIterator) NextIndex ¶ added in v1.0.0
func (fake *ActivityIterator) NextIndex() int
func (*ActivityIterator) NextIndexCallCount ¶ added in v1.0.0
func (fake *ActivityIterator) NextIndexCallCount() int
func (*ActivityIterator) NextIndexReturns ¶ added in v1.0.0
func (fake *ActivityIterator) NextIndexReturns(result1 int)
func (*ActivityIterator) NextIndexReturnsOnCall ¶ added in v1.0.0
func (fake *ActivityIterator) NextIndexReturnsOnCall(i int, result1 int)
func (*ActivityIterator) NextPage ¶ added in v1.0.0
func (fake *ActivityIterator) NextPage() (*url.URL, error)
func (*ActivityIterator) NextPageCallCount ¶ added in v1.0.0
func (fake *ActivityIterator) NextPageCallCount() int
func (*ActivityIterator) NextPageReturns ¶ added in v1.0.0
func (fake *ActivityIterator) NextPageReturns(result1 *url.URL, result2 error)
func (*ActivityIterator) NextPageReturnsOnCall ¶ added in v1.0.0
func (fake *ActivityIterator) NextPageReturnsOnCall(i int, result1 *url.URL, result2 error)
func (*ActivityIterator) NextReturns ¶ added in v1.0.0
func (fake *ActivityIterator) NextReturns(result1 *vocab.ActivityType, result2 error)
func (*ActivityIterator) NextReturnsOnCall ¶ added in v1.0.0
func (fake *ActivityIterator) NextReturnsOnCall(i int, result1 *vocab.ActivityType, result2 error)
func (*ActivityIterator) SetNextIndex ¶ added in v1.0.0
func (fake *ActivityIterator) SetNextIndex(arg1 int)
func (*ActivityIterator) SetNextIndexArgsForCall ¶ added in v1.0.0
func (fake *ActivityIterator) SetNextIndexArgsForCall(i int) int
func (*ActivityIterator) SetNextIndexCallCount ¶ added in v1.0.0
func (fake *ActivityIterator) SetNextIndexCallCount() int
func (*ActivityIterator) TotalItems ¶ added in v1.0.0
func (fake *ActivityIterator) TotalItems() int
func (*ActivityIterator) TotalItemsCallCount ¶ added in v1.0.0
func (fake *ActivityIterator) TotalItemsCallCount() int
func (*ActivityIterator) TotalItemsReturns ¶ added in v1.0.0
func (fake *ActivityIterator) TotalItemsReturns(result1 int)
func (*ActivityIterator) TotalItemsReturnsOnCall ¶ added in v1.0.0
func (fake *ActivityIterator) TotalItemsReturnsOnCall(i int, result1 int)
type ActivityPubClient ¶ added in v1.0.0
type ActivityPubClient struct {
// contains filtered or unexported fields
}
ActivityPubClient is a mock ActivityPub client.
func NewActivitPubClient ¶ added in v1.0.0
func NewActivitPubClient() *ActivityPubClient
NewActivitPubClient returns a mock ActivityPub client.
func (*ActivityPubClient) GetActivities ¶ added in v1.0.0
func (m *ActivityPubClient) GetActivities(iri *url.URL, _ client.Order) (client.ActivityIterator, error)
GetActivities simply returns an iterator that contains the mock activities.
func (*ActivityPubClient) GetPublicKey ¶ added in v1.0.0
func (m *ActivityPubClient) GetPublicKey(keyIRI *url.URL) (*vocab.PublicKeyType, error)
GetPublicKey returns the public key for the given IRI.
func (*ActivityPubClient) GetReferences ¶ added in v1.0.0
func (m *ActivityPubClient) GetReferences(iri *url.URL) (client.ReferenceIterator, error)
GetReferences simply returns an iterator that contains the IRI passed as an arg.
func (*ActivityPubClient) WithActivities ¶ added in v1.0.0
func (m *ActivityPubClient) WithActivities(activities []*vocab.ActivityType) *ActivityPubClient
WithActivities sets the given activities to the slice of activities which is used by GetActivities.
func (*ActivityPubClient) WithActor ¶ added in v1.0.0
func (m *ActivityPubClient) WithActor(actor *vocab.ActorType) *ActivityPubClient
WithActor adds the given actor to the map of actors which is used by GetActor.
func (*ActivityPubClient) WithError ¶ added in v1.0.0
func (m *ActivityPubClient) WithError(err error) *ActivityPubClient
WithError sets an error to be returned when any function is invoked on this struct.
func (*ActivityPubClient) WithPublicKey ¶ added in v1.0.0
func (m *ActivityPubClient) WithPublicKey(key *vocab.PublicKeyType) *ActivityPubClient
WithPublicKey adds the given public key to the map of keys which is used by GetPublicKey.
type ActivityStore ¶
type ActivityStore struct { AddActivityStub func(*vocab.ActivityType) error AddReferenceStub func(spi.ReferenceType, *url.URL, *url.URL, ...spi.RefMetadataOpt) error DeleteReferenceStub func(spi.ReferenceType, *url.URL, *url.URL) error GetActivityStub func(*url.URL) (*vocab.ActivityType, error) GetActorStub func(*url.URL) (*vocab.ActorType, error) PutActorStub func(*vocab.ActorType) error QueryActivitiesStub func(*spi.Criteria, ...spi.QueryOpt) (spi.ActivityIterator, error) QueryReferencesStub func(spi.ReferenceType, *spi.Criteria, ...spi.QueryOpt) (spi.ReferenceIterator, error) // contains filtered or unexported fields }
func (*ActivityStore) AddActivity ¶
func (fake *ActivityStore) AddActivity(arg1 *vocab.ActivityType) error
func (*ActivityStore) AddActivityArgsForCall ¶
func (fake *ActivityStore) AddActivityArgsForCall(i int) *vocab.ActivityType
func (*ActivityStore) AddActivityCallCount ¶
func (fake *ActivityStore) AddActivityCallCount() int
func (*ActivityStore) AddActivityCalls ¶ added in v0.1.2
func (fake *ActivityStore) AddActivityCalls(stub func(*vocab.ActivityType) error)
func (*ActivityStore) AddActivityReturns ¶
func (fake *ActivityStore) AddActivityReturns(result1 error)
func (*ActivityStore) AddActivityReturnsOnCall ¶
func (fake *ActivityStore) AddActivityReturnsOnCall(i int, result1 error)
func (*ActivityStore) AddReference ¶
func (fake *ActivityStore) AddReference(arg1 spi.ReferenceType, arg2 *url.URL, arg3 *url.URL, arg4 ...spi.RefMetadataOpt) error
func (*ActivityStore) AddReferenceArgsForCall ¶
func (fake *ActivityStore) AddReferenceArgsForCall(i int) (spi.ReferenceType, *url.URL, *url.URL, []spi.RefMetadataOpt)
func (*ActivityStore) AddReferenceCallCount ¶
func (fake *ActivityStore) AddReferenceCallCount() int
func (*ActivityStore) AddReferenceCalls ¶ added in v0.1.2
func (fake *ActivityStore) AddReferenceCalls(stub func(spi.ReferenceType, *url.URL, *url.URL, ...spi.RefMetadataOpt) error)
func (*ActivityStore) AddReferenceReturns ¶
func (fake *ActivityStore) AddReferenceReturns(result1 error)
func (*ActivityStore) AddReferenceReturnsOnCall ¶
func (fake *ActivityStore) AddReferenceReturnsOnCall(i int, result1 error)
func (*ActivityStore) DeleteReference ¶
func (fake *ActivityStore) DeleteReference(arg1 spi.ReferenceType, arg2 *url.URL, arg3 *url.URL) error
func (*ActivityStore) DeleteReferenceArgsForCall ¶
func (fake *ActivityStore) DeleteReferenceArgsForCall(i int) (spi.ReferenceType, *url.URL, *url.URL)
func (*ActivityStore) DeleteReferenceCallCount ¶
func (fake *ActivityStore) DeleteReferenceCallCount() int
func (*ActivityStore) DeleteReferenceCalls ¶ added in v0.1.2
func (fake *ActivityStore) DeleteReferenceCalls(stub func(spi.ReferenceType, *url.URL, *url.URL) error)
func (*ActivityStore) DeleteReferenceReturns ¶
func (fake *ActivityStore) DeleteReferenceReturns(result1 error)
func (*ActivityStore) DeleteReferenceReturnsOnCall ¶
func (fake *ActivityStore) DeleteReferenceReturnsOnCall(i int, result1 error)
func (*ActivityStore) GetActivity ¶
func (fake *ActivityStore) GetActivity(arg1 *url.URL) (*vocab.ActivityType, error)
func (*ActivityStore) GetActivityArgsForCall ¶
func (fake *ActivityStore) GetActivityArgsForCall(i int) *url.URL
func (*ActivityStore) GetActivityCallCount ¶
func (fake *ActivityStore) GetActivityCallCount() int
func (*ActivityStore) GetActivityCalls ¶ added in v0.1.2
func (fake *ActivityStore) GetActivityCalls(stub func(*url.URL) (*vocab.ActivityType, error))
func (*ActivityStore) GetActivityReturns ¶
func (fake *ActivityStore) GetActivityReturns(result1 *vocab.ActivityType, result2 error)
func (*ActivityStore) GetActivityReturnsOnCall ¶
func (fake *ActivityStore) GetActivityReturnsOnCall(i int, result1 *vocab.ActivityType, result2 error)
func (*ActivityStore) GetActorArgsForCall ¶
func (fake *ActivityStore) GetActorArgsForCall(i int) *url.URL
func (*ActivityStore) GetActorCallCount ¶
func (fake *ActivityStore) GetActorCallCount() int
func (*ActivityStore) GetActorCalls ¶ added in v0.1.2
func (*ActivityStore) GetActorReturns ¶
func (fake *ActivityStore) GetActorReturns(result1 *vocab.ActorType, result2 error)
func (*ActivityStore) GetActorReturnsOnCall ¶
func (fake *ActivityStore) GetActorReturnsOnCall(i int, result1 *vocab.ActorType, result2 error)
func (*ActivityStore) Invocations ¶
func (fake *ActivityStore) Invocations() map[string][][]interface{}
func (*ActivityStore) PutActorArgsForCall ¶
func (fake *ActivityStore) PutActorArgsForCall(i int) *vocab.ActorType
func (*ActivityStore) PutActorCallCount ¶
func (fake *ActivityStore) PutActorCallCount() int
func (*ActivityStore) PutActorCalls ¶ added in v0.1.2
func (fake *ActivityStore) PutActorCalls(stub func(*vocab.ActorType) error)
func (*ActivityStore) PutActorReturns ¶
func (fake *ActivityStore) PutActorReturns(result1 error)
func (*ActivityStore) PutActorReturnsOnCall ¶
func (fake *ActivityStore) PutActorReturnsOnCall(i int, result1 error)
func (*ActivityStore) QueryActivities ¶
func (fake *ActivityStore) QueryActivities(arg1 *spi.Criteria, arg2 ...spi.QueryOpt) (spi.ActivityIterator, error)
func (*ActivityStore) QueryActivitiesArgsForCall ¶
func (*ActivityStore) QueryActivitiesCallCount ¶
func (fake *ActivityStore) QueryActivitiesCallCount() int
func (*ActivityStore) QueryActivitiesCalls ¶ added in v0.1.2
func (fake *ActivityStore) QueryActivitiesCalls(stub func(*spi.Criteria, ...spi.QueryOpt) (spi.ActivityIterator, error))
func (*ActivityStore) QueryActivitiesReturns ¶
func (fake *ActivityStore) QueryActivitiesReturns(result1 spi.ActivityIterator, result2 error)
func (*ActivityStore) QueryActivitiesReturnsOnCall ¶
func (fake *ActivityStore) QueryActivitiesReturnsOnCall(i int, result1 spi.ActivityIterator, result2 error)
func (*ActivityStore) QueryReferences ¶
func (fake *ActivityStore) QueryReferences(arg1 spi.ReferenceType, arg2 *spi.Criteria, arg3 ...spi.QueryOpt) (spi.ReferenceIterator, error)
func (*ActivityStore) QueryReferencesArgsForCall ¶
func (fake *ActivityStore) QueryReferencesArgsForCall(i int) (spi.ReferenceType, *spi.Criteria, []spi.QueryOpt)
func (*ActivityStore) QueryReferencesCallCount ¶
func (fake *ActivityStore) QueryReferencesCallCount() int
func (*ActivityStore) QueryReferencesCalls ¶ added in v0.1.2
func (fake *ActivityStore) QueryReferencesCalls(stub func(spi.ReferenceType, *spi.Criteria, ...spi.QueryOpt) (spi.ReferenceIterator, error))
func (*ActivityStore) QueryReferencesReturns ¶
func (fake *ActivityStore) QueryReferencesReturns(result1 spi.ReferenceIterator, result2 error)
func (*ActivityStore) QueryReferencesReturnsOnCall ¶
func (fake *ActivityStore) QueryReferencesReturnsOnCall(i int, result1 spi.ReferenceIterator, result2 error)
type ActorAuth ¶
type ActorAuth struct {
// contains filtered or unexported fields
}
ActorAuth implements a mock actor authorization handler.
func (*ActorAuth) AuthorizeActor ¶
AuthorizeActor is a mock implementation that returns the injected values.
func (*ActorAuth) WithAccept ¶
WithAccept ensures that the request is accepted.
func (*ActorAuth) WithReject ¶
WithReject ensures that the request is rejected.
type AnchorEventAcknowledgementHandler ¶ added in v0.1.3
type AnchorEventAcknowledgementHandler struct {
// contains filtered or unexported fields
}
AnchorEventAcknowledgementHandler implements a mock anchor event acknowledgement handler.
func NewAnchorEventAcknowledgementHandler ¶ added in v0.1.3
func NewAnchorEventAcknowledgementHandler() *AnchorEventAcknowledgementHandler
NewAnchorEventAcknowledgementHandler returns a mock handler.
func (*AnchorEventAcknowledgementHandler) AnchorEventAcknowledged ¶ added in v0.1.3
func (m *AnchorEventAcknowledgementHandler) AnchorEventAcknowledged(actor, anchorRef *url.URL, additionalAnchorRefs []*url.URL) error
AnchorEventAcknowledged handles the acknowledgement of a successful anchor event processed from an Orb server.
func (*AnchorEventAcknowledgementHandler) Anchors ¶ added in v0.1.3
func (m *AnchorEventAcknowledgementHandler) Anchors() []*url.URL
Anchors returns the anchors that were added to this mock.
func (*AnchorEventAcknowledgementHandler) UndoAnchorEventAcknowledgement ¶ added in v1.0.0
func (m *AnchorEventAcknowledgementHandler) UndoAnchorEventAcknowledgement(actor, anchorRef *url.URL, additionalAnchorRefs []*url.URL) error
UndoAnchorEventAcknowledgement undoes the acknowledgement of an anchor event processed from an Orb server.
func (*AnchorEventAcknowledgementHandler) WithError ¶ added in v0.1.3
func (m *AnchorEventAcknowledgementHandler) WithError(err error) *AnchorEventAcknowledgementHandler
WithError injects an error.
type AnchorEventHandler ¶ added in v1.0.0
type AnchorEventHandler struct {
// contains filtered or unexported fields
}
AnchorEventHandler is a mock anchor event handler.
func NewAnchorEventHandler ¶ added in v1.0.0
func NewAnchorEventHandler() *AnchorEventHandler
NewAnchorEventHandler returns a mock anchor event handler.
func (*AnchorEventHandler) AnchorEvent ¶ added in v1.0.0
func (m *AnchorEventHandler) AnchorEvent(hl string) (*vocab.AnchorEventType, bool)
AnchorEvent returns the anchor credential by ID or nil if it doesn't exist.
func (*AnchorEventHandler) HandleAnchorEvent ¶ added in v1.0.0
func (m *AnchorEventHandler) HandleAnchorEvent(actor, hl, src *url.URL, anchorEvent *vocab.AnchorEventType) error
HandleAnchorEvent stores the anchor event or returns an error if it was set.
func (*AnchorEventHandler) WithError ¶ added in v1.0.0
func (m *AnchorEventHandler) WithError(err error) *AnchorEventHandler
WithError injects an error into the mock handler.
type MockPubSub ¶
type MockPubSub struct { *lifecycle.Lifecycle Err error MsgChan map[string]chan *message.Message Timeout time.Duration // contains filtered or unexported fields }
MockPubSub implements a mock publisher-subscriber.
func (*MockPubSub) Publish ¶
func (m *MockPubSub) Publish(topic string, messages ...*message.Message) error
Publish publishes the messages to the subscribers.
func (*MockPubSub) SubscribeWithOpts ¶ added in v1.0.0
func (m *MockPubSub) SubscribeWithOpts(ctx context.Context, topic string, _ ...spi.Option) (<-chan *message.Message, error)
SubscribeWithOpts subscribes to the given topic.
func (*MockPubSub) WithError ¶
func (m *MockPubSub) WithError(err error) *MockPubSub
WithError injects an error into the mock publisher-subscriber.
type Outbox ¶
type Outbox struct {
// contains filtered or unexported fields
}
Outbox implements a mock Outbox.
func (*Outbox) Activities ¶
func (m *Outbox) Activities() Activities
Activities returns the activities that were posted to the outbox.
func (*Outbox) Post ¶
Post post an activity to the outbox. The activity is simply stored so that it may be retrieved by the Activies function.
func (*Outbox) WithActivityID ¶
WithActivityID sets the ID of the posted activity.
type ProofHandler ¶
type ProofHandler struct {
// contains filtered or unexported fields
}
ProofHandler implements a mock proof handler.
func NewProofHandler ¶
func NewProofHandler() *ProofHandler
NewProofHandler returns a mock proof handler.
func (*ProofHandler) HandleProof ¶
func (m *ProofHandler) HandleProof(witness *url.URL, anchorCredID string, endTime time.Time, proof []byte) error
HandleProof store the proof and returns any injected error.
func (*ProofHandler) Proof ¶
func (m *ProofHandler) Proof(objID string) []byte
Proof returns the stored proof for the givin ID.
func (*ProofHandler) WithError ¶
func (m *ProofHandler) WithError(err error) *ProofHandler
WithError injects an error.
type ReferenceIterator ¶ added in v0.1.2
type ReferenceIterator struct { NextStub func() (*url.URL, error) TotalItemsStub func() int // contains filtered or unexported fields }
func (*ReferenceIterator) Invocations ¶ added in v0.1.2
func (fake *ReferenceIterator) Invocations() map[string][][]interface{}
func (*ReferenceIterator) Next ¶ added in v0.1.2
func (fake *ReferenceIterator) Next() (*url.URL, error)
func (*ReferenceIterator) NextCallCount ¶ added in v0.1.2
func (fake *ReferenceIterator) NextCallCount() int
func (*ReferenceIterator) NextReturns ¶ added in v0.1.2
func (fake *ReferenceIterator) NextReturns(result1 *url.URL, result2 error)
func (*ReferenceIterator) NextReturnsOnCall ¶ added in v0.1.2
func (fake *ReferenceIterator) NextReturnsOnCall(i int, result1 *url.URL, result2 error)
func (*ReferenceIterator) TotalItems ¶ added in v0.1.2
func (fake *ReferenceIterator) TotalItems() int
func (*ReferenceIterator) TotalItemsCallCount ¶ added in v0.1.2
func (fake *ReferenceIterator) TotalItemsCallCount() int
func (*ReferenceIterator) TotalItemsReturns ¶ added in v0.1.2
func (fake *ReferenceIterator) TotalItemsReturns(result1 int)
func (*ReferenceIterator) TotalItemsReturnsOnCall ¶ added in v0.1.2
func (fake *ReferenceIterator) TotalItemsReturnsOnCall(i int, result1 int)
type SignatureVerifier ¶
type SignatureVerifier struct { VerifyRequestStub func(req *http.Request) (bool, *url.URL, error) // contains filtered or unexported fields }
func (*SignatureVerifier) Invocations ¶
func (fake *SignatureVerifier) Invocations() map[string][][]interface{}
func (*SignatureVerifier) VerifyRequest ¶
func (*SignatureVerifier) VerifyRequestArgsForCall ¶
func (fake *SignatureVerifier) VerifyRequestArgsForCall(i int) *http.Request
func (*SignatureVerifier) VerifyRequestCallCount ¶
func (fake *SignatureVerifier) VerifyRequestCallCount() int
func (*SignatureVerifier) VerifyRequestReturns ¶
func (fake *SignatureVerifier) VerifyRequestReturns(result1 bool, result2 *url.URL, result3 error)
func (*SignatureVerifier) VerifyRequestReturnsOnCall ¶
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber implements a mock activity subscriber.
func NewSubscriber ¶
func NewSubscriber(activityChan <-chan *vocab.ActivityType) *Subscriber
NewSubscriber returns a new mock activity subscriber.
func (*Subscriber) Activities ¶
func (m *Subscriber) Activities() []*vocab.ActivityType
Activities returns the activities that were received by the subscriber.
type TaskManager ¶ added in v1.0.0
TaskManager is a mock implementation of a task manager.
func NewTaskManager ¶ added in v1.0.0
func NewTaskManager(instanceID string) *TaskManager
NewTaskManager returns a new mock task manager.
func (*TaskManager) InstanceID ¶ added in v1.0.0
func (m *TaskManager) InstanceID() string
InstanceID returns the server instance ID.
func (*TaskManager) RegisterTask ¶ added in v1.0.0
func (m *TaskManager) RegisterTask(_ string, interval time.Duration, run func())
RegisterTask registers the given task to be run at the given interval.
func (*TaskManager) WithInterval ¶ added in v1.0.0
func (m *TaskManager) WithInterval(interval time.Duration) *TaskManager
WithInterval sets the check interval.
type UndoFollowHandler ¶ added in v1.0.0
type UndoFollowHandler struct {
// contains filtered or unexported fields
}
UndoFollowHandler implements a mock undo follow handler.
func NewUndoFollowHandler ¶ added in v1.0.0
func NewUndoFollowHandler() *UndoFollowHandler
NewUndoFollowHandler returns a mock undo follow handler.
func (*UndoFollowHandler) Undo ¶ added in v1.0.0
func (m *UndoFollowHandler) Undo(actor *url.URL) error
Undo removes follow request.
func (*UndoFollowHandler) WithError ¶ added in v1.0.0
func (m *UndoFollowHandler) WithError(err error) *UndoFollowHandler
WithError injects an error.
type WebFingerResolver ¶ added in v0.1.2
WebFingerResolver implements a mock WebFinger resolver.
func (*WebFingerResolver) ResolveHostMetaLink ¶ added in v0.1.2
func (m *WebFingerResolver) ResolveHostMetaLink(uri, _ string) (string, error)
ResolveHostMetaLink returns either the specified error, the specified URI, otherwise, if neither were specified then the URI in the argument is returned.
type WitnessHandler ¶
type WitnessHandler struct {
// contains filtered or unexported fields
}
WitnessHandler implements a mock witness handler.
func NewWitnessHandler ¶
func NewWitnessHandler() *WitnessHandler
NewWitnessHandler returns a mock witness handler.
func (*WitnessHandler) AnchorCreds ¶
func (m *WitnessHandler) AnchorCreds() [][]byte
AnchorCreds returns all of the anchor credentials that were witnessed by this mock.
func (*WitnessHandler) WithError ¶
func (m *WitnessHandler) WithError(err error) *WitnessHandler
WithError injects an error.
func (*WitnessHandler) WithProof ¶
func (m *WitnessHandler) WithProof(proof []byte) *WitnessHandler
WithProof sets the proof to be returned from the witness handler.
Source Files ¶
- acceptlistmgr.gen.go
- activities.go
- activityhandler.gen.go
- activityiterator.gen.go
- activitystore.gen.go
- mockacceptfollowhandler.go
- mockactivitypubclient.go
- mockanchoreventackhandler.go
- mockanchoreventhandler.go
- mockfollowerauth.go
- mockoutbox.go
- mockproofhandler.go
- mockpubsub.go
- mocksubscriber.go
- mockundofollowhandler.go
- mockwitnesshandler.go
- referenceiterator.gen.go
- sigfnatureverifier.gen.go
- taskmgr.go
- webfingerresolver.go