Documentation
¶
Index ¶
- Constants
- Variables
- func AddKeyToItem(metaSaver storage.MetadataTyper, it vocab.Item, typ string) error
- func AddKeyToPerson(metaSaver storage.MetadataTyper, typ string) func(act *vocab.Actor) error
- func CacheKey(fb FedBOX, auth vocab.Actor, r http.Request) vocab.IRI
- func CleanRequestPath(next http.Handler) http.Handler
- func Client(tr http.RoundTripper, conf config.Options, l lw.Logger) *client.C
- func CreateService(r st.FullStorage, self vocab.Item) (err error)
- 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
- func (f *FedBOX) CollectionRoutes(descend bool) func(chi.Router)
- func (f *FedBOX) Config() config.Options
- func (f *FedBOX) LoadLocalActorWithKey(actorIRI vocab.IRI) (*vocab.Actor, crypto.PrivateKey, error)
- func (f *FedBOX) Routes() func(chi.Router)
- func (f *FedBOX) Run(ctx context.Context) error
- func (f *FedBOX) Stop(ctx context.Context)
- func (f *FedBOX) Storage() st.FullStorage
- type LogFn
Constants ¶
View Source
const ( KeyTypeECDSA = "ECDSA" KeyTypeED25519 = "ED25519" KeyTypeRSA = "RSA" )
Variables ¶
View Source
var InternalIRI = vocab.IRI("https://fedbox/")
Functions ¶
func AddKeyToItem ¶
func AddKeyToPerson ¶
func CacheKey ¶
CacheKey generates a unique vocab.IRI hash based on its authenticated user and other parameters
func CreateService ¶
func CreateService(r st.FullStorage, self vocab.Item) (err error)
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) LoadLocalActorWithKey ¶
func (*FedBOX) Storage ¶
func (f *FedBOX) Storage() st.FullStorage
Source Files
¶
Click to show internal directories.
Click to hide internal directories.