Documentation
¶
Overview ¶
Package surface defines the deploy-time ActivityPub federation surface contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SharedInboxURL ¶
SharedInboxURL returns the canonical shared inbox URL when the surface advertises it.
Types ¶
type EndpointManifest ¶
type EndpointManifest struct {
Path string
Advertised bool
Policies []MethodPolicy
}
EndpointManifest describes the deploy-time contract for one federation endpoint.
func SharedInbox ¶
func SharedInbox() EndpointManifest
SharedInbox returns the shared inbox endpoint contract.
func (EndpointManifest) AllowsMethod ¶
func (e EndpointManifest) AllowsMethod(method string) bool
AllowsMethod reports whether the method is served as an allowed success path.
func (EndpointManifest) MethodStatus ¶
func (e EndpointManifest) MethodStatus(method string) (int, bool)
MethodStatus returns the explicit served status for a method when one is defined.
func (EndpointManifest) ServedMethods ¶
func (e EndpointManifest) ServedMethods() []string
ServedMethods returns the ordered list of explicitly served methods for the endpoint.
func (EndpointManifest) ServesMethod ¶
func (e EndpointManifest) ServesMethod(method string) bool
ServesMethod reports whether the endpoint is explicitly served for the given method.
type FederationManifest ¶
type FederationManifest struct {
}
FederationManifest is the source of truth for deploy-time federation surface support.
func Current ¶
func Current() FederationManifest
Current returns the active deploy-time federation surface manifest.
type MethodPolicy ¶
MethodPolicy describes how a served federation endpoint handles an HTTP method.