Documentation ¶
Overview ¶
Package outbox handles user actions and translates them into outgoing activities.
Outgoing activities are queued and delivered by [fed.Queue].
Index ¶
- Variables
- func Accept(ctx context.Context, domain string, followed, follower, followID string, ...) error
- func Announce(ctx context.Context, domain string, tx *sql.Tx, actor *ap.Actor, ...) error
- func Create(ctx context.Context, domain string, cfg *cfg.Config, db *sql.DB, ...) error
- func Delete(ctx context.Context, domain string, cfg *cfg.Config, db *sql.DB, ...) error
- func Follow(ctx context.Context, domain string, follower *ap.Actor, followed string, ...) error
- func ForwardActivity[T ap.RawActivity](ctx context.Context, domain string, cfg *cfg.Config, tx *sql.Tx, ...) error
- func Move(ctx context.Context, db *sql.DB, domain string, from *ap.Actor, to string) error
- func Undo(ctx context.Context, domain string, db *sql.DB, activity *ap.Activity) error
- func Unfollow(ctx context.Context, domain string, db *sql.DB, ...) error
- func UpdateActor(ctx context.Context, domain string, tx *sql.Tx, actorID string) error
- func UpdateNote(ctx context.Context, domain string, cfg *cfg.Config, db *sql.DB, ...) error
- type Mover
- type Poller
Constants ¶
This section is empty.
Variables ¶
var ErrDeliveryQueueFull = errors.New("delivery queue is full")
Functions ¶
func Accept ¶
func Accept(ctx context.Context, domain string, followed, follower, followID string, db *sql.DB) error
Accept queues an Accept activity for delivery.
func Announce ¶
func Announce(ctx context.Context, domain string, tx *sql.Tx, actor *ap.Actor, note *ap.Object) error
Announce queues an Announce activity for delivery.
func Create ¶
func Create(ctx context.Context, domain string, cfg *cfg.Config, db *sql.DB, post *ap.Object, author *ap.Actor) error
Create queues a Create activity for delivery.
func Follow ¶
func Follow(ctx context.Context, domain string, follower *ap.Actor, followed string, db *sql.DB) error
Follow queues a Follow activity for delivery.
func ForwardActivity ¶
func ForwardActivity[T ap.RawActivity](ctx context.Context, domain string, cfg *cfg.Config, tx *sql.Tx, note *ap.Object, activity *ap.Activity, rawActivity T) error
ForwardActivity forwards an activity if needed. A reply by B in a thread started by A is forwarded to all followers of A. A post by a follower of a local group, which mentions the group or replies to a post in the group, is forwarded to followers of the group.
func Unfollow ¶
func Unfollow(ctx context.Context, domain string, db *sql.DB, follower, followed, followID string) error
Unfollow queues an Unfollow activity for delivery.
func UpdateActor ¶
UpdateActor queues an Update activity for delivery.