Changes
11 changed files (+150/-131)
-
-
@@ -64,6 +64,31 @@ var validActivityTypes = [...]string{// Actor Types } // Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. // The object property is therefore inappropriate for these activities. type IntransitiveActivity struct { *Object // Describes one or more entities that either performed or are expected to perform the activity. // Any single activity can have multiple actors. The actor may be specified using an indirect Link. Actor Actor `jsonld:"actor"` // Describes the indirect object, or target, of the activity. // The precise meaning of the target is largely dependent on the type of action being described // but will often be the object of the English preposition "to". // For instance, in the activity "John added a movie to his wishlist", // the target of the activity is John's wishlist. An activity can have more than one target. Target ObjectOrLink `jsonld:"actor"` // Describes the result of the activity. For instance, if a particular action results in the creation // of a new resource, the result property can be used to describe that new resource. Result ObjectOrLink `jsonld:"actor"` // Describes an indirect object of the activity from which the activity is directed. // The precise meaning of the origin is the object of the English preposition "from". // For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". Origin ObjectOrLink `jsonld:"origin"` // Identifies one or more objects used (or to be used) in the completion of an Activity. Instrument ObjectOrLink `jsonld:"instrument"` Source Source } // An Activity is a subtype of Object that describes some form of action that may happen, // is currently happening, or has already happened. // The Activity type itself serves as an abstract base type for all types of activities.
-
@@ -78,110 +103,112 @@ type Activity struct {Object ObjectOrLink `jsonld:"object"` } // Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate // the context into which the object has been accepted. type Accept Activity type ( // Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate // the context into which the object has been accepted. Accept Activity // Indicates that the actor has added the object to the target. If the target property is not explicitly specified, // the target would need to be determined implicitly by context. // The origin can be used to identify the context from which the object originated. type Add Activity // Indicates that the actor has added the object to the target. If the target property is not explicitly specified, // the target would need to be determined implicitly by context. // The origin can be used to identify the context from which the object originated. Add Activity // Indicates that the actor is calling the target's attention the object. // The origin typically has no defined meaning. type Announce Activity // Indicates that the actor is calling the target's attention the object. // The origin typically has no defined meaning. Announce Activity // An IntransitiveActivity that indicates that the actor has arrived at the location. // The origin can be used to identify the context from which the actor originated. // The target typically has no defined meaning. type Arrive IntransitiveActivity // An IntransitiveActivity that indicates that the actor has arrived at the location. // The origin can be used to identify the context from which the actor originated. // The target typically has no defined meaning. Arrive IntransitiveActivity // Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. // The typical use is to support social systems that allow one user to block activities or content of other users. // The target and origin typically have no defined meaning. type Block Ignore // Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. // The typical use is to support social systems that allow one user to block activities or content of other users. // The target and origin typically have no defined meaning. Block Ignore // Indicates that the actor has created the object. type Create Activity // Indicates that the actor has created the object. Create Activity // Indicates that the actor has deleted the object. // If specified, the origin indicates the context from which the object was deleted. type Delete Activity // Indicates that the actor has deleted the object. // If specified, the origin indicates the context from which the object was deleted. Delete Activity // Indicates that the actor dislikes the object. type Dislike Activity // Indicates that the actor dislikes the object. Dislike Activity // Indicates that the actor is "flagging" the object. // Flagging is defined in the sense common to many social platforms as reporting content as being // inappropriate for any number of reasons. type Flag Activity // Indicates that the actor is "flagging" the object. // Flagging is defined in the sense common to many social platforms as reporting content as being // inappropriate for any number of reasons. Flag Activity // Indicates that the actor is "following" the object. Following is defined in the sense typically used within // Social systems in which the actor is interested in any activity performed by or on the object. // The target and origin typically have no defined meaning. type Follow Activity // Indicates that the actor is "following" the object. Following is defined in the sense typically used within // Social systems in which the actor is interested in any activity performed by or on the object. // The target and origin typically have no defined meaning. Follow Activity // Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning. type Ignore Activity // Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning. Ignore Activity // A specialization of Offer in which the actor is extending an invitation for the object to the target. type Invite Offer // A specialization of Offer in which the actor is extending an invitation for the object to the target. Invite Offer // Indicates that the actor has joined the object. The target and origin typically have no defined meaning. type Join Activity // Indicates that the actor has joined the object. The target and origin typically have no defined meaning. Join Activity // Indicates that the actor has left the object. The target and origin typically have no meaning. type Leave Activity // Indicates that the actor has left the object. The target and origin typically have no meaning. Leave Activity // Indicates that the actor likes, recommends or endorses the object. // The target and origin typically have no defined meaning. type Like Activity // Indicates that the actor likes, recommends or endorses the object. // The target and origin typically have no defined meaning. Like Activity // Inherits all properties from Activity. type Listen Activity // Inherits all properties from Activity. Listen Activity // Indicates that the actor has moved object from origin to target. // If the origin or target are not specified, either can be determined by context. type Move Activity // Indicates that the actor has moved object from origin to target. // If the origin or target are not specified, either can be determined by context. Move Activity // Indicates that the actor is offering the object. // If specified, the target indicates the entity to which the object is being offered. type Offer Activity // Indicates that the actor is offering the object. // If specified, the target indicates the entity to which the object is being offered. Offer Activity // Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning. type Reject Activity // Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning. Reject Activity // Indicates that the actor has read the object. type Read Activity // Indicates that the actor has read the object. Read Activity // Indicates that the actor is removing the object. If specified, // the origin indicates the context from which the object is being removed. type Remove Activity // Indicates that the actor is removing the object. If specified, // the origin indicates the context from which the object is being removed. Remove Activity // A specialization of Reject in which the rejection is considered tentative. type TentativeReject Reject // A specialization of Reject in which the rejection is considered tentative. TentativeReject Reject // A specialization of Accept indicating that the acceptance is tentative. type TentativeAccept Accept // A specialization of Accept indicating that the acceptance is tentative. TentativeAccept Accept // Indicates that the actor is traveling to target from origin. // Travel is an IntransitiveObject whose actor specifies the direct object. // If the target or origin are not specified, either can be determined by context. type Travel IntransitiveActivity // Indicates that the actor is traveling to target from origin. // Travel is an IntransitiveObject whose actor specifies the direct object. // If the target or origin are not specified, either can be determined by context. Travel IntransitiveActivity // Indicates that the actor is undoing the object. In most cases, the object will be an Activity describing // some previously performed action (for instance, a person may have previously "liked" an article but, // for whatever reason, might choose to undo that like at some later point in time). // The target and origin typically have no defined meaning. type Undo Activity // Indicates that the actor is undoing the object. In most cases, the object will be an Activity describing // some previously performed action (for instance, a person may have previously "liked" an article but, // for whatever reason, might choose to undo that like at some later point in time). // The target and origin typically have no defined meaning. Undo Activity // Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism // for describing the actual set of modifications made to object. // The target and origin typically have no defined meaning. type Update Activity // Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism // for describing the actual set of modifications made to object. // The target and origin typically have no defined meaning. Update Activity // Indicates that the actor has viewed the object. type View Activity // Indicates that the actor has viewed the object. View Activity ) // Represents a question being asked. Question objects are an extension of IntransitiveActivity. // That is, the Question object is an Activity, but the direct object is the question
-
@@ -200,31 +227,6 @@ type Question struct {Closed bool `jsonld:"closed"` } // Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. // The object property is therefore inappropriate for these activities. type IntransitiveActivity struct { *Object // Describes one or more entities that either performed or are expected to perform the activity. // Any single activity can have multiple actors. The actor may be specified using an indirect Link. Actor Actor `jsonld:"actor"` // Describes the indirect object, or target, of the activity. // The precise meaning of the target is largely dependent on the type of action being described // but will often be the object of the English preposition "to". // For instance, in the activity "John added a movie to his wishlist", // the target of the activity is John's wishlist. An activity can have more than one target. Target ObjectOrLink `jsonld:"actor"` // Describes the result of the activity. For instance, if a particular action results in the creation // of a new resource, the result property can be used to describe that new resource. Result ObjectOrLink `jsonld:"actor"` // Describes an indirect object of the activity from which the activity is directed. // The precise meaning of the origin is the object of the English preposition "from". // For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". Origin ObjectOrLink `jsonld:"origin"` // Identifies one or more objects used (or to be used) in the completion of an Activity. Instrument ObjectOrLink `jsonld:"instrument"` Source Source } func AcceptNew(id ObjectId) *Accept { a := ActivityNew(id, AcceptType) o := Accept(*a)
-
-
-
@@ -69,20 +69,22 @@ type Actor struct {Streams []Collection `jsonld:"streams"` } // Describes a software application. type Application Actor type ( // Describes a software application. Application Actor // Represents a formal or informal collective of Actors. type Group Actor // Represents a formal or informal collective of Actors. Group Actor // Represents an organization. type Organization Actor // Represents an organization. Organization Actor // Represents an individual person. type Person Actor // Represents an individual person. Person Actor // Represents a service of any kind. type Service Actor // Represents a service of any kind. Service Actor ) func ValidActorType(_type string) bool { for _, v := range validActorTypes {
-
-
-
@@ -18,8 +18,6 @@ type OrderedCollection struct {OrderedItems ItemCollection `jsonld:"orderedItems"` } type Page ObjectOrLink type CollectionPage struct { PartOf *Collection // In a paged Collection, indicates the page that contains the most recently updated member items.
-
-
-
@@ -1,5 +1,7 @@package activitypub type FollowersCollection Followers type ( FollowersCollection Followers type Followers Collection Followers Collection )
-
-
-
@@ -1,5 +1,7 @@package activitypub type FollowingCollection Following type ( FollowingCollection Following type Following Collection Following Collection )
-
-
-
@@ -1,5 +1,7 @@package activitypub type InboxStream Inbox type ( InboxStream Inbox type Inbox OrderedCollection Inbox OrderedCollection )
-
-
-
@@ -1,5 +1,7 @@package activitypub type LikedCollection Liked type ( LikedCollection Liked type Liked OrderedCollection Liked OrderedCollection )
-
-
-
@@ -1,5 +1,7 @@package activitypub type LikesCollection Likes type ( LikesCollection Likes type Likes OrderedCollection Likes OrderedCollection )
-
-
-
@@ -1,5 +1,7 @@package activitypub type OutboxStream Outbox type ( OutboxStream Outbox type Outbox OrderedCollection Outbox OrderedCollection )
-
-
-
@@ -1,5 +1,7 @@package activitypub type SharesCollection Shares type ( SharesCollection Shares type Shares OrderedCollection Shares OrderedCollection )
-
-
-
@@ -1,4 +1,7 @@package activitypub type Iri URI type URI string type ( IRI URI URI string )
-