Documentation
¶
Overview ¶
Package inbox is the inbound side of the ActivityPub federation subsystem: parses verified inbound activities, dispatches them to per-type handlers (Follow, Like, Announce, Undo, Create, Update), and records accepted activities. Construct via New(Deps) and call Start(ctx) to spin up the request worker pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Persistence *persistence.Service
Workerpool *workerpool.Service
Webhooks *webhooks.Service
Chat *chat.Service
Followers followersrepository.FollowersRepository
ConfigRepository configrepository.ConfigRepository
Builder *apmodels.Builder
Resolver *apresolvers.Resolver
Events *dispatcher.Dispatcher
}
Deps is the explicit dependency contract for inbox.
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job bundles a single inbound HTTP request for a worker.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns the inbound inbox worker pool and routes verified activities to their per-type handlers. It composes the persistence service (to record accepted activities) and the followers repository (to track follow/unfollow state).
func (*Service) AddToQueue ¶
func (s *Service) AddToQueue(req apmodels.InboxRequest)
AddToQueue queues an inbound request for the worker pool.
func (*Service) Start ¶
func (s *Service) Start()
Start launches the inbox worker pool. Safe to call once.
func (*Service) Verify ¶
Verify validates the HTTP signature of an inbound request against the signing actor's public key and checks it against blocked domains/actors. On success it returns the verified key owner's actor IRI (used by the caller to bind the activity's actor to its signer); on failure it returns a nil IRI and an error. nolint: cyclop