restructuring federator

This commit is contained in:
tsmethurst 2021-04-29 17:54:28 +02:00
commit b777a682fe
15 changed files with 410 additions and 195 deletions

View file

@ -57,6 +57,11 @@ const (
APActivityKey APContextKey = "activity"
// APUsernameKey can be used to set and retrieve the username of the user being interacted with.
APUsernameKey APContextKey = "username"
// APAccountKey can be used the set and retrieve the account being interacted with
APAccountKey APContextKey = "account"
// APPrivateAccessKey can be used to set and retrieve whether or not the requesting account
// OWNS the inbox or outbox being interacted with. If so, it should be able to see everything in that box.
APPrivateAccessKey APContextKey = "privateAccess"
// APRequestingHostKey can be used to set and retrieve the host of an incoming federation request.
APRequestingHostKey APContextKey = "requestingHost"
// APRequestingAccountKey can be used to set and retrieve the account of an incoming federation request.
@ -64,6 +69,7 @@ const (
)
type ginContextKey struct{}
// GinContextKey is used solely for setting and retrieving the gin context from a context.Context
var GinContextKey = &ginContextKey{}