Documentation ¶
Index ¶
- type Cache
- type Client
- func (c *Client) Announce(ctx context.Context, announce vocab.ActivityStreamsAnnounce, depth int, ...) error
- func (c *Client) Create(ctx context.Context, create vocab.ActivityStreamsCreate, depth int, ...) error
- func (c *Client) DereferenceActor(ctx context.Context, actor vocab.ActivityStreamsActorProperty, ...) error
- func (c *Client) DereferenceAttributedTo(ctx context.Context, attributedTo vocab.ActivityStreamsAttributedToProperty, ...) error
- func (c *Client) DereferenceFollowers(ctx context.Context, followers vocab.ActivityStreamsFollowersProperty, ...) error
- func (c *Client) DereferenceFollowing(ctx context.Context, following vocab.ActivityStreamsFollowingProperty, ...) error
- func (c *Client) DereferenceInReplyTo(ctx context.Context, inReplyTo vocab.ActivityStreamsInReplyToProperty, ...) error
- func (c *Client) DereferenceItem(ctx context.Context, item vocab.Type, depth int, maxDepth int) (vocab.Type, error)
- func (c *Client) DereferenceItems(ctx context.Context, items vocab.ActivityStreamsItemsProperty, depth int, ...) error
- func (c *Client) DereferenceObjectsInCollection(ctx context.Context, collection vocab.ActivityStreamsCollection, ...) (vocab.ActivityStreamsCollectionPage, error)
- func (c *Client) DereferenceObjectsInOrderedCollection(ctx context.Context, collection vocab.ActivityStreamsOrderedCollection, ...) (vocab.ActivityStreamsOrderedCollectionPage, error)
- func (c *Client) DereferenceOrderedItems(ctx context.Context, items vocab.ActivityStreamsOrderedItemsProperty, ...) error
- func (c *Client) DereferenceOutbox(ctx context.Context, outbox vocab.ActivityStreamsOutboxProperty, ...) error
- func (c *Client) DereferenceRecipientInboxes(ctx context.Context, a activity.Activity) ([]*url.URL, error)
- func (c *Client) Event(ctx context.Context, event vocab.ActivityStreamsEvent, depth int, maxDepth int) error
- func (c *Client) FetchFollowers(ctx context.Context, identifier string) ([]vocab.Type, error)
- func (c *Client) FetchObject(ctx context.Context, iri *url.URL, forceUpdate bool, depth int, maxDepth int) (vocab.Type, error)
- func (c *Client) FetchRecipients(ctx context.Context, a activity.Activity) ([]*url.URL, error)
- func (c *Client) FetchRemoteActor(ctx context.Context, identifier string) (actor.Actor, error)
- func (c *Client) FetchRemotePerson(ctx context.Context, identifier string) (vocab.ActivityStreamsPerson, error)
- func (c *Client) FetchRemotePersonWithID(ctx context.Context, personID *url.URL) (vocab.ActivityStreamsPerson, error)
- func (c *Client) Invite(ctx context.Context, invite vocab.ActivityStreamsInvite, depth int, ...) error
- func (c *Client) Like(ctx context.Context, like vocab.ActivityStreamsLike, depth int, maxDepth int) error
- func (c *Client) LookupInstanceDetails(ctx context.Context, instanceURL *url.URL) (*InstanceDetails, error)
- func (c *Client) Note(ctx context.Context, note vocab.ActivityStreamsNote, depth int, maxDepth int) error
- func (c *Client) PostToInbox(ctx context.Context, inbox *url.URL, object vocab.Type, keyID string, ...) error
- func (c *Client) ResolveActorIdentifierToID(ctx context.Context, identifier string) (*url.URL, error)
- func (c *Client) WebfingerLookup(ctx context.Context, domain string, username string) (*WebfingerResponse, error)
- type Datastore
- type InstanceDetails
- type RedisCache
- type WebfingerLink
- type WebfingerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { InstanceURL *url.URL Cache Cache Client *http.Client // contains filtered or unexported fields }
func (*Client) Announce ¶
func (c *Client) Announce(ctx context.Context, announce vocab.ActivityStreamsAnnounce, depth int, maxDepth int) error
Announce dereferences the actor and object fields of the activity.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, create vocab.ActivityStreamsCreate, depth int, maxDepth int) error
Create dereferences the actor and object fields of the activity.
func (*Client) DereferenceActor ¶
func (c *Client) DereferenceActor(ctx context.Context, actor vocab.ActivityStreamsActorProperty, depth, maxDepth int) error
DereferenceActor dereferences the Actor property by fetching from an IRI.
func (*Client) DereferenceAttributedTo ¶
func (c *Client) DereferenceAttributedTo(ctx context.Context, attributedTo vocab.ActivityStreamsAttributedToProperty, depth, maxDepth int) error
DereferenceAttributedTo fetches the actors or objects in attributedTo field.
func (*Client) DereferenceFollowers ¶
func (c *Client) DereferenceFollowers(ctx context.Context, followers vocab.ActivityStreamsFollowersProperty, depth, maxDepth int) error
DereferenceFollowers fetches the collection and dereferences items.
func (*Client) DereferenceFollowing ¶
func (c *Client) DereferenceFollowing(ctx context.Context, following vocab.ActivityStreamsFollowingProperty, depth, maxDepth int) error
DereferenceFollowing fetches the collection and dereferences items.
func (*Client) DereferenceInReplyTo ¶
func (c *Client) DereferenceInReplyTo(ctx context.Context, inReplyTo vocab.ActivityStreamsInReplyToProperty, depth, maxDepth int) error
DereferenceInReplyTo fetches the actors or objects in inReplyTo field.
func (*Client) DereferenceItem ¶
func (c *Client) DereferenceItem(ctx context.Context, item vocab.Type, depth int, maxDepth int) (vocab.Type, error)
DereferenceItem will dereference activities and objects received.
func (*Client) DereferenceItems ¶
func (c *Client) DereferenceItems(ctx context.Context, items vocab.ActivityStreamsItemsProperty, depth int, maxDepth int) error
DereferenceItems fetches and dereferences objects in orderedItems. This is performed concurrently up to some limit.
func (*Client) DereferenceObjectsInCollection ¶
func (c *Client) DereferenceObjectsInCollection(ctx context.Context, collection vocab.ActivityStreamsCollection, page, depth, maxDepth int) (vocab.ActivityStreamsCollectionPage, error)
DereferenceObjectsInCollection retrieves items on the page and returns. If page is 0 then only the first page is dereferences. If the page is greater than the number of pages then
func (*Client) DereferenceObjectsInOrderedCollection ¶
func (c *Client) DereferenceObjectsInOrderedCollection(ctx context.Context, collection vocab.ActivityStreamsOrderedCollection, page, depth, maxDepth int) (vocab.ActivityStreamsOrderedCollectionPage, error)
DereferenceObjectsInOrderedCollection retrieves items on the specified page. If page is 0 then only the first page is dereferences. If the page is greater than the number of pages then
func (*Client) DereferenceOrderedItems ¶
func (c *Client) DereferenceOrderedItems(ctx context.Context, items vocab.ActivityStreamsOrderedItemsProperty, depth int, maxDepth int) error
DereferenceOrderedItems fetches and dereferences objects in orderedItems. This is performed concurrently up to some limit.
func (*Client) DereferenceOutbox ¶
func (c *Client) DereferenceOutbox(ctx context.Context, outbox vocab.ActivityStreamsOutboxProperty, depth, maxDepth int) error
DereferenceOutbox fetches the outbox at a given IRI and dereferences items.
func (*Client) DereferenceRecipientInboxes ¶
func (*Client) Event ¶
func (c *Client) Event(ctx context.Context, event vocab.ActivityStreamsEvent, depth int, maxDepth int) error
Event dereferences the fields up to the specified maxDepth on an Event. Dereferences "attributedTo" actors and objects.
func (*Client) FetchFollowers ¶
FetchFollowers determines the actors that follow a given person.
func (*Client) FetchObject ¶
func (c *Client) FetchObject(ctx context.Context, iri *url.URL, forceUpdate bool, depth int, maxDepth int) (vocab.Type, error)
FetchObject retrieves the resource located at the provided IRI. The client makes use of caching but this can be overridden.
func (*Client) FetchRecipients ¶
FetchRecipients returns a list of Actor IDs to deliver the activity to.
func (*Client) FetchRemoteActor ¶
FetchRemoteActor performs a Webfinger lookup and returns an Actor.
func (*Client) FetchRemotePerson ¶
func (c *Client) FetchRemotePerson(ctx context.Context, identifier string) (vocab.ActivityStreamsPerson, error)
FetchRemotePerson performs a Webfinger lookup and returns a Person.
func (*Client) FetchRemotePersonWithID ¶
func (c *Client) FetchRemotePersonWithID(ctx context.Context, personID *url.URL) (vocab.ActivityStreamsPerson, error)
FetchRemotePersonWithID uses the provided ID to retrieve a Person.
func (*Client) Invite ¶
func (c *Client) Invite(ctx context.Context, invite vocab.ActivityStreamsInvite, depth int, maxDepth int) error
Invite dereferences the actor and object fields of the activity.
func (*Client) Like ¶
func (c *Client) Like(ctx context.Context, like vocab.ActivityStreamsLike, depth int, maxDepth int) error
Like dereferences the actor fields of the activity.
func (*Client) LookupInstanceDetails ¶
func (c *Client) LookupInstanceDetails(ctx context.Context, instanceURL *url.URL) (*InstanceDetails, error)
LookupInstanceDetails checks if the URL is a FediUni instance.
func (*Client) Note ¶
func (c *Client) Note(ctx context.Context, note vocab.ActivityStreamsNote, depth int, maxDepth int) error
Note dereferences the fields up to the specified maxDepth on a Note. Dereferences "attributedTo" and "replies". The first and second page of the replies are dereferenced by default.
func (*Client) PostToInbox ¶
func (c *Client) PostToInbox(ctx context.Context, inbox *url.URL, object vocab.Type, keyID string, privateKey *rsa.PrivateKey) error
PostToInbox converts any activity to JSON and delivers to the inbox. Handles HTTP signatures.
func (*Client) ResolveActorIdentifierToID ¶
func (c *Client) ResolveActorIdentifierToID(ctx context.Context, identifier string) (*url.URL, error)
ResolveActorIdentifierToID converts an identifier to an ID using Webfinger.
func (*Client) WebfingerLookup ¶
func (c *Client) WebfingerLookup(ctx context.Context, domain string, username string) (*WebfingerResponse, error)
WebfingerLookup determines if an actor exists on an instance.
type InstanceDetails ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache wraps a Redis Client to implement the Cache interface.
type WebfingerLink ¶
type WebfingerResponse ¶
type WebfingerResponse struct { Subject string `json:"subject"` Links []WebfingerLink `json:"links"` }