Skip to content

Commit

Permalink
Add PostInboxScheme and PostOutboxScheme to Actor
Browse files Browse the repository at this point in the history
  • Loading branch information
cjslep committed Dec 13, 2020
1 parent be7f23b commit 472d901
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pub/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ type Actor interface {
// If the Federated Protocol is not enabled, writes the
// http.StatusMethodNotAllowed status code in the response. No side
// effects occur.
//
// The request and data of your application will be interpreted as
// having an HTTPS protocol scheme.
PostInbox(c context.Context, w http.ResponseWriter, r *http.Request) (bool, error)
// PostInboxScheme is similar to PostInbox, except clients are able to
// specify which protocol scheme to handle the incoming request and the
// data stored within the application (HTTP, HTTPS, etc).
PostInboxScheme(c context.Context, w http.ResponseWriter, r *http.Request, scheme string) (bool, error)
// GetInbox returns true if the request was handled as an ActivityPub
// GET to an actor's inbox. If false, the request was not an ActivityPub
// request and may still be handled by the caller in another way, such
Expand Down Expand Up @@ -76,7 +83,13 @@ type Actor interface {
// If the Social and Federated Protocol are both enabled, it will handle
// the side effects of receiving an ActivityStream Activity, and then
// federate the Activity to peers.
//
// The request will be interpreted as having an HTTPS scheme.
PostOutbox(c context.Context, w http.ResponseWriter, r *http.Request) (bool, error)
// PostOutboxScheme is similar to PostOutbox, except clients are able to
// specify which protocol scheme to handle the incoming request and the
// data stored within the application (HTTP, HTTPS, etc).
PostOutboxScheme(c context.Context, w http.ResponseWriter, r *http.Request, scheme string) (bool, error)
// GetOutbox returns true if the request was handled as an ActivityPub
// GET to an actor's outbox. If false, the request was not an
// ActivityPub request.
Expand Down

0 comments on commit 472d901

Please sign in to comment.