Documentation ¶
Index ¶
Constants ¶
const Accept = "Accept"
Accept is the string used in the HTTP header to request a response be encoded as a MIME type
const ActivityTypeAccept = "Accept"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept
const ActivityTypeAdd = "Add"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-add
const ActivityTypeAnnounce = "Announce"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-announce
const ActivityTypeArrive = "Arrive"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-arrive
const ActivityTypeBlock = "Block"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-block
const ActivityTypeCreate = "Create"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create
const ActivityTypeDelete = "Delete"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete
const ActivityTypeDislike = "Dislike"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike
const ActivityTypeFlag = "Flag"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-flag
const ActivityTypeFollow = "Follow"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow
const ActivityTypeIgnore = "Ignore"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-ignore
const ActivityTypeInvite = "Invite"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-invite
const ActivityTypeJoin = "Join"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join
const ActivityTypeLeave = "Leave"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-leave
const ActivityTypeLike = "Like"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like
const ActivityTypeListen = "Listen"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-listen
const ActivityTypeMove = "Move"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-move
const ActivityTypeOffer = "Offer"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-offer
const ActivityTypeQuestion = "Question"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question
const ActivityTypeRead = "Read"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read
const ActivityTypeReject = "Reject"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-reject
const ActivityTypeRemove = "Remove"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-remove
const ActivityTypeTentativeAccept = "TentativeAccept"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativeaccept
const ActivityTypeTentativeReject = "TentativeReject"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativereject
const ActivityTypeTravel = "Travel"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-travel
const ActivityTypeUndo = "Undo"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-undo
const ActivityTypeUpdate = "Update"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update
const ActivityTypeView = "View"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-view
const ActorTypeApplication = "Application"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application
const ActorTypeGroup = "Group"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group
const ActorTypeOrganization = "Organization"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-organization
const ActorTypePerson = "Person"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person
const ActorTypeService = "Service"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-service
const Any = "*"
Any is used for matching any value
const AtContext = "@context"
JSON-LD context descriptor used by ActivityStreams/ActivityPub
const ContentType = "Content-Type"
ContentType is the string used in the HTTP header to designate a MIME type
const ContentTypeActivityPub = "application/activity+json"
ContentTypeActivityPub is the standard MIME type for ActivityPub content
const ContentTypeHTML = "text/html"
ContentTypeHTML is the standard MIME type for HTML content
const ContentTypeJSON = "application/json"
ContentTypeJSON is the standard MIME Type for JSON content
const ContentTypeJSONLD = "application/ld+json"
ContentTypeJSONLD is the standard MIME Type for JSON-LD content https://en.wikipedia.org/wiki/JSON-LD
const ContentTypeJSONLDWithProfile = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
ContentTypeJSONLDWithProfile is the standard MIME Type for JSON-LD content, with profile to designate ActivityPub content. https://www.w3.org/TR/activitystreams-core/#media-type
const ContentTypeJSONResourceDescriptor = "application/jrd+json"
ContentTypeJSONResourceDescriptor is the standard MIME Type for JSON Resource Descriptor content which is used by WebFinger: https://datatracker.ietf.org/doc/html/rfc7033#section-10.2
const ContextTypeActivityStreams = "https://www.w3.org/ns/activitystreams"
ContextTypeActivityStreams defines the standard ActivityStreams vocabulary. https://www.w3.org/TR/activitystreams-core/
const ContextTypeSecurity = "https://w3id.org/security/v1"
ContextTypeSecurity describes the standard security vocabulary for the Fediverse. https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.html
const CoreTypeActivity = "Activity"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-activity
const CoreTypeCollection = "Collection"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection
const CoreTypeCollectionPage = "CollectionPage"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collectionpage
const CoreTypeIntransitiveActivity = "IntransitiveActivity"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-intransitiveactivity
const CoreTypeLink = "Link"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link
const CoreTypeObject = "Object"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object
const CoreTypeOrderedCollection = "OrderedCollection"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection
const CoreTypeOrderedCollectionPage = "OrderedCollectionPage"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage
const LinkTypeMention = "Mention"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mention
const NamespaceActivityStreams = "https://www.w3.org/ns/activitystreams"
const NamespaceActivityStreamsPublic = "https://www.w3.org/ns/activitystreams#Public"
const ObjectTypeArticle = "Article"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article
const ObjectTypeAudio = "Audio"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audio
const ObjectTypeDocument = "Document"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-document
const ObjectTypeEvent = "Event"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
const ObjectTypeImage = "Image"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image
const ObjectTypeKey = "Key"
https://w3c-ccg.github.io/security-vocab/#publicKey
const ObjectTypeNote = "Note"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note
const ObjectTypePage = "Page"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page
const ObjectTypePlace = "Place"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place
const ObjectTypeProfile = "Profile"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-profile
const ObjectTypeRelationship = "Relationship"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-relationship
const ObjectTypeTombstone = "Tombstone"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone
const ObjectTypeVideo = "Video"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-video
const PropertyAccuracy = "accuracy"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accuracy
const PropertyActor = "actor"
https:// www.w3.org/TR/activitystreams-vocabulary/#dfn-actor
const PropertyAltitude = "altitude"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-altitude
const PropertyAnyOf = "anyOf"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-anyof
const PropertyAttachment = "attachment"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment
const PropertyAttributedTo = "attributedTo"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto
const PropertyAudience = "audience"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience
const PropertyBCC = "bcc"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bcc
const PropertyBTo = "bto"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bto
const PropertyBlocked = "blocked"
const PropertyCC = "cc"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-cc
const PropertyClosed = "closed"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-closed
const PropertyContent = "content"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content
const PropertyContext = "context"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-context IMPORTANT: This is a distinct property that identifies the discussion or conversation context in which a post is made, and is NOT the same as the JSON-LD @context property.
const PropertyCurrent = "current"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-current
const PropertyDeleted = "deleted"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-deleted
const PropertyDescribes = "describes"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-describes
const PropertyDuration = "duration"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-duration
const PropertyEndTime = "endTime"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-endtime
const PropertyEndpoints = "endpoints"
const PropertyFirst = "first"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-first
const PropertyFollowers = "followers"
https://www.w3.org/TR/activitypub/#followers
const PropertyFollowing = "following"
https://www.w3.org/TR/activitypub/#following
const PropertyFormerType = "formerType"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-formertype
const PropertyGenerator = "generator"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-generator
const PropertyHeight = "height"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-height
const PropertyHref = "href"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-href
const PropertyHrefLang = "hreflang"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-hreflang
const PropertyID = "id"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-id
const PropertyID_Alternate = "@id"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-id
const PropertyIcon = "icon"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon
const PropertyImage = "image"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image
const PropertyInReplyTo = "inReplyTo"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-inreplyto
const PropertyInbox = "inbox"
https://www.w3.org/TR/activitypub/#inbox
const PropertyInstrument = "instrument"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-instrument
const PropertyItems = "items"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items
const PropertyLast = "last"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-last
const PropertyLatitude = "latitude"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-latitude
const PropertyLiked = "liked"
https://www.w3.org/TR/activitypub/#liked
const PropertyLikes = "likes"
https://www.w3.org/TR/activitypub/#likes
const PropertyLocation = "location"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-location
const PropertyLongitude = "longitude"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-longitude
const PropertyMediaType = "mediaType"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mediatype
const PropertyName = "name"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name
const PropertyNext = "next"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-next
const PropertyObject = "object"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object
const PropertyOneOf = "oneOf"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-oneof
const PropertyOrderedItems = "orderedItems"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items
const PropertyOrigin = "origin"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-origin
const PropertyOutbox = "outbox"
https://www.w3.org/TR/activitypub/#outbox
const PropertyOwner = "owner"
https://w3c-ccg.github.io/security-vocab/#owner
const PropertyPartOf = "partOf"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-partof
const PropertyPreferredUsername = "preferredUsername"
const PropertyPrev = "prev"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-prev
const PropertyPreview = "preview"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-preview
const PropertyPublicKey = "publicKey"
https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.html#publicKey
const PropertyPublicKeyPEM = "publicKeyPem"
https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.html#publicKeyPem
const PropertyPublished = "published"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-published
const PropertyRadius = "radius"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-radius
const PropertyRel = "rel"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-rel
const PropertyRelationship = "relationship"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-relationship
const PropertyReplies = "replies"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-replies
const PropertyResult = "result"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-result
https://www.w3.org/TR/activitypub/#shares
const PropertyStartIndex = "startIndex"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-startindex
const PropertyStartTime = "startTime"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-starttime
const PropertyStreams = "streams"
const PropertySubject = "subject"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-subject
const PropertySummary = "summary"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-summary
const PropertyTag = "tag"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag
const PropertyTarget = "target"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-target
const PropertyTo = "to"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-to
const PropertyTootDiscoverable = "discoverable"
http://joinmastodon.org/ns#discoverable
const PropertyTootIndexable = "indexable"
http://joinmastodon.org/ns#indexable
const PropertyTotalItems = "totalItems"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-totalitems
const PropertyType = "type"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type
const PropertyType_Alternate = "@type"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type
const PropertyURL = "url"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url
const PropertyUnits = "units"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-units
const PropertyUpdated = "updated"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-updated
const PropertyWidth = "width"
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-width
const Unknown = "Unknown"
Unknown is a constant for when a value is.
Variables ¶
var ContextTypeToot = map[string]any{
"toot": "https://joinmastodon.org/ns#",
"discoverable": "toot:discoverable",
"indexable": "toot:indexable",
}
Functions ¶
func ValidateActivityType ¶
ValidateActivityType validates the ActivityPub "type" of the given activity. It returns "UNKNOWN" if the type is not recognized.
func ValidateActorType ¶
ValidateActorType validates the ActivityPub "type" of the given actor. It returns "UNKNOWN" if the type is not recognized.
func ValidateObjectType ¶
ValidateObjectType validates the ActivityPub "type" of the given object or link. It returns "UNKNOWN" if the type is not recognized.
Types ¶
This section is empty.