routing

package
v1.1.21 Latest Latest
Warning

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

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

Documentation

Overview

Package routing implements error handlers for the inbox Lambda function.

Package routing implements the inbox Lambda function for receiving ActivityPub federation messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRecoveryConfirmationActivity

func CreateRecoveryConfirmationActivity(requestID, trusteeActorID, systemActorID string) *activitypub.Activity

CreateRecoveryConfirmationActivity creates an ActivityPub activity for confirming a recovery request

func CreateTrusteeAcceptanceActivity

func CreateTrusteeAcceptanceActivity(inviterUsername, trusteeActorID, inviterActorID string) *activitypub.Activity

CreateTrusteeAcceptanceActivity creates an ActivityPub activity for accepting a trustee invitation

func Run

func Run()

Run initializes dependencies and starts the inbox Lambda handler.

Types

type InboxHandler

type InboxHandler struct {
	// contains filtered or unexported fields
}

InboxHandler handles ActivityPub inbox requests using AppTheory.

func NewInboxHandler

func NewInboxHandler(lambdaCtx *common.LambdaContext) (*InboxHandler, error)

NewInboxHandler creates a new inbox handler using standardized initialization

func (*InboxHandler) RegisterRoutes

func (ih *InboxHandler) RegisterRoutes(app *apptheory.App)

RegisterRoutes registers all inbox routes

type InboxRequest

type InboxRequest struct {
	Username    string
	Activity    *activitypub.Activity
	Actor       *activitypub.Actor
	Body        []byte
	ActorDomain string
	StartTime   time.Time
	CostParams  *federation.CostCalculationParams
}

InboxRequest represents an incoming ActivityPub request

type RecoveryActivityHandler

type RecoveryActivityHandler struct {
	// contains filtered or unexported fields
}

RecoveryActivityHandler handles recovery-related ActivityPub activities

func NewRecoveryActivityHandler

func NewRecoveryActivityHandler(userRepository *repositories.UserRepository, recoveryRepository *repositories.RecoveryRepository, recoveryFedService *auth.RecoveryFederationService, logger *zap.Logger) *RecoveryActivityHandler

NewRecoveryActivityHandler creates a new recovery activity handler

func (*RecoveryActivityHandler) HandleActivity

func (h *RecoveryActivityHandler) HandleActivity(ctx context.Context, activity *activitypub.Activity) error

HandleActivity processes incoming recovery-related activities

Jump to

Keyboard shortcuts

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