Documentation
¶
Index ¶
- Constants
- type Activities
- func NewActivities(path string, refType spi.ReferenceType, cfg *Config, activityStore spi.Store, ...) *Activities
- func NewInbox(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
- func NewLiked(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
- func NewLikes(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
- func NewOutbox(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
- func NewShares(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
- type Config
- type Outbox
- type Reference
- func NewFollowers(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Reference
- func NewFollowing(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Reference
- func NewReference(path string, refType spi.ReferenceType, sortOrder spi.SortOrder, ordered bool, ...) *Reference
- func NewWitnesses(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Reference
- func NewWitnessing(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Reference
- type Services
Constants ¶
const ( // PublicKeysPath specifies the service's "keys" endpoint. PublicKeysPath = "/keys/{id}" // FollowersPath specifies the service's 'followers' endpoint. FollowersPath = "/followers" // FollowingPath specifies the service's 'following' endpoint. FollowingPath = "/following" // OutboxPath specifies the service's 'outbox' endpoint. OutboxPath = "/outbox" // InboxPath specifies the service's 'inbox' endpoint. InboxPath = "/inbox" // WitnessesPath specifies the service's 'witnesses' endpoint. WitnessesPath = "/witnesses" // WitnessingPath specifies the service's 'witnessing' endpoint. WitnessingPath = "/witnessing" // LikedPath specifies the service's 'liked' endpoint. LikedPath = "/liked" SharesPath = "/{id}/shares" // LikesPath specifies the object's 'likes' endpoint. LikesPath = "/{id}/likes" )
const MainKeyID = "main-key"
MainKeyID is the ID of the service's public key.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activities ¶
type Activities struct {
// contains filtered or unexported fields
}
Activities implements a REST handler that retrieves activities.
func NewActivities ¶
func NewActivities(path string, refType spi.ReferenceType, cfg *Config, activityStore spi.Store, getObjectIRI getObjectIRIFunc, getID getIDFunc, verifier signatureVerifier) *Activities
NewActivities returns a new activities REST handler.
func NewInbox ¶
func NewInbox(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
NewInbox returns a new 'inbox' REST handler that retrieves a service's inbox.
func NewLiked ¶
func NewLiked(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
NewLiked returns a new 'liked' REST handler that retrieves a service's 'Like' activities, i.e. the Like activities that were posted by the given service.
func NewLikes ¶
func NewLikes(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
NewLikes returns a new 'likes' REST handler that retrieves an object's 'Like' activities.
func NewOutbox ¶
func NewOutbox(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
NewOutbox returns a new 'outbox' REST handler that retrieves a service's outbox.
func NewShares ¶
func NewShares(cfg *Config, activityStore spi.Store, verifier signatureVerifier) *Activities
NewShares returns a new 'shares' REST handler that retrieves an object's 'Announce' activities.
func (Activities) Handler ¶
func (h Activities) Handler() common.HTTPRequestHandler
Handler returns the handler that should be invoked when an HTTP GET is requested to the target endpoint. This handler must be registered with an HTTP server.
func (Activities) Method ¶
func (h Activities) Method() string
Method returns the HTTP method, which is always GET.
type Outbox ¶
type Outbox struct {
*Config
// contains filtered or unexported fields
}
Outbox implements a REST handler for posts to a service's outbox.
func NewPostOutbox ¶
NewPostOutbox returns a new REST handler to post activities to the outbox.
func (*Outbox) Handler ¶
func (h *Outbox) Handler() common.HTTPRequestHandler
Handler returns the handler that should be invoked when an HTTP POST is requested to the target endpoint. This handler must be registered with an HTTP server.
type Reference ¶
type Reference struct {
// contains filtered or unexported fields
}
Reference implements a REST handler that retrieves references as a collection of IRIs.
func NewFollowers ¶
NewFollowers returns a new 'followers' REST handler that retrieves a service's list of followers.
func NewFollowing ¶
NewFollowing returns a new 'following' REST handler that retrieves a service's list of following.
func NewReference ¶
func NewReference(path string, refType spi.ReferenceType, sortOrder spi.SortOrder, ordered bool, cfg *Config, activityStore spi.Store, getObjectIRI getObjectIRIFunc, getID getIDFunc, verifier signatureVerifier) *Reference
NewReference returns a new reference REST handler.
func NewWitnesses ¶
NewWitnesses returns a new 'witnesses' REST handler that retrieves a service's list of witnesses.
func NewWitnessing ¶
NewWitnessing returns a new 'witnessing' REST handler that retrieves collection of the services that the local service is witnessing.
func (Reference) Handler ¶
func (h Reference) Handler() common.HTTPRequestHandler
Handler returns the handler that should be invoked when an HTTP GET is requested to the target endpoint. This handler must be registered with an HTTP server.
func (Reference) Method ¶
func (h Reference) Method() string
Method returns the HTTP method, which is always GET.
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
Services implements the 'services' REST handler to retrieve a given ActivityPub service (actor).
func NewPublicKeys ¶
NewPublicKeys returns a new public keys REST handler.
func NewServices ¶
NewServices returns a new 'services' REST handler.
func (Services) Handler ¶
func (h Services) Handler() common.HTTPRequestHandler
Handler returns the handler that should be invoked when an HTTP GET is requested to the target endpoint. This handler must be registered with an HTTP server.
func (Services) Method ¶
func (h Services) Method() string
Method returns the HTTP method, which is always GET.