Versions in this module Expand all Collapse all v0 v0.1.2 Nov 16, 2018 Changes in this version + type Application interface + CanAdd func(c context.Context, o vocab.ObjectType, t vocab.ObjectType) bool + CanRemove func(c context.Context, o vocab.ObjectType, t vocab.ObjectType) bool + Get func(c context.Context, id *url.URL, rw RWType) (PubObject, error) + GetAsVerifiedUser func(c context.Context, id, authdUser *url.URL, rw RWType) (PubObject, error) + GetInbox func(c context.Context, r *http.Request, rw RWType) (vocab.OrderedCollectionType, error) + GetOutbox func(c context.Context, r *http.Request, rw RWType) (vocab.OrderedCollectionType, error) + GetPublicKey func(c context.Context, publicKeyId string) (pubKey crypto.PublicKey, algo httpsig.Algorithm, user *url.URL, err error) + Has func(c context.Context, id *url.URL) (bool, error) + NewId func(c context.Context, t Typer) *url.URL + Owns func(c context.Context, id *url.URL) bool + Set func(c context.Context, o PubObject) error + type Callbacker interface + Accept func(c context.Context, s *streams.Accept) error + Add func(c context.Context, s *streams.Add) error + Block func(c context.Context, s *streams.Block) error + Create func(c context.Context, s *streams.Create) error + Delete func(c context.Context, s *streams.Delete) error + Follow func(c context.Context, s *streams.Follow) error + Like func(c context.Context, s *streams.Like) error + Reject func(c context.Context, s *streams.Reject) error + Remove func(c context.Context, s *streams.Remove) error + Undo func(c context.Context, s *streams.Undo) error + Update func(c context.Context, s *streams.Update) error + type Clock interface + Now func() time.Time + type Deliverer interface + Do func(b []byte, to *url.URL, toDo func(b []byte, u *url.URL) error) + type FederateAPI interface + FilterForwarding func(c context.Context, activity vocab.ActivityType, iris []*url.URL) ([]*url.URL, error) + NewSigner func() (httpsig.Signer, error) + OnFollow func(c context.Context, s *streams.Follow) FollowResponse + PrivateKey func(boxIRI *url.URL) (privKey crypto.PrivateKey, pubKeyId string, err error) + Unblocked func(c context.Context, actorIRIs []*url.URL) error + type FederateApplication interface + type FollowResponse int + const AutomaticAccept + const AutomaticReject + const DoNothing + type HandlerFunc func(context.Context, http.ResponseWriter, *http.Request) (bool, error) + func ServeActivityPubObject(a Application, clock Clock) HandlerFunc + func ServeActivityPubObjectWithVerificationMethod(a Application, clock Clock, verifierFn func(context.Context) SocialAPIVerifier) HandlerFunc + type HttpClient interface + Do func(req *http.Request) (*http.Response, error) + type PubObject interface + AppendType func(interface{}) + GetId func() *url.URL + HasId func() bool + RemoveType func(int) + SetId func(*url.URL) + func ToPubObject(m map[string]interface{}) (t []PubObject, e error) + type Pubber interface + GetInbox func(c context.Context, w http.ResponseWriter, r *http.Request) (bool, error) + GetOutbox func(c context.Context, w http.ResponseWriter, r *http.Request) (bool, error) + PostInbox func(c context.Context, w http.ResponseWriter, r *http.Request) (bool, error) + PostOutbox func(c context.Context, w http.ResponseWriter, r *http.Request) (bool, error) + func NewFederatingPubber(clock Clock, app FederateApplication, cb Callbacker, d Deliverer, ...) Pubber + func NewPubber(clock Clock, app SocialFederateApplication, client, server Callbacker, ...) Pubber + func NewSocialPubber(clock Clock, app SocialApplication, cb Callbacker) Pubber + type RWType int + const Read + const ReadWrite + type SocialAPI interface + ActorIRI func(c context.Context, r *http.Request) (*url.URL, error) + GetPublicKeyForOutbox func(c context.Context, publicKeyId string, boxIRI *url.URL) (crypto.PublicKey, httpsig.Algorithm, error) + GetSocialAPIVerifier func(c context.Context) SocialAPIVerifier + type SocialAPIVerifier interface + Verify func(r *http.Request) (authenticatedUser *url.URL, authn, authz bool, err error) + VerifyForOutbox func(r *http.Request, outbox *url.URL) (authn, authz bool, err error) + type SocialApplication interface + type SocialFederateApplication interface + type Typer interface