Documentation ¶
Index ¶
- Constants
- Variables
- func AddKeyToPerson(metaSaver storage.MetadataTyper, typ string) func(act *vocab.Actor) error
- func CacheKey(fb FedBOX, r http.Request) vocab.IRI
- func CleanRequestPath(next http.Handler) http.Handler
- func GenerateECKeyPair() (pem.Block, pem.Block)
- func GenerateID(base vocab.IRI) func(it vocab.Item, col vocab.Item, by vocab.Item) (vocab.ID, error)
- func GenerateRSAKeyPair() (pem.Block, pem.Block)
- func HandleActivity(fb FedBOX) processing.ActivityHandlerFn
- func HandleCollection(fb FedBOX) processing.CollectionHandlerFn
- func HandleItem(fb FedBOX) processing.ItemHandlerFn
- func SetCORSHeaders(next http.Handler) http.Handler
- func Storage(c config.Options, l lw.Logger) (st.FullStorage, error)
- func ValidateRequest(r *http.Request) (bool, error)
- type FedBOX
- type LogFn
Constants ¶
View Source
const ( KeyTypeECDSA = "ECDSA" KeyTypeED25519 = "ED25519" KeyTypeRSA = "RSA" )
Variables ¶
View Source
var InternalIRI = vocab.IRI("https://fedbox/")
Functions ¶
func AddKeyToPerson ¶
func CacheKey ¶
CacheKey generates a unique vocab.IRI hash based on its authenticated user and other parameters
func GenerateID ¶
func GenerateID(base vocab.IRI) func(it vocab.Item, col vocab.Item, by vocab.Item) (vocab.ID, error)
GenerateID creates an IRI that can be used to uniquely identify the "it" item, based on the collection "col" and its creator "by"
func HandleActivity ¶
func HandleActivity(fb FedBOX) processing.ActivityHandlerFn
HandleActivity handles POST requests to an ActivityPub actor's inbox/outbox, based on the CollectionType
func HandleCollection ¶
func HandleCollection(fb FedBOX) processing.CollectionHandlerFn
HandleCollection serves content from the generic collection end-points that return ActivityPub objects or activities
func HandleItem ¶
func HandleItem(fb FedBOX) processing.ItemHandlerFn
HandleItem serves content from the following, followers, liked, and likes end-points that returns a single ActivityPub object
Types ¶
type FedBOX ¶
type FedBOX struct { R chi.Router // contains filtered or unexported fields }
func (FedBOX) CollectionRoutes ¶
func (*FedBOX) Storage ¶
func (f *FedBOX) Storage() st.FullStorage
Source Files ¶
Click to show internal directories.
Click to hide internal directories.