Changes
2 changed files (+160/-3)
-
-
@@ -6,9 +6,6 @@ import (var validCollectionTypes = [...]ActivityVocabularyType{CollectionType, OrderedCollectionType} // Page represents a Web Page. type Page Item type CollectionInterface interface { ObjectOrLink Collection() CollectionInterface
-
-
-
@@ -333,6 +333,166 @@ type Object struct {Duration time.Duration `jsonld:"duration,omitempty"` } type ( // Article Represents any kind of multi-paragraph written work. Article Object // Audio Represents an audio document of any kind. Audio Document // Document Represents a document of any kind. Document Object // Event Represents any kind of event. Event Object // Image An image document of any kind Image Document // Note Represents a short written work typically less than a single paragraph in length. Note Object // Page Represents a Web Page. Page Document // Video Represents a video document of any kind Video Document ) // Place Represents a logical or physical location. See 5.3 Representing Places for additional information. type Place struct { Object // Accuracy Indicates the accuracy of position coordinates on a Place objects. // Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate". Accuracy float32 // Altitude Indicates the altitude of a place. The measurement units is indicated using the units property. // If units is not specified, the default is assumed to be "m" indicating meters. Altitude float32 // Latitude The latitude of a place Latitude float32 // Longitude The longitude of a place Longitude float32 // Radius The radius from the given latitude and longitude for a Place. // The units is expressed by the units property. If units is not specified, // the default is assumed to be "m" indicating "meters". Radius int // Specifies the measurement units for the radius and altitude properties on a Place object. // If not specified, the default is assumed to be "m" for "meters". // Values "cm" | " feet" | " inches" | " km" | " m" | " miles" | xsd:anyURI Units string } // Profile A Profile 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. type Profile struct { Object // Describes On a Profile object, the describes property identifies the object described by the Profile. Describes Item `jsonld:"describes,omitempty"` } // Relationship Describes a relationship between two individuals. // The subject and object properties are used to identify the connected individuals. //See 5.2 Representing Relationships Between Entities for additional information. // 5.2: The relationship property specifies the kind of relationship that exists between the two individuals identified // by the subject and object properties. Used together, these three properties form what is commonly known // as a "reified statement" where subject identifies the subject, relationship identifies the predicate, // and object identifies the object. type Relationship struct { // Provides the globally unique identifier for anActivity Pub Object or Link. ID ObjectID `jsonld:"id,omitempty"` // Identifies the Activity Pub Object or Link type. Multiple values may be specified. Type ActivityVocabularyType `jsonld:"type,omitempty"` // A simple, human-readable, plain-text name for the object. // HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values. Name NaturalLanguageValue `jsonld:"name,omitempty,collapsible"` // Identifies a resource attached or related to an object that potentially requires special handling. // The intent is to provide a model that is at least semantically similar to attachments in email. Attachment Item `jsonld:"attachment,omitempty"` // Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. // For instance, an object might be attributed to the completion of another activity. AttributedTo Item `jsonld:"attributedTo,omitempty"` // Identifies one or more entities that represent the total population of entities // for which the object can considered to be relevant. Audience Item `jsonld:"audience,omitempty"` // The content or textual representation of the Activity Pub Object encoded as a JSON string. // By default, the value of content is HTML. // The mediaType property can be used in the object to indicate a different content type. // (The content MAY be expressed using multiple language-tagged values.) Content NaturalLanguageValue `jsonld:"content,omitempty,collapsible"` // Identifies the context within which the object exists or an activity was performed. // The notion of "context" used is intentionally vague. // The intended function is to serve as a means of grouping objects and activities that share a // common originating context or purpose. An example could be all activities relating to a common project or event. Context Item `jsonld:"context,omitempty"` // When used on an Object, identifies the MIME media type of the value of the content property. // If not specified, the content property is assumed to contain text/html content. MediaType MimeType `jsonld:"mediaType,omitempty"` // The date and time describing the actual or expected ending time of the object. // When used with an Activity object, for instance, the endTime property specifies the moment // the activity concluded or is expected to conclude. EndTime time.Time `jsonld:"endTime,omitempty"` // Identifies the entity (e.g. an application) that generated the object. Generator Item `jsonld:"generator,omitempty"` // Indicates an entity that describes an icon for this object. // The image should have an aspect ratio of one (horizontal) to one (vertical) // and should be suitable for presentation at a small size. Icon ImageOrLink `jsonld:"icon,omitempty"` // Indicates an entity that describes an image for this object. // Unlike the icon property, there are no aspect ratio or display size limitations assumed. Image ImageOrLink `jsonld:"image,omitempty"` // Indicates one or more entities for which this object is considered a response. InReplyTo Item `jsonld:"inReplyTo,omitempty"` // Indicates one or more physical or logical locations associated with the object. Location Item `jsonld:"location,omitempty"` // Identifies an entity that provides a preview of this object. Preview Item `jsonld:"preview,omitempty"` // The date and time at which the object was published Published time.Time `jsonld:"published,omitempty"` // Identifies a Collection containing objects considered to be responses to this object. Replies Item `jsonld:"replies,omitempty"` // The date and time describing the actual or expected starting time of the object. // When used with an Activity object, for instance, the startTime property specifies // the moment the activity began or is scheduled to begin. StartTime time.Time `jsonld:"startTime,omitempty"` // A natural language summarization of the object encoded as HTML. // *Multiple language tagged summaries may be provided.) Summary NaturalLanguageValue `jsonld:"summary,omitempty,collapsible"` // One or more "tags" that have been associated with an objects. A tag can be any kind of Activity Pub Object. // The key difference between attachment and tag is that the former implies association by inclusion, // while the latter implies associated by reference. Tag Item `jsonld:"tag,omitempty"` // The date and time at which the object was updated Updated time.Time `jsonld:"updated,omitempty"` // Identifies one or more links to representations of the object URL LinkOrURI `jsonld:"url,omitempty"` // Identifies an entity considered to be part of the public primary audience of an Activity Pub Object To ItemCollection `jsonld:"to,omitempty"` // Identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object. Bto ItemCollection `jsonld:"bto,omitempty"` // Identifies anActivity Pub Object that is part of the public secondary audience of this Activity Pub Object. CC ItemCollection `jsonld:"cc,omitempty"` // Identifies one or more Objects that are part of the private secondary audience of this Activity Pub Object. BCC ItemCollection `jsonld:"bcc,omitempty"` // When the object describes a time-bound resource, such as an audio or video, a meeting, etc, // the duration property indicates the object's approximate duration. // The value must be expressed as an xsd:duration as defined by [ xmlschema11-2], // section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S"). Duration time.Duration `jsonld:"duration,omitempty"` // Subject On a Relationship object, the subject property identifies one of the connected individuals. // For instance, for a Relationship object describing "John is related to Sally", subject would refer to John. Subject Item // Object Object Item // Relationship On a Relationship object, the relationship property identifies the kind // of relationship that exists between subject and object. Relationship Item } // Tombstone A Tombstone 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. type Tombstone struct { Object // FormerType On a Tombstone object, the formerType property identifies the type of the object that was deleted. FormerType Item // Deleted On a Tombstone object, the deleted property is a timestamp for when the object was deleted. Deleted time.Time } // ContentType represents the content type for a Source object type ContentType string
-