Documentation ¶
Overview ¶
Package activitystream implements Atom Activity Streams 1.0, as defined in http://activitystrea.ms/specs/atom/1.0/.
Index ¶
Constants ¶
View Source
const ( ObjectActivity ObjectType = "http://activitystrea.ms/schema/1.0/activity" ObjectNote = "http://activitystrea.ms/schema/1.0/note" ObjectComment = "http://activitystrea.ms/schema/1.0/comment" ObjectPerson = "http://activitystrea.ms/schema/1.0/person" ObjectCollection = "http://activitystrea.ms/schema/1.0/collection" ObjectGroup = "http://activitystrea.ms/schema/1.0/group" )
View Source
const ( VerbPost Verb = "http://activitystrea.ms/schema/1.0/post" VerbFavorite = "http://activitystrea.ms/schema/1.0/favorite" VerbUnfavorite = "http://activitystrea.ms/schema/1.0/unfavorite" VerbDelete = "http://activitystrea.ms/schema/1.0/delete" VerbFollow = "http://activitystrea.ms/schema/1.0/follow" VerbRequestFriend = "http://activitystrea.ms/schema/1.0/request-friend" VerbAuthorize = "http://activitystrea.ms/schema/1.0/authorize" VerbReject = "http://activitystrea.ms/schema/1.0/reject" VerbUnfollow = "http://ostatus.org/schema/1.0/unfollow" VerbBlock = "http://mastodon.social/schema/1.0/block" VerbUnblock = "http://mastodon.social/schema/1.0/unblock" )
View Source
const (
CollectionPublic = "http://activityschema.org/collection/public"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { ID string `xml:"id"` Title string `xml:"title"` Link []Link `xml:"link"` Published Time `xml:"published"` Updated Time `xml:"updated"` Author *Person `xml:"author"` Summary *Text `xml:"summary"` Content *Text `xml:"content"` ObjectType ObjectType `xml:"http://activitystrea.ms/spec/1.0/ object-type,omitempty"` Verb Verb `xml:"http://activitystrea.ms/spec/1.0/ verb,omitempty"` Object *Entry `xml:"http://activitystrea.ms/spec/1.0/ object"` InReplyTo *InReplyTo `xml:"http://purl.org/syndication/thread/1.0 in-reply-to"` }
An Entry is a feed item.
type Feed ¶
type Feed struct { XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"` ID string `xml:"id"` Title string `xml:"title"` Subtitle string `xml:"subtitle,omitempty"` Updated Time `xml:"updated"` Logo string `xml:"logo,omitempty"` Author *Person `xml:"author"` Link []Link `xml:"link"` Entry []*Entry `xml:"entry"` }
A Feed is an activity stream feed.
type HTTPError ¶
type HTTPError int
An HTTPError is an HTTP error. Its value is the HTTP status code.
type InReplyTo ¶
type InReplyTo struct { Ref string `xml:"ref,attr"` Href string `xml:"href,attr,omitempty"` Source string `xml:"source,attr,omitempty"` Type string `xml:"type,attr,omitempty"` }
InReplyTo is used to indicate that an entry is a response to another resource.
type Link ¶
type Link struct { Rel string `xml:"rel,attr,omitempty"` Href string `xml:"href,attr"` Type string `xml:"type,attr,omitempty"` HrefLang string `xml:"hreflang,attr,omitempty"` Title string `xml:"title,attr,omitempty"` Length uint `xml:"length,attr,omitempty"` ObjectType ObjectType `xml:"http://ostatus.org/schema/1.0 object-type,attr,omitempty"` MediaWidth uint `xml:"http://purl.org/syndication/atommedia width,attr,omitempty"` MediaHeight uint `xml:"http://purl.org/syndication/atommedia height,attr,omitempty"` }
A Link provides a relationship between an entry or a person and a URL.
type Person ¶
type Person struct { ID string `xml:"id"` URI string `xml:"uri,omitempty"` Name string `xml:"name"` Email string `xml:"email,omitempty"` Summary string `xml:"summary,omitempty"` Link []Link `xml:"link"` ObjectType ObjectType `xml:"http://activitystrea.ms/spec/1.0/ object-type,omitempty"` PreferredUsername string `xml:"http://portablecontacts.net/spec/1.0 preferredUsername,omitempty"` DisplayName string `xml:"http://portablecontacts.net/spec/1.0 displayName,omitempty"` Note string `xml:"http://portablecontacts.net/spec/1.0 note,omitempty"` }
A Person is a person.
func (*Person) AccountURI ¶
AccountURI returns this person's acct: URI.
type Text ¶
type Text struct { Type string `xml:"type,attr"` Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` Body string `xml:",chardata"` }
A Text has a type and body.
Click to show internal directories.
Click to hide internal directories.