activitystream

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

README

ActivityStream 🏞

GoDoc Build Status Codecov Go Report Card Version

Welcome to the Fediverse

This is a personal experiment to explore Activity Streams. This library is BRAND NEW, and is not ready for use by anyone, for any reason, at any time. Check out https://github.com/go-fed for a library that's ready for prime time.

This is an Experiment

ActivityStreams is so hard to work with in a "strongly typed", "idiomatic go" way, because the W3C spec is so loose with types. While this is great for a Javascript, or old ColdFusion programmer, it's super-cumbersome to try to squeeze this into a Go, or TypeScript paradigm.

So, here's the idea (for now). EVERYTHING is stored as a map[string]interface{}, which is as big of a no-no as using Reflect. But, it's the only way to support the entire spec without doing this.

Consistency will be "enforced" (or at least encouraged) using constructor functions that can construct these data structures in a "proper" way, and validator functions that can accept (nearly) any input, and then format it in a consistent manner.

Something like:


// WRITING ActivityStreams
writer.Announce(
    writer.Actor().Name("John Doe").ID("john@doe.com").URL("john.doe.com"),
    writer.Document().URL("https://me.website.com/document-name"),
    nil
)

// READING ActivityStreams
object, err := New(`{
    "@context": "https://www.w3.org/ns/activitystreams",
    "name": "Foo",
    "id": "http://example.org/foo"
    }`)

object.Name() // "foo"
object.ID() // "http://example.org/foo"

Pull Requests Welcome

This library is a work in progress, and will benefit from your experience reports, use cases, and contributions. If you have an idea for making this library better, send in a pull request. We're all in this together! 🏞

Documentation

Index

Constants

View Source
const ActivityTypeAccept = "Accept"

ActivityTypeAccept description is TBD

View Source
const ActivityTypeAdd = "Add"

ActivityTypeAdd description is TBD

View Source
const ActivityTypeAnnounce = "Announce"

ActivityTypeAnnounce description is TBD

View Source
const ActivityTypeArrive = "Arrive"

ActivityTypeArrive description is TBD

View Source
const ActivityTypeBlock = "Block"

ActivityTypeBlock description is TBD

View Source
const ActivityTypeCreate = "Create"

ActivityTypeCreate description is TBD

View Source
const ActivityTypeDelete = "Delete"

ActivityTypeDelete description is TBD

View Source
const ActivityTypeDislike = "Dislike"

ActivityTypeDislike description is TBD

View Source
const ActivityTypeFlag = "Flag"

ActivityTypeFlag description is TBD

View Source
const ActivityTypeFollow = "Follow"

ActivityTypeFollow description is TBD

View Source
const ActivityTypeIgnore = "Ignore"

ActivityTypeIgnore description is TBD

View Source
const ActivityTypeInvite = "Invite"

ActivityTypeInvite description is TBD

View Source
const ActivityTypeJoin = "Join"

ActivityTypeJoin description is TBD

View Source
const ActivityTypeLeave = "Leave"

ActivityTypeLeave description is TBD

View Source
const ActivityTypeLike = "Like"

ActivityTypeLike description is TBD

View Source
const ActivityTypeListen = "Listen"

ActivityTypeListen description is TBD

View Source
const ActivityTypeMove = "Move"

ActivityTypeMove description is TBD

View Source
const ActivityTypeOffer = "Offer"

ActivityTypeOffer description is TBD

View Source
const ActivityTypeQuestion = "Question"

ActivityTypeQuestion description is TBD

View Source
const ActivityTypeRead = "Read"

ActivityTypeRead description is TBD

View Source
const ActivityTypeReject = "Reject"

ActivityTypeReject description is TBD

View Source
const ActivityTypeRemove = "Remove"

ActivityTypeRemove description is TBD

View Source
const ActivityTypeTentativeAccept = "TentativeAccept"

ActivityTypeTentativeAccept description is TBD

View Source
const ActivityTypeTentativeReject = "TentativeReject"

ActivityTypeTentativeReject description is TBD

View Source
const ActivityTypeTravel = "Travel"

ActivityTypeTravel description is TBD

View Source
const ActivityTypeUndo = "Undo"

ActivityTypeUndo description is TBD

View Source
const ActivityTypeUpdate = "Update"

ActivityTypeUpdate description is TBD

View Source
const ActivityTypeView = "View"

ActivityTypeView description is TBD

View Source
const ActorTypeApplication = "Application"
View Source
const ActorTypeGroup = "Group"
View Source
const ActorTypeOrganization = "Organization"
View Source
const ActorTypePerson = "Person"
View Source
const ActorTypeService = "Service"
View Source
const LinkTypeMention = "Mention"

LinkTypeMention is a specialized Link that represents an @mention.

View Source
const ObjectTypeArticle = "Article"

ObjectTypeArticle represents any kind of multi-paragraph written work.

View Source
const ObjectTypeAudio = "Audio"

ObjectTypeAudio represents an audio document of any kind.

View Source
const ObjectTypeDocument = "Document"

ObjectTypeDocument represents a document of any kind.

View Source
const ObjectTypeEvent = "Event"

ObjectTypeEvent represents any kind of event.

View Source
const ObjectTypeImage = "Image"

ObjectTypeImage represents an image document of any kind

View Source
const ObjectTypeMention = "Mention"

ObjectTypeMention ???

View Source
const ObjectTypeNote = "Note"

ObjectTypeNote represents a short written work typically less than a single paragraph in length.

View Source
const ObjectTypePage = "Page"

ObjectTypePage represents a Web Page.

View Source
const ObjectTypePlace = "Place"

ObjectTypePlace represents a logical or physical location. See 5.3 Representing Places for additional information.

View Source
const ObjectTypeProfile = "Profile"

ObjectTypeProfile is a content object that describes another Object, typically used to describe Actor Type objects. The describes property is used to reference the object being described by the profile.

View Source
const ObjectTypeRelationship = "Relationship"

ObjectTypeRelationship describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals.

View Source
const ObjectTypeTombstone = "Tombstone"

ObjectTypeTombstone represents a content object that has been deleted. It can be used in Collections to signify that there used to be an object at this position, but it has been deleted.

View Source
const ObjectTypeVideo = "Video"

ObjectTypeVideo represents a video document of any kind.

View Source
const PropertyAccuracy = "accuracy" // (xsd:float)

PropertyAccuracy description is TBD

View Source
const PropertyActor = "actor"

PropertyActor description is TBD

View Source
const PropertyAltitude = "altitude" // (xsd:float)

PropertyAltitude description is TBD

View Source
const PropertyAnyOf = "anyOf"

PropertyAnyOf description is TBD

View Source
const PropertyAttachment = "attachment"

PropertyAttachment description is TBD

View Source
const PropertyAttachments = "attachments"

PropertyAttachments description is TBD

View Source
const PropertyAttributedTo = "attributedTo"

PropertyAttributedTo description is TBD

View Source
const PropertyAudience = "audience"

PropertyAudience description is TBD

View Source
const PropertyAuthor = "author"

PropertyAuthor description is TBD

View Source
const PropertyBTo = "bto"

PropertyBTo description is TBD

View Source
const PropertyBcc = "bcc"

PropertyBcc description is TBD

View Source
const PropertyCc = "cc"

PropertyCc description is TBD

View Source
const PropertyClosed = "closed" // (xsd:dateTime)

PropertyClosed description is TBD

View Source
const PropertyContent = "content"

PropertyContent description is TBD

View Source
const PropertyContentMap = "contentMap"

PropertyContentMap description is TBD

View Source
const PropertyContext = "@context"

PropertyContext description is TBD

View Source
const PropertyCurrent = "current"

PropertyCurrent description is TBD

View Source
const PropertyDeleted = "deleted" // (xsd:dateTime)

PropertyDeleted description is TBD

View Source
const PropertyDescribes = "describes"

PropertyDescribes description is TBD

View Source
const PropertyDownstreamDuplicates = "downstreamDuplicates"

PropertyDownstreamDuplicates description is TBD

View Source
const PropertyDuration = "duration" // (xsd:duration)

PropertyDuration description is TBD

View Source
const PropertyEndTime = "endTime" // (xsd:dateTime)

PropertyEndTime description is TBD

View Source
const PropertyFirst = "first"

PropertyFirst description is TBD

View Source
const PropertyFormerType = "formerType"

PropertyFormerType description is TBD

View Source
const PropertyGenerator = "generator"

PropertyGenerator description is TBD

View Source
const PropertyHREF = "href"

PropertyHREF description is TBD

View Source
const PropertyHeight = "height" // (xsd:nonNegativeInteger)

PropertyHeight description is TBD

View Source
const PropertyHrefLang = "hreflang"

PropertyHrefLang description is TBD

View Source
const PropertyID = "id"

PropertyID description is TBD

View Source
const PropertyIcon = "icon"

PropertyIcon description is TBD

View Source
const PropertyImage = "image"

PropertyImage description is TBD

View Source
const PropertyInReplyTo = "inReplyTo"

PropertyInReplyTo description is TBD

View Source
const PropertyInstrument = "instrument"

PropertyInstrument description is TBD

View Source
const PropertyItems = "items"

PropertyItems description is TBD

View Source
const PropertyLast = "last"

PropertyLast description is TBD

View Source
const PropertyLatitude = "latitude" // (xsd:float)

PropertyLatitude description is TBD

View Source
const PropertyLocation = "location"

PropertyLocation description is TBD

View Source
const PropertyLongitude = "longitude" // (xsd:float)

PropertyLongitude description is TBD

View Source
const PropertyMediaType = "mediaType"

PropertyMediaType description is TBD

View Source
const PropertyName = "name"

PropertyName description is TBD

View Source
const PropertyNameMap = "nameMap"

PropertyNameMap description is TBD

View Source
const PropertyNext = "next"

PropertyNext description is TBD

View Source
const PropertyObject = "object"

PropertyObject description is TBD

View Source
const PropertyOneOf = "oneOf"

PropertyOneOf description is TBD

View Source
const PropertyOrderedItems = "orderedItems"

PropertyOrderedItems description is TBD

View Source
const PropertyOrigin = "origin"

PropertyOrigin description is TBD

View Source
const PropertyPartOf = "partOf"

PropertyPartOf description is TBD

View Source
const PropertyPrev = "prev"

PropertyPrev description is TBD

View Source
const PropertyPreview = "preview"

PropertyPreview description is TBD

View Source
const PropertyProvider = "provider"

PropertyProvider description is TBD

View Source
const PropertyPublished = "published" // (xsd:dateTime)

PropertyPublished description is TBD

View Source
const PropertyRadius = "radius" // (xsd:float)

PropertyRadius description is TBD

View Source
const PropertyRating = "rating" // (xsd:float)

PropertyRating description is TBD

View Source
const PropertyRel = "rel"

PropertyRel description is TBD

View Source
const PropertyRelationship = "relationship"

PropertyRelationship description is TBD

View Source
const PropertyReplies = "replies"

PropertyReplies description is TBD

View Source
const PropertyResult = "result"

PropertyResult description is TBD

View Source
const PropertyStartIndex = "startIndex" // (xsd:nonNegativeInteger)

PropertyStartIndex description is TBD

View Source
const PropertyStartTime = "startTime" // (xsd:dateTime)

PropertyStartTime description is TBD

View Source
const PropertySubject = "subject"

PropertySubject description is TBD

View Source
const PropertySummary = "summary"

PropertySummary description is TBD

View Source
const PropertySummaryMap = "summaryMap"

PropertySummaryMap description is TBD

View Source
const PropertyTag = "tag"

PropertyTag description is TBD

View Source
const PropertyTags = "tags"

PropertyTags description is TBD

View Source
const PropertyTarget = "target"

PropertyTarget description is TBD

View Source
const PropertyTo = "to"

PropertyTo description is TBD

View Source
const PropertyTotalItems = "totalItems" // (xsd:nonNegativeInteger)

PropertyTotalItems description is TBD

View Source
const PropertyType = "type"

PropertyType description is TBD

View Source
const PropertyURL = "url"

PropertyURL description is TBD

View Source
const PropertyUnits = "units"

PropertyUnits description is TBD

View Source
const PropertyUpdated = "updated" // (xsd:dateTime)

PropertyUpdated description is TBD

View Source
const PropertyUpstreamDuplicates = "upstreamDuplicates"

PropertyUpstreamDuplicates description is TBD

View Source
const PropertyVerb = "verb"

PropertyVerb description is TBD

View Source
const PropertyWidth = "width" // (xsd:nonNegativeInteger)

PropertyWidth description is TBD

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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