linstrom/web/public/api/activitypub/collection.go
mStar af6ff2dd30
All checks were successful
/ docker (push) Successful in 4m34s
Add follower and following collections
2025-05-11 18:28:51 +02:00

31 lines
902 B
Go

package activitypub
import "net/http"
// Used for both unordered and ordered
type collectionOut struct {
Context any `json:"@context,omitempty"`
Summary string `json:"summary,omitempty"`
Type string `json:"type"`
Items []any `json:"items,omitempty"`
Id string `json:"id"`
TotalItems int `json:"totalItems"`
First string `json:"first"`
}
// Used for both unordered and ordered
type collectionPageOut struct {
Context any `json:"@context,omitempty"`
Type string `json:"type"`
Id string `json:"id"`
PartOf string `json:"partOf"`
Next string `json:"next,omitempty"`
Previous string `json:"prev,omitempty"`
Items []any `json:"items"`
}
// Unordered collections handler
func collections(w http.ResponseWriter, r *http.Request) {}
// Ordered collections handler
func orderedCollections(w http.ResponseWriter, r *http.Request) {}