Documentation ¶
Index ¶
- func NewActor(c *config.Config, a app.Application, clock *Clock, db *Database, apdb *APDB, ...) (actor pub.Actor, err error)
- func NewActorMap(c *config.Config, clock *Clock, db *Database, apdb *APDB, ...) (actorMap map[paths.Actor]pub.Actor)
- type APDB
- type Clock
- type CommonBehavior
- func (a *CommonBehavior) AuthenticateGetInbox(c context.Context, w http.ResponseWriter, r *http.Request) (newCtx context.Context, authenticated bool, err error)
- func (a *CommonBehavior) AuthenticateGetOutbox(c context.Context, w http.ResponseWriter, r *http.Request) (newCtx context.Context, authenticated bool, err error)
- func (a *CommonBehavior) GetOutbox(c context.Context, r *http.Request) (ocp vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (a *CommonBehavior) NewTransport(c context.Context, actorBoxIRI *url.URL, gofedAgent string) (t pub.Transport, err error)
- type Database
- func (d *Database) ActorForInbox(c context.Context, inboxIRI *url.URL) (actorIRI *url.URL, err error)
- func (d *Database) ActorForOutbox(c context.Context, outboxIRI *url.URL) (actorIRI *url.URL, err error)
- func (d *Database) Begin() app.TxBuilder
- func (d *Database) Create(c context.Context, asType vocab.Type) (err error)
- func (d *Database) Delete(c context.Context, id *url.URL) (err error)
- func (d *Database) Exists(c context.Context, id *url.URL) (exists bool, err error)
- func (d *Database) Followers(c context.Context, actorIRI *url.URL) (followers vocab.ActivityStreamsCollection, err error)
- func (d *Database) Following(c context.Context, actorIRI *url.URL) (followers vocab.ActivityStreamsCollection, err error)
- func (d *Database) Get(c context.Context, id *url.URL) (value vocab.Type, err error)
- func (d *Database) GetInbox(c context.Context, inboxIRI *url.URL) (inbox vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (d *Database) GetOutbox(c context.Context, outboxIRI *url.URL) (outbox vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (d *Database) GetPublicInbox(c context.Context, inboxIRI *url.URL) (inbox vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (d *Database) GetPublicOutbox(c context.Context, outboxIRI *url.URL) (outbox vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (d *Database) InboxContains(c context.Context, inbox, id *url.URL) (contains bool, err error)
- func (d *Database) Liked(c context.Context, actorIRI *url.URL) (followers vocab.ActivityStreamsCollection, err error)
- func (d *Database) OutboxForInbox(c context.Context, inboxIRI *url.URL) (outboxIRI *url.URL, err error)
- func (d *Database) Owns(c context.Context, id *url.URL) (owns bool, err error)
- func (d *Database) SetInbox(c context.Context, inbox vocab.ActivityStreamsOrderedCollectionPage) error
- func (d *Database) SetOutbox(c context.Context, outbox vocab.ActivityStreamsOrderedCollectionPage) error
- func (d *Database) Update(c context.Context, asType vocab.Type) (err error)
- type FederatingBehavior
- func (f *FederatingBehavior) AuthenticatePostInbox(c context.Context, w http.ResponseWriter, r *http.Request) (out context.Context, authenticated bool, err error)
- func (f *FederatingBehavior) Blocked(c context.Context, actorIRIs []*url.URL) (blocked bool, err error)
- func (f *FederatingBehavior) DefaultCallback(c context.Context, activity pub.Activity) error
- func (f *FederatingBehavior) FederatingCallbacks(c context.Context) (wrapped pub.FederatingWrappedCallbacks, other []interface{}, err error)
- func (f *FederatingBehavior) FilterForwarding(c context.Context, potentialRecipients []*url.URL, a pub.Activity) (filteredRecipients []*url.URL, err error)
- func (f *FederatingBehavior) GetInbox(c context.Context, r *http.Request) (ocp vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (f *FederatingBehavior) MaxDeliveryRecursionDepth(c context.Context) int
- func (f *FederatingBehavior) MaxInboxForwardingRecursionDepth(c context.Context) int
- func (f *FederatingBehavior) PostInboxRequestBodyHook(c context.Context, r *http.Request, activity pub.Activity) (out context.Context, err error)
- type SocialBehavior
- func (s *SocialBehavior) AuthenticatePostOutbox(c context.Context, w http.ResponseWriter, r *http.Request) (out context.Context, authenticated bool, err error)
- func (s *SocialBehavior) DefaultCallback(c context.Context, activity pub.Activity) error
- func (s *SocialBehavior) PostOutboxRequestBodyHook(c context.Context, r *http.Request, data vocab.Type) (out context.Context, err error)
- func (s *SocialBehavior) SocialCallbacks(c context.Context) (wrapped pub.SocialWrappedCallbacks, other []interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
type CommonBehavior ¶
type CommonBehavior struct {
// contains filtered or unexported fields
}
func NewCommonBehavior ¶
func NewCommonBehavior( app app.Application, db *Database, tc *conn.Controller, o *oauth2.Server, pk *services.PrivateKeys) *CommonBehavior
func (*CommonBehavior) AuthenticateGetInbox ¶
func (*CommonBehavior) AuthenticateGetOutbox ¶
func (*CommonBehavior) GetOutbox ¶
func (a *CommonBehavior) GetOutbox(c context.Context, r *http.Request) (ocp vocab.ActivityStreamsOrderedCollectionPage, err error)
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) ActorForInbox ¶
func (*Database) ActorForOutbox ¶
func (*Database) GetPublicInbox ¶
func (*Database) GetPublicOutbox ¶
func (*Database) InboxContains ¶
func (*Database) OutboxForInbox ¶
func (*Database) SetInbox ¶
func (d *Database) SetInbox(c context.Context, inbox vocab.ActivityStreamsOrderedCollectionPage) error
NOTE: This only prepends the FIRST item in the orderedItems property.
type FederatingBehavior ¶
type FederatingBehavior struct {
// contains filtered or unexported fields
}
func NewFederatingBehavior ¶
func NewFederatingBehavior(c *config.Config, a app.S2SApplication, db *Database, po *services.Policies, pk *services.PrivateKeys, f *services.Followers, u *services.Users, tc *conn.Controller) *FederatingBehavior
func (*FederatingBehavior) AuthenticatePostInbox ¶
func (*FederatingBehavior) DefaultCallback ¶
func (*FederatingBehavior) FederatingCallbacks ¶
func (f *FederatingBehavior) FederatingCallbacks(c context.Context) (wrapped pub.FederatingWrappedCallbacks, other []interface{}, err error)
func (*FederatingBehavior) FilterForwarding ¶
func (*FederatingBehavior) GetInbox ¶
func (f *FederatingBehavior) GetInbox(c context.Context, r *http.Request) (ocp vocab.ActivityStreamsOrderedCollectionPage, err error)
func (*FederatingBehavior) MaxDeliveryRecursionDepth ¶
func (f *FederatingBehavior) MaxDeliveryRecursionDepth(c context.Context) int
func (*FederatingBehavior) MaxInboxForwardingRecursionDepth ¶
func (f *FederatingBehavior) MaxInboxForwardingRecursionDepth(c context.Context) int
type SocialBehavior ¶
type SocialBehavior struct {
// contains filtered or unexported fields
}
func NewSocialBehavior ¶
func NewSocialBehavior(app app.C2SApplication, o *oauth2.Server) *SocialBehavior
func (*SocialBehavior) AuthenticatePostOutbox ¶
func (*SocialBehavior) DefaultCallback ¶
func (*SocialBehavior) PostOutboxRequestBodyHook ¶
func (*SocialBehavior) SocialCallbacks ¶
func (s *SocialBehavior) SocialCallbacks(c context.Context) (wrapped pub.SocialWrappedCallbacks, other []interface{}, err error)
Click to show internal directories.
Click to hide internal directories.