surface

package
v1.2.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

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

func SharedInboxURL(baseURL string) string

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 {
	SharedInbox EndpointManifest
}

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

type MethodPolicy struct {
	Method     string
	Served     bool
	StatusCode int
}

MethodPolicy describes how a served federation endpoint handles an HTTP method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL