feat: initial commit

This commit is contained in:
l.weber 2025-12-05 12:20:05 +01:00
commit a161b86c9a
705 changed files with 288162 additions and 0 deletions

View file

@ -0,0 +1,365 @@
// Package activitystreams contains terms for the ActivityStreams namespace.
//
// It also includes extensions.
package activitystreams
import (
_ "embed"
)
//go:embed context.jsonld
var ContextDocument []byte
// IRI is the remote context IRI.
const IRI = "https://www.w3.org/ns/activitystreams"
// Namespace is the IRI prefix used for terms defined in this namespace.
const Namespace = IRI + "#"
// From the normative context definition.
const (
// Accuracy is an xml:float, an IEEE single-precision 32-bit floating point
// value equivalent to a Go float32.
Accuracy = Namespace + "accuracy"
// Actor is an IRI, either as a string or as an object with an id property.
Actor = Namespace + "actor"
// AlsoKnownAs is an IRI, either as a string or as an object with an id
// property.
AlsoKnownAs = Namespace + "alsoKnownAs"
// Altitude is an xml:float, an IEEE single-precision 32-bit floating point
// value equivalent to a Go float32.
Altitude = Namespace + "altitude"
// AnyOf is an IRI, either as a string or as an object with an id property.
AnyOf = Namespace + "anyOf"
// Attachment is an IRI, either as a string or as an object with an id
// property.
Attachment = Namespace + "attachment"
// AttributedTo is an IRI, either as a string or as an object with an id
// property.
AttributedTo = Namespace + "attributedTo"
// Audience is an IRI, either as a string or as an object with an id
// property.
Audience = Namespace + "audience"
// Bcc is an IRI, either as a string or as an object with an id property.
Bcc = Namespace + "bcc"
// Bto is an IRI, either as a string or as an object with an id property.
Bto = Namespace + "bto"
// Cc is an IRI, either as a string or as an object with an id property.
Cc = Namespace + "cc"
// Closed is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Closed = Namespace + "closed"
// Content is a string.
Content = Namespace + "content"
// Context is an IRI, either as a string or as an object with an id
// property.
Context = Namespace + "context"
// Current is an IRI, either as a string or as an object with an id
// property.
Current = Namespace + "current"
// Deleted is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Deleted = Namespace + "deleted"
// Describes is an IRI, either as a string or as an object with an id
// property.
Describes = Namespace + "describes"
// Duration is an xml:duration and does not have a Go equivalent, but can be
// handled as a string.
Duration = Namespace + "duration"
// EndTime is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
EndTime = Namespace + "endTime"
// Endpoints is an IRI, either as a string or as an object with an id
// property.
Endpoints = Namespace + "endpoints"
// First is an IRI, either as a string or as an object with an id property.
First = Namespace + "first"
// Followers is an IRI, either as a string or as an object with an id
// property.
Followers = Namespace + "followers"
// Following is an IRI, either as a string or as an object with an id
// property.
Following = Namespace + "following"
// FormerType is an IRI, either as a string or as an object with an id
// property.
FormerType = Namespace + "formerType"
// Generator is an IRI, either as a string or as an object with an id
// property.
Generator = Namespace + "generator"
// Height is an xml:nonNegativeInteger, an "infinite size" integer. The XML
// specification requires you to at least accept numbers with up to 16
// digits. A Go uint64 may be sufficient depending on your usage. Remember
// that you can only safely express up to 53-bit precision integers this way
// since JSON treats integers as floats. For bigger values you'll need a
// string.
Height = Namespace + "height"
// Href is an IRI, either as a string or as an object with an id property.
Href = Namespace + "href"
// Hreflang is a string.
Hreflang = Namespace + "hreflang"
// Icon is an IRI, either as a string or as an object with an id property.
Icon = Namespace + "icon"
// Image is an IRI, either as a string or as an object with an id property.
Image = Namespace + "image"
// InReplyTo is an IRI, either as a string or as an object with an id
// property.
InReplyTo = Namespace + "inReplyTo"
// Instrument is an IRI, either as a string or as an object with an id
// property.
Instrument = Namespace + "instrument"
// Items is an IRI, either as a string or as an object with an id property.
Items = Namespace + "items"
// Last is an IRI, either as a string or as an object with an id property.
Last = Namespace + "last"
// Latitude is an xml:float, an IEEE single-precision 32-bit floating point
// value equivalent to a Go float32.
Latitude = Namespace + "latitude"
// Liked is an IRI, either as a string or as an object with an id property.
Liked = Namespace + "liked"
// Likes is an IRI, either as a string or as an object with an id property.
Likes = Namespace + "likes"
// Location is an IRI, either as a string or as an object with an id
// property.
Location = Namespace + "location"
// Longitude is an xml:float, an IEEE single-precision 32-bit floating point
// value equivalent to a Go float32.
Longitude = Namespace + "longitude"
// MediaType is a string.
MediaType = Namespace + "mediaType"
// Name is a string.
Name = Namespace + "name"
// Next is an IRI, either as a string or as an object with an id property.
Next = Namespace + "next"
// OauthAuthzEndpoint is an IRI, either as a string or as an object
// with an id property.
OauthAuthzEndpoint = Namespace + "oauthAuthorizationEndpoint"
// OauthTokenEndpoint is an IRI, either as a string or as an object with an
// id property.
OauthTokenEndpoint = Namespace + "oauthTokenEndpoint"
// Object is an IRI, either as a string or as an object with an id property.
Object = Namespace + "object"
// OneOf is an IRI, either as a string or as an object with an id property.
OneOf = Namespace + "oneOf"
// OrderedItems is an IRI, either as a string or as an object with an id
// property.
OrderedItems = Namespace + "items"
// Origin is an IRI, either as a string or as an object with an id property.
Origin = Namespace + "origin"
// Outbox is an IRI, either as a string or as an object with an id property.
Outbox = Namespace + "outbox"
// PartOf is an IRI, either as a string or as an object with an id property.
PartOf = Namespace + "partOf"
// PreferredUsername is a string.
PreferredUsername = Namespace + "preferredUsername"
// Prev is an IRI, either as a string or as an object with an id property.
Prev = Namespace + "prev"
// Preview is an IRI, either as a string or as an object with an id
// property.
Preview = Namespace + "preview"
// ProvideClientKey is an IRI, either as a string or as an object with an id
// property.
ProvideClientKey = Namespace + "provideClientKey"
// ProxyURL is an IRI, either as a string or as an object with an id
// property.
ProxyURL = Namespace + "proxyUrl"
// PublicCollection represents the Public collection, aka everyone. Use it
// as a value in the [Audience], [To] and [Cc] poperties.
PublicCollection = Namespace + "Public"
// Published is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Published = Namespace + "published"
// Radius is an xml:float, an IEEE single-precision 32-bit floating point
// value equivalent to a Go float32.
Radius = Namespace + "radius"
// Rel is a string.
Rel = Namespace + "rel"
// Relationship is an IRI, either as a string or as an object with an id
// property.
Relationship = Namespace + "relationship"
// RelationshipIsContact is a possible value for a relationship property.
RelationshipIsContact = Namespace + "IsContact"
// RelationshipIsFollowedBy is a possible value for a relationship property.
RelationshipIsFollowedBy = Namespace + "IsFollowedBy"
// RelationshipIsFollowing is a possible value for a relationship property.
RelationshipIsFollowing = Namespace + "IsFollowing"
// RelationshipIsMember is a possible value for a relationship property.
RelationshipIsMember = Namespace + "IsMember"
// Replies is an IRI, either as a string or as an object with an id
// property.
Replies = Namespace + "replies"
// Result is an IRI, either as a string or as an object with an id property.
Result = Namespace + "result"
// SharedInbox is an IRI, either as a string or as an object with an id
// property.
SharedInbox = Namespace + "sharedInbox"
// Shares is an IRI, either as a string or as an object with an id property.
Shares = Namespace + "shares"
// SignClientKey is an IRI, either as a string or as an object with an id
// property.
SignClientKey = Namespace + "signClientKey"
// Source is a string.
Source = Namespace + "source"
// StartIndex is an xml:nonNegativeInteger, an "infinite size" integer. The
// XML specification requires you to at least accept numbers with up to 16
// digits. A Go uint64 may be sufficient depending on your usage. Remember
// that you can only safely express up to 53-bit precision integers this way
// since JSON treats integers as floats. For bigger values you'll need a
// string.
StartIndex = Namespace + "startIndex"
// StartTime is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
StartTime = Namespace + "startTime"
// Streams is an IRI, either as a string or as an object with an id
// property.
Streams = Namespace + "streams"
// Subject is an IRI, either as a string or as an object with an id
// property.
Subject = Namespace + "subject"
// Summary is a string.
Summary = Namespace + "summary"
// Tag is an IRI, either as a string or as an object with an id property.
Tag = Namespace + "tag"
// Target is an IRI, either as a string or as an object with an id property.
Target = Namespace + "target"
// To is an IRI, either as a string or as an object with an id property.
To = Namespace + "to"
// TotalItems is an xml:nonNegativeInteger, an "infinite size" integer. The
// XML specification requires you to at least accept numbers with up to 16
// digits. A Go uint64 may be sufficient depending on your usage. Remember
// that you can only safely express up to 53-bit precision integers this way
// since JSON treats integers as floats. For bigger values you'll need a
// string.
TotalItems = Namespace + "totalItems"
// TypeAccept is a possible value for the type property.
TypeAccept = Namespace + "Accept"
// TypeActivity is a possible value for the type property.
TypeActivity = Namespace + "Activity"
// TypeAdd is a possible value for the type property.
TypeAdd = Namespace + "Add"
// TypeAnnounce is a possible value for the type property.
TypeAnnounce = Namespace + "Announce"
// TypeApplication is a possible value for the type property.
TypeApplication = Namespace + "Application"
// TypeArrive is a possible value for the type property.
TypeArrive = Namespace + "Arrive"
// TypeArticle is a possible value for the type property.
TypeArticle = Namespace + "Article"
// TypeAudio is a possible value for the type property.
TypeAudio = Namespace + "Audio"
// TypeBlock is a possible value for the type property.
TypeBlock = Namespace + "Block"
// TypeCollection is a possible value for the type property.
TypeCollection = Namespace + "Collection"
// TypeCollectionPage is a possible value for the type property.
TypeCollectionPage = Namespace + "CollectionPage"
// TypeCreate is a possible value for the type property.
TypeCreate = Namespace + "Create"
// TypeDelete is a possible value for the type property.
TypeDelete = Namespace + "Delete"
// TypeDislike is a possible value for the type property.
TypeDislike = Namespace + "Dislike"
// TypeDocument is a possible value for the type property.
TypeDocument = Namespace + "Document"
// TypeEvent is a possible value for the type property.
TypeEvent = Namespace + "Event"
// TypeFlag is a possible value for the type property.
TypeFlag = Namespace + "Flag"
// TypeFollow is a possible value for the type property.
TypeFollow = Namespace + "Follow"
// TypeGroup is a possible value for the type property.
TypeGroup = Namespace + "Group"
// TypeIgnore is a possible value for the type property.
TypeIgnore = Namespace + "Ignore"
// TypeImage is a possible value for the type property.
TypeImage = Namespace + "Image"
// TypeIntransitiveActivity is a possible value for the type property.
TypeIntransitiveActivity = Namespace + "IntransitiveActivity"
// TypeInvite is a possible value for the type property.
TypeInvite = Namespace + "Invite"
// TypeJoin is a possible value for the type property.
TypeJoin = Namespace + "Join"
// TypeLeave is a possible value for the type property.
TypeLeave = Namespace + "Leave"
// TypeLike is a possible value for the type property.
TypeLike = Namespace + "Like"
// TypeLink is a possible value for the type property.
TypeLink = Namespace + "Link"
// TypeListen is a possible value for the type property.
TypeListen = Namespace + "Listen"
// TypeMention is a possible value for the type property.
TypeMention = Namespace + "Mention"
// TypeMove is a possible value for the type property.
TypeMove = Namespace + "Move"
// TypeNote is a possible value for the type property.
TypeNote = Namespace + "Note"
// TypeObject is a possible value for the type property.
TypeObject = Namespace + "Object"
// TypeOffer is a possible value for the type property.
TypeOffer = Namespace + "Offer"
// TypeOrderedCollection is a possible value for the type property.
TypeOrderedCollection = Namespace + "OrderedCollection"
// TypeOrderedCollectionPage is a possible value for the type property.
TypeOrderedCollectionPage = Namespace + "OrderedCollectionPage"
// TypeOrganization is a possible value for the type property.
TypeOrganization = Namespace + "Organization"
// TypePage is a possible value for the type property.
TypePage = Namespace + "Page"
// TypePerson is a possible value for the type property.
TypePerson = Namespace + "Person"
// TypePlace is a possible value for the type property.
TypePlace = Namespace + "Place"
// TypeProfile is a possible value for the type property.
TypeProfile = Namespace + "Profile"
// TypeQuestion is a possible value for the type property.
TypeQuestion = Namespace + "Question"
// TypeRead is a possible value for the type property.
TypeRead = Namespace + "Read"
// TypeReject is a possible value for the type property.
TypeReject = Namespace + "Reject"
// TypeRelationship is a possible value for the type property.
TypeRelationship = Namespace + "Relationship"
// TypeRemove is a possible value for the type property.
TypeRemove = Namespace + "Remove"
// TypeService is a possible value for the type property.
TypeService = Namespace + "Service"
// TypeTentativeAccept is a possible value for the type property.
TypeTentativeAccept = Namespace + "TentativeAccept"
// TypeTentativeReject is a possible value for the type property.
TypeTentativeReject = Namespace + "TentativeReject"
// TypeTombstone is a possible value for the type property.
TypeTombstone = Namespace + "Tombstone"
// TypeTravel is a possible value for the type property.
TypeTravel = Namespace + "Travel"
// TypeUndo is a possible value for the type property.
TypeUndo = Namespace + "Undo"
// TypeUpdate is a possible value for the type property.
TypeUpdate = Namespace + "Update"
// TypeVideo is a possible value for the type property.
TypeVideo = Namespace + "Video"
// TypeView is a possible value for the type property.
TypeView = Namespace + "View"
// URL is an IRI, either as a string or as an object with an id property.
URL = Namespace + "url"
// Units is a string.
Units = Namespace + "units"
// Updated is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Updated = Namespace + "updated"
// UploadMedia is an IRI, either as a string or as an object with an id
// property.
UploadMedia = Namespace + "uploadMedia"
// Width is an xml:nonNegativeInteger, an "infinite size" integer. The XML
// specification requires you to at least accept numbers with up to 16
// digits. A Go uint64 may be sufficient depending on your usage. Remember
// that you can only safely express up to 53-bit precision integers this way
// since JSON treats integers as floats. For bigger values you'll need a
// string.
Width = Namespace + "width"
)
// Extensions: https://www.w3.org/wiki/Activity_Streams_extensions.
const (
// ManuallyApprovesFollowers is an xml:boolean.
ManuallyApprovesFollowers = Namespace + "manuallyApprovesFollowers"
// MovedTo is an IRI, either as a string or as an object with an id
// property.
MovedTo = Namespace + "movedTo"
// Sensitive is an xml:boolean.
Sensitive = Namespace + "sensitive"
// TypeHashtag is a possible value for the type property.
TypeHashtag = Namespace + "Hashtag"
)

View file

@ -0,0 +1,379 @@
{
"@context": {
"@vocab": "_:",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"as": "https://www.w3.org/ns/activitystreams#",
"ldp": "http://www.w3.org/ns/ldp#",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"id": "@id",
"type": "@type",
"Accept": "as:Accept",
"Activity": "as:Activity",
"IntransitiveActivity": "as:IntransitiveActivity",
"Add": "as:Add",
"Announce": "as:Announce",
"Application": "as:Application",
"Arrive": "as:Arrive",
"Article": "as:Article",
"Audio": "as:Audio",
"Block": "as:Block",
"Collection": "as:Collection",
"CollectionPage": "as:CollectionPage",
"Relationship": "as:Relationship",
"Create": "as:Create",
"Delete": "as:Delete",
"Dislike": "as:Dislike",
"Document": "as:Document",
"Event": "as:Event",
"Follow": "as:Follow",
"Flag": "as:Flag",
"Group": "as:Group",
"Ignore": "as:Ignore",
"Image": "as:Image",
"Invite": "as:Invite",
"Join": "as:Join",
"Leave": "as:Leave",
"Like": "as:Like",
"Link": "as:Link",
"Mention": "as:Mention",
"Note": "as:Note",
"Object": "as:Object",
"Offer": "as:Offer",
"OrderedCollection": "as:OrderedCollection",
"OrderedCollectionPage": "as:OrderedCollectionPage",
"Organization": "as:Organization",
"Page": "as:Page",
"Person": "as:Person",
"Place": "as:Place",
"Profile": "as:Profile",
"Question": "as:Question",
"Reject": "as:Reject",
"Remove": "as:Remove",
"Service": "as:Service",
"TentativeAccept": "as:TentativeAccept",
"TentativeReject": "as:TentativeReject",
"Tombstone": "as:Tombstone",
"Undo": "as:Undo",
"Update": "as:Update",
"Video": "as:Video",
"View": "as:View",
"Listen": "as:Listen",
"Read": "as:Read",
"Move": "as:Move",
"Travel": "as:Travel",
"IsFollowing": "as:IsFollowing",
"IsFollowedBy": "as:IsFollowedBy",
"IsContact": "as:IsContact",
"IsMember": "as:IsMember",
"subject": {
"@id": "as:subject",
"@type": "@id"
},
"relationship": {
"@id": "as:relationship",
"@type": "@id"
},
"actor": {
"@id": "as:actor",
"@type": "@id"
},
"attributedTo": {
"@id": "as:attributedTo",
"@type": "@id"
},
"attachment": {
"@id": "as:attachment",
"@type": "@id"
},
"bcc": {
"@id": "as:bcc",
"@type": "@id"
},
"bto": {
"@id": "as:bto",
"@type": "@id"
},
"cc": {
"@id": "as:cc",
"@type": "@id"
},
"context": {
"@id": "as:context",
"@type": "@id"
},
"current": {
"@id": "as:current",
"@type": "@id"
},
"first": {
"@id": "as:first",
"@type": "@id"
},
"generator": {
"@id": "as:generator",
"@type": "@id"
},
"icon": {
"@id": "as:icon",
"@type": "@id"
},
"image": {
"@id": "as:image",
"@type": "@id"
},
"inReplyTo": {
"@id": "as:inReplyTo",
"@type": "@id"
},
"items": {
"@id": "as:items",
"@type": "@id"
},
"instrument": {
"@id": "as:instrument",
"@type": "@id"
},
"orderedItems": {
"@id": "as:items",
"@type": "@id",
"@container": "@list"
},
"last": {
"@id": "as:last",
"@type": "@id"
},
"location": {
"@id": "as:location",
"@type": "@id"
},
"next": {
"@id": "as:next",
"@type": "@id"
},
"object": {
"@id": "as:object",
"@type": "@id"
},
"oneOf": {
"@id": "as:oneOf",
"@type": "@id"
},
"anyOf": {
"@id": "as:anyOf",
"@type": "@id"
},
"closed": {
"@id": "as:closed",
"@type": "xsd:dateTime"
},
"origin": {
"@id": "as:origin",
"@type": "@id"
},
"accuracy": {
"@id": "as:accuracy",
"@type": "xsd:float"
},
"prev": {
"@id": "as:prev",
"@type": "@id"
},
"preview": {
"@id": "as:preview",
"@type": "@id"
},
"replies": {
"@id": "as:replies",
"@type": "@id"
},
"result": {
"@id": "as:result",
"@type": "@id"
},
"audience": {
"@id": "as:audience",
"@type": "@id"
},
"partOf": {
"@id": "as:partOf",
"@type": "@id"
},
"tag": {
"@id": "as:tag",
"@type": "@id"
},
"target": {
"@id": "as:target",
"@type": "@id"
},
"to": {
"@id": "as:to",
"@type": "@id"
},
"url": {
"@id": "as:url",
"@type": "@id"
},
"altitude": {
"@id": "as:altitude",
"@type": "xsd:float"
},
"content": "as:content",
"contentMap": {
"@id": "as:content",
"@container": "@language"
},
"name": "as:name",
"nameMap": {
"@id": "as:name",
"@container": "@language"
},
"duration": {
"@id": "as:duration",
"@type": "xsd:duration"
},
"endTime": {
"@id": "as:endTime",
"@type": "xsd:dateTime"
},
"height": {
"@id": "as:height",
"@type": "xsd:nonNegativeInteger"
},
"href": {
"@id": "as:href",
"@type": "@id"
},
"hreflang": "as:hreflang",
"latitude": {
"@id": "as:latitude",
"@type": "xsd:float"
},
"longitude": {
"@id": "as:longitude",
"@type": "xsd:float"
},
"mediaType": "as:mediaType",
"published": {
"@id": "as:published",
"@type": "xsd:dateTime"
},
"radius": {
"@id": "as:radius",
"@type": "xsd:float"
},
"rel": "as:rel",
"startIndex": {
"@id": "as:startIndex",
"@type": "xsd:nonNegativeInteger"
},
"startTime": {
"@id": "as:startTime",
"@type": "xsd:dateTime"
},
"summary": "as:summary",
"summaryMap": {
"@id": "as:summary",
"@container": "@language"
},
"totalItems": {
"@id": "as:totalItems",
"@type": "xsd:nonNegativeInteger"
},
"units": "as:units",
"updated": {
"@id": "as:updated",
"@type": "xsd:dateTime"
},
"width": {
"@id": "as:width",
"@type": "xsd:nonNegativeInteger"
},
"describes": {
"@id": "as:describes",
"@type": "@id"
},
"formerType": {
"@id": "as:formerType",
"@type": "@id"
},
"deleted": {
"@id": "as:deleted",
"@type": "xsd:dateTime"
},
"inbox": {
"@id": "ldp:inbox",
"@type": "@id"
},
"outbox": {
"@id": "as:outbox",
"@type": "@id"
},
"following": {
"@id": "as:following",
"@type": "@id"
},
"followers": {
"@id": "as:followers",
"@type": "@id"
},
"streams": {
"@id": "as:streams",
"@type": "@id"
},
"preferredUsername": "as:preferredUsername",
"endpoints": {
"@id": "as:endpoints",
"@type": "@id"
},
"uploadMedia": {
"@id": "as:uploadMedia",
"@type": "@id"
},
"proxyUrl": {
"@id": "as:proxyUrl",
"@type": "@id"
},
"liked": {
"@id": "as:liked",
"@type": "@id"
},
"oauthAuthorizationEndpoint": {
"@id": "as:oauthAuthorizationEndpoint",
"@type": "@id"
},
"oauthTokenEndpoint": {
"@id": "as:oauthTokenEndpoint",
"@type": "@id"
},
"provideClientKey": {
"@id": "as:provideClientKey",
"@type": "@id"
},
"signClientKey": {
"@id": "as:signClientKey",
"@type": "@id"
},
"sharedInbox": {
"@id": "as:sharedInbox",
"@type": "@id"
},
"Public": {
"@id": "as:Public",
"@type": "@id"
},
"source": "as:source",
"likes": {
"@id": "as:likes",
"@type": "@id"
},
"shares": {
"@id": "as:shares",
"@type": "@id"
},
"alsoKnownAs": {
"@id": "as:alsoKnownAs",
"@type": "@id"
}
}
}

View file

@ -0,0 +1,19 @@
{
"@context": {
"as": "https://www.w3.org/ns/activitystreams#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"Hashtag": "as:Hashtag",
"manuallyApprovesFollowers": {
"@id": "as:manuallyApprovesFollowers",
"@type": "xsd:boolean"
},
"movedTo": {
"@id": "as:movedTo",
"@type": "@id"
},
"sensitive": {
"@id": "as:sensitive",
"@type": "xsd:boolean"
}
}
}

View file

@ -0,0 +1,10 @@
// Package ldp contains terms for the Linked Data Platform namespace.
package ldp
// Namespace is the IRI prefix used for terms defined in this namespace.
const Namespace = "https://www.w3.org/ns/ldp#"
const (
// Inbox is an IRI, either as a string or as an object with an id property.
Inbox = Namespace + "inbox"
)