Documentation
¶
Overview ¶
Package hannibal provides shared helpers and constants for the Hannibal ActivityPub toolkit. Its subpackages implement the inbox router, outbox, HTTP signatures, ActivityStreams document handling, and related machinery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsActivityPubContentType ¶
IsActivityPubContentType returns TRUE if the provided contentType is a valid ActivityPub content type. https://www.w3.org/TR/activitystreams-core/#media-type
func IsActivityPubRequest ¶ added in v0.15.1
IsActivityPubRequest returns TRUE if the request's "Accept" header asks for ActivityPub.
func IsUndoableActivity ¶ added in v0.13.1
IsUndoableActivity returns TRUE if the provided activityType is one that can be undone (as opposed to an activity that must be "Deleted")
func NotActivityPubRequest ¶ added in v0.15.1
NotActivityPubRequest returns TRUE if the request's "Accept" header DOES NOT ask for ActivityPub.
func StripBlindRecipients ¶ added in v0.48.0
StripBlindRecipients returns a deep copy of a document with `bto` and `bcc` removed at every level of nesting. The original is not changed, and the copy keeps the type of every value.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package clients provides streams.Client implementations that load ActivityStreams documents from remote servers, with caching and lookup strategies.
|
Package clients provides streams.Client implementations that load ActivityStreams documents from remote servers, with caching and lookup strategies. |
|
Package collection is an HTTP interface for GET-ing activities from an ActivityPub collection.
|
Package collection is an HTTP interface for GET-ing activities from an ActivityPub collection. |
|
Package collections provides tools for traversing ActivityStreams collections, represented as streams.Documents, including pagination.
|
Package collections provides tools for traversing ActivityStreams collections, represented as streams.Documents, including pagination. |
|
Package corpus holds ActivityStreams documents for tests: a set shaped like what fediverse servers publish, and the examples that the W3C publishes with the ActivityStreams specifications.
|
Package corpus holds ActivityStreams documents for tests: a set shaped like what fediverse servers publish, and the examples that the W3C publishes with the ActivityStreams specifications. |
|
Package datetime formats timestamps for ActivityStreams 2.0 date-time properties, such as "published", "updated", and "startTime".
|
Package datetime formats timestamps for ActivityStreams 2.0 date-time properties, such as "published", "updated", and "startTime". |
|
Package delivery turns one outbound ActivityPub activity into deliveries to the people it names.
|
Package delivery turns one outbound ActivityPub activity into deliveries to the people it names. |
|
Package metadata carries server-computed metadata about ActivityStream documents -- knowledge that is ABOUT a document but never part of its wire value.
|
Package metadata carries server-computed metadata about ActivityStream documents -- knowledge that is ABOUT a document but never part of its wire value. |
|
Package outbox mimics an ActivityPub outbox: it accepts a document, signs it, and delivers it to the recipients addressed by the activity.
|
Package outbox mimics an ActivityPub outbox: it accepts a document, signs it, and delivers it to the recipients addressed by the activity. |
|
Package property wraps common data values with the conversions used in ActivityStreams.
|
Package property wraps common data values with the conversions used in ActivityStreams. |
|
Package router provides an ActivityPub inbox handler that parses and validates incoming activities, then routes them by type and object to application logic.
|
Package router provides an ActivityPub inbox handler that parses and validates incoming activities, then routes them by type and object to application logic. |
|
Package sender provides an object and queue consumer that can send outbound ActivityPub activities from an outbox to actor's inbox URLs.
|
Package sender provides an object and queue consumer that can send outbound ActivityPub activities from an outbox to actor's inbox URLs. |
|
Package sigs implements the IETF draft specification "Signing HTTP Messages" https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures https://swicg.github.io/activitypub-http-signature/
|
Package sigs implements the IETF draft specification "Signing HTTP Messages" https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures https://swicg.github.io/activitypub-http-signature/ |
|
Package streams implements the ActivityStreams 2.0 specification, providing a simplified view of JSON-LD documents for reading and writing ActivityPub data.
|
Package streams implements the ActivityStreams 2.0 specification, providing a simplified view of JSON-LD documents for reading and writing ActivityPub data. |
|
Command test-signatures is a manual harness for exercising Hannibal's HTTP signature signing and verification against real-world requests.
|
Command test-signatures is a manual harness for exercising Hannibal's HTTP signature signing and verification against real-world requests. |
|
Package validator provides pluggable validators that confirm an inbound ActivityPub activity is authentic before the router hands it to application code.
|
Package validator provides pluggable validators that confirm an inbound ActivityPub activity is authentic before the router hands it to application code. |
|
Package vocab defines the commonly used constants from the ActivityStreams Vocabulary, along with simple validation helpers that confirm a string matches a designated type.
|
Package vocab defines the commonly used constants from the ActivityStreams Vocabulary, along with simple validation helpers that confirm a string matches a designated type. |