vocab

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 0 Imported by: 14

README

Hannibal / vocab

This package contains all of the commonly used constants from the current ActivityStreams Vocabulary, along with a couple of simple validation functions that verify that a string input matches certain designated types.

This package is used by the other Hannibal packages to guarantee that we're always using the right values in the right places.

Documentation

Index

Constants

View Source
const Accept = "Accept"

Accept is the string used in the HTTP header to request a response be encoded as a MIME type

View Source
const ActivityTypeAccept = "Accept"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept

View Source
const ActivityTypeAdd = "Add"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-add

View Source
const ActivityTypeAnnounce = "Announce"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-announce

View Source
const ActivityTypeArrive = "Arrive"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-arrive

View Source
const ActivityTypeBlock = "Block"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-block

View Source
const ActivityTypeCreate = "Create"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create

View Source
const ActivityTypeDelete = "Delete"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete

View Source
const ActivityTypeDislike = "Dislike"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike

View Source
const ActivityTypeFlag = "Flag"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-flag

View Source
const ActivityTypeFollow = "Follow"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow

View Source
const ActivityTypeIgnore = "Ignore"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-ignore

View Source
const ActivityTypeInvite = "Invite"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-invite

View Source
const ActivityTypeJoin = "Join"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join

View Source
const ActivityTypeLeave = "Leave"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-leave

View Source
const ActivityTypeLike = "Like"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like

View Source
const ActivityTypeListen = "Listen"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-listen

View Source
const ActivityTypeMove = "Move"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-move

View Source
const ActivityTypeOffer = "Offer"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-offer

View Source
const ActivityTypeQuestion = "Question"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question

View Source
const ActivityTypeRead = "Read"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read

View Source
const ActivityTypeReject = "Reject"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-reject

View Source
const ActivityTypeRemove = "Remove"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-remove

View Source
const ActivityTypeTentativeAccept = "TentativeAccept"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativeaccept

View Source
const ActivityTypeTentativeReject = "TentativeReject"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativereject

View Source
const ActivityTypeTravel = "Travel"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-travel

View Source
const ActivityTypeUndo = "Undo"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-undo

View Source
const ActivityTypeUpdate = "Update"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update

View Source
const ActivityTypeView = "View"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-view

View Source
const ActorTypeApplication = "Application"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application

View Source
const ActorTypeGroup = "Group"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group

View Source
const ActorTypeOrganization = "Organization"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-organization

View Source
const ActorTypePerson = "Person"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person

View Source
const ActorTypeService = "Service"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-service

View Source
const Any = "*"

Any is used for matching any value

View Source
const AtContext = "@context"

JSON-LD context descriptor used by ActivityStreams/ActivityPub

View Source
const ContentType = "Content-Type"

ContentType is the string used in the HTTP header to designate a MIME type

View Source
const ContentTypeActivityPub = "application/activity+json"

ContentTypeActivityPub is the standard MIME type for ActivityPub content

View Source
const ContentTypeHTML = "text/html"

ContentTypeHTML is the standard MIME type for HTML content

View Source
const ContentTypeJSON = "application/json"

ContentTypeJSON is the standard MIME Type for JSON content

View Source
const ContentTypeJSONLD = "application/ld+json"

ContentTypeJSONLD is the standard MIME Type for JSON-LD content https://en.wikipedia.org/wiki/JSON-LD

View Source
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

View Source
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

View Source
const ContextTypeActivityStreams = "https://www.w3.org/ns/activitystreams"

ContextTypeActivityStreams defines the standard ActivityStreams vocabulary. https://www.w3.org/TR/activitystreams-core/

View Source
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

View Source
const CoreTypeActivity = "Activity"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-activity

View Source
const CoreTypeCollection = "Collection"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection

View Source
const CoreTypeCollectionPage = "CollectionPage"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collectionpage

View Source
const CoreTypeIntransitiveActivity = "IntransitiveActivity"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-intransitiveactivity

View Source
const CoreTypeLink = "Link"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link

View Source
const CoreTypeObject = "Object"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object

View Source
const CoreTypeOrderedCollection = "OrderedCollection"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection

View Source
const CoreTypeOrderedCollectionPage = "OrderedCollectionPage"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage

View Source
const LinkTypeMention = "Mention"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mention

View Source
const NamespaceActivityStreams = "https://www.w3.org/ns/activitystreams"
View Source
const NamespaceActivityStreamsPublic = "https://www.w3.org/ns/activitystreams#Public"
View Source
const ObjectTypeArticle = "Article"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article

View Source
const ObjectTypeAudio = "Audio"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audio

View Source
const ObjectTypeDocument = "Document"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-document

View Source
const ObjectTypeEvent = "Event"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event

View Source
const ObjectTypeImage = "Image"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image

View Source
const ObjectTypeNote = "Note"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note

View Source
const ObjectTypePage = "Page"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page

View Source
const ObjectTypePlace = "Place"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place

View Source
const ObjectTypeProfile = "Profile"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-profile

View Source
const ObjectTypeRelationship = "Relationship"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-relationship

View Source
const ObjectTypeTombstone = "Tombstone"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone

View Source
const ObjectTypeVideo = "Video"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-video

View Source
const PropertyAccuracy = "accuracy"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accuracy

View Source
const PropertyActor = "actor"

https:// www.w3.org/TR/activitystreams-vocabulary/#dfn-actor

View Source
const PropertyAltitude = "altitude"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-altitude

View Source
const PropertyAnyOf = "anyOf"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-anyof

View Source
const PropertyAttachment = "attachment"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment

View Source
const PropertyAttributedTo = "attributedTo"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto

View Source
const PropertyAudience = "audience"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience

View Source
const PropertyBCC = "bcc"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bcc

View Source
const PropertyBTo = "bto"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bto

View Source
const PropertyBlocked = "blocked"
View Source
const PropertyCC = "cc"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-cc

View Source
const PropertyClosed = "closed"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-closed

View Source
const PropertyContent = "content"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content

View Source
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.

View Source
const PropertyCurrent = "current"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-current

View Source
const PropertyDeleted = "deleted"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-deleted

View Source
const PropertyDescribes = "describes"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-describes

View Source
const PropertyDuration = "duration"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-duration

View Source
const PropertyEndTime = "endTime"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-endtime

View Source
const PropertyEndpoints = "endpoints"
View Source
const PropertyFirst = "first"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-first

View Source
const PropertyFollowers = "followers"

https://www.w3.org/TR/activitypub/#followers

View Source
const PropertyFollowing = "following"

https://www.w3.org/TR/activitypub/#following

View Source
const PropertyFormerType = "formerType"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-formertype

View Source
const PropertyGenerator = "generator"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-generator

View Source
const PropertyHeight = "height"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-height

View Source
const PropertyHref = "href"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-href

View Source
const PropertyHrefLang = "hreflang"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-hreflang

View Source
const PropertyID = "id"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-id

View Source
const PropertyID_Alternate = "@id"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-id

View Source
const PropertyIcon = "icon"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon

View Source
const PropertyImage = "image"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image

View Source
const PropertyInReplyTo = "inReplyTo"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-inreplyto

View Source
const PropertyInbox = "inbox"

https://www.w3.org/TR/activitypub/#inbox

View Source
const PropertyInstrument = "instrument"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-instrument

View Source
const PropertyItems = "items"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items

View Source
const PropertyLast = "last"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-last

View Source
const PropertyLatitude = "latitude"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-latitude

View Source
const PropertyLiked = "liked"

https://www.w3.org/TR/activitypub/#liked

View Source
const PropertyLikes = "likes"

https://www.w3.org/TR/activitypub/#likes

View Source
const PropertyLocation = "location"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-location

View Source
const PropertyLongitude = "longitude"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-longitude

View Source
const PropertyMediaType = "mediaType"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mediatype

View Source
const PropertyName = "name"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name

View Source
const PropertyNext = "next"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-next

View Source
const PropertyObject = "object"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object

View Source
const PropertyOneOf = "oneOf"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-oneof

View Source
const PropertyOrderedItems = "orderedItems"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items

View Source
const PropertyOrigin = "origin"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-origin

View Source
const PropertyOutbox = "outbox"

https://www.w3.org/TR/activitypub/#outbox

View Source
const PropertyPartOf = "partOf"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-partof

View Source
const PropertyPreferredUsername = "preferredUsername"
View Source
const PropertyPrev = "prev"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-prev

View Source
const PropertyPreview = "preview"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-preview

View Source
const PropertyPublicKey = "publicKey"

https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.html#publicKey

View Source
const PropertyPublicKeyPEM = "publicKeyPem"

https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.html#publicKeyPem

View Source
const PropertyPublished = "published"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-published

View Source
const PropertyRadius = "radius"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-radius

View Source
const PropertyRel = "rel"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-rel

View Source
const PropertyRelationship = "relationship"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-relationship

View Source
const PropertyReplies = "replies"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-replies

View Source
const PropertyResult = "result"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-result

View Source
const PropertyShares = "shares"

https://www.w3.org/TR/activitypub/#shares

View Source
const PropertyStartIndex = "startIndex"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-startindex

View Source
const PropertyStartTime = "startTime"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-starttime

View Source
const PropertyStreams = "streams"
View Source
const PropertySubject = "subject"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-subject

View Source
const PropertySummary = "summary"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-summary

View Source
const PropertyTag = "tag"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag

View Source
const PropertyTarget = "target"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-target

View Source
const PropertyTo = "to"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-to

View Source
const PropertyTotalItems = "totalItems"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-totalitems

View Source
const PropertyType = "type"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type

View Source
const PropertyType_Alternate = "@type"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type

View Source
const PropertyURL = "url"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url

View Source
const PropertyUnits = "units"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-units

View Source
const PropertyUpdated = "updated"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-updated

View Source
const PropertyWidth = "width"

https://www.w3.org/TR/activitystreams-vocabulary/#dfn-width

View Source
const Unknown = "Unknown"

Unknown is a constant for when a value is.

Variables

This section is empty.

Functions

func ValidateActivityType

func ValidateActivityType(activityType string) string

ValidateActivityType validates the ActivityPub "type" of the given activity. It returns "UNKNOWN" if the type is not recognized.

func ValidateActorType

func ValidateActorType(actorType string) string

ValidateActorType validates the ActivityPub "type" of the given actor. It returns "UNKNOWN" if the type is not recognized.

func ValidateObjectType

func ValidateObjectType(objectType string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL