Expand description
Serving: what Ojak answers when another server, or a person, sends a GET.
An application builds one Federation at start-up, registering a
dispatcher for each kind of actor, object and collection it serves, each
with the URI template that both routes requests to it and builds its URIs.
WebFinger and host-meta follow from the actors, and NodeInfo from one more
dispatcher. docs/guide/serving.md explains it.
Federation::handle answers a request in http types, so that it works
under any server framework; ojak-axum adapts it to axum.
Re-exports§
pub use crate::template::Values;
Structs§
- Actor
Ref - An actor, as the application names it: its kind and its identifier.
- Build
Error - Why a federation could not be built.
- Builder
- Builds a
Federation. - Collection
- A collection’s dispatchers.
- Collection
Document - An ActivityStreams collection or collection page, written as a document:
what Ojak serves a
Collectionas, for an application that serves one itself, such as a collection paged by a query of its own or embedded in another object. - Collection
Ref - A collection of this server’s, as the application registered it.
- Context
- What every callback receives: the application’s data, the canonical origin, and the request, if there is one. Cheap to clone.
- Federation
- Everything Ojak serves, and the URIs it builds. Cheap to clone.
- Forward
- An activity to forward, as it was authenticated here: the receiver establishes it for itself, from its proof or from its origin, since the signature on the forward is this server’s.
- Gateway
Inbox - A portable inbox this server is a gateway for, as the application describes it: who receives what arrives there, and every gateway the actor lists, this one included.
- Inbox
Worker - Runs the listeners for activities queued in an inbox’s queue.
- Inbox
Worker Config - How an
InboxWorkerruns. - Known
Key - A key the application already holds for a key ID: its PEM, and the actor that published it.
- Node
Info - A server’s NodeInfo, in the 2.1 schema; 2.0 is served from it without what 2.0 lacks.
- Page
- One page of a collection.
- Received
- An activity, as a listener receives it.
- Software
- The software a server runs.
- Uris
- The URIs of what a federation serves, in one origin, built from the templates their routes were registered with.
- Usage
- How much a server is used.
Enums§
- Access
- What a guard (
Builder::guard) makes of a request. - First
- Where a paged collection starts.
- Forward
To - Where an activity is forwarded.
- Found
- What a dispatcher found.
- Handled
- What
Federation::handlemade of a request. - Public
Key - A public key an actor publishes.
- Route
- What an IRI of ours is, from
Context::parse_uri. - Signing
- How a GET was signed, as
Context::signingtells it. - UriError
- Why a URI could not be built.
- Vouched
By - What an activity was taken on: whose word it is that its actor sent it.
Constants§
- ACTIVITY_
JSON - The media type every ActivityPub document is served as.
- MAX_
INBOX_ BODY - The largest activity an inbox reads.
- PORTABLE_
JSON - The media type a gateway serves portable objects as (FEP-ef61).
Functions§
- default_
context - The
@contexta document gets when its dispatcher gave it none: ActivityStreams, with the security and Multikey vocabularies that keys are written in. - with_
keys - Put
keysintoactor, a document whoseidis set: the first RSA key aspublicKey, and every Multikey inassertionMethod.
Type Aliases§
- Error
- What a dispatcher’s error is turned into: anything that is an error, a
String, or ananyhow::Error.