Documentation ¶
Index ¶
Constants ¶
View Source
const ( Namespace = "https://www.w3.org/ns/activitystreams" Public = "https://www.w3.org/ns/activitystreams#Public" )
Variables ¶
View Source
var Extensions = map[string]string{}
Allows us to drop more elements into @context on Create/Update
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { BaseObject Actor string `json:"actor"` Published time.Time `json:"published,omitempty"` To []string `json:"to,omitempty"` CC []string `json:"cc,omitempty"` Object *Object `json:"object"` }
Activity describes an event in the ActivityStream
func NewCreateActivity ¶
func NewDeleteActivity ¶
func NewUpdateActivity ¶
type Attachment ¶
type Attachment struct { Type AttachmentType `json:"type"` URL string `json:"url"` MediaType string `json:"mediaType"` Name string `json:"name"` }
func NewDocumentAttachment ¶
func NewDocumentAttachment(url string) Attachment
func NewImageAttachment ¶
func NewImageAttachment(url string) Attachment
type AttachmentType ¶
type AttachmentType string
const ( TypeImage AttachmentType = "Image" TypeDocument AttachmentType = "Document" )
type BaseObject ¶
type FollowActivity ¶
type FollowActivity struct { BaseObject Actor string `json:"actor"` Published time.Time `json:"published,omitempty"` To []string `json:"to,omitempty"` CC []string `json:"cc,omitempty"` Object string `json:"object"` }
func NewFollowActivity ¶
func NewFollowActivity(actorIRI, followeeIRI string) *FollowActivity
type Object ¶
type Object struct { BaseObject Published time.Time `json:"published,omitempty"` Summary *string `json:"summary,omitempty"` InReplyTo *string `json:"inReplyTo,omitempty"` URL string `json:"url"` AttributedTo string `json:"attributedTo,omitempty"` To []string `json:"to,omitempty"` CC []string `json:"cc,omitempty"` Name string `json:"name,omitempty"` Content string `json:"content,omitempty"` ContentMap map[string]string `json:"contentMap,omitempty"` Tag []Tag `json:"tag,omitempty"` Attachment []Attachment `json:"attachment,omitempty"` // Person Inbox string `json:"inbox,omitempty"` Outbox string `json:"outbox,omitempty"` Following string `json:"following,omitempty"` Followers string `json:"followers,omitempty"` PreferredUsername string `json:"preferredUsername,omitempty"` Icon *Image `json:"icon,omitempty"` PublicKey *PublicKey `json:"publicKey,omitempty"` Endpoints *Endpoints `json:"endpoints,omitempty"` }
Object is the primary base type for the Activity Streams vocabulary.
func NewArticleObject ¶
func NewArticleObject() *Object
func NewNoteObject ¶
func NewNoteObject() *Object
func NewPersonObject ¶
func NewPersonObject() *Object
type OrderedCollection ¶
type OrderedCollection struct { BaseObject TotalItems int `json:"totalItems"` First string `json:"first"` Last string `json:"last,omitempty"` }
func NewOrderedCollection ¶
func NewOrderedCollection(accountRoot, collType string, items int) *OrderedCollection
type OrderedCollectionPage ¶
type OrderedCollectionPage struct { BaseObject TotalItems int `json:"totalItems"` PartOf string `json:"partOf"` Next string `json:"next,omitempty"` Prev string `json:"prev,omitempty"` OrderedItems []interface{} `json:"orderedItems,omitempty"` }
func NewOrderedCollectionPage ¶
func NewOrderedCollectionPage(accountRoot, collType string, items, page int) *OrderedCollectionPage
type Person ¶
type Person struct { BaseObject Inbox string `json:"inbox"` Outbox string `json:"outbox"` PreferredUsername string `json:"preferredUsername"` URL string `json:"url"` Name string `json:"name"` Icon Image `json:"icon"` Following string `json:"following"` Followers string `json:"followers"` Summary string `json:"summary"` PublicKey PublicKey `json:"publicKey"` Endpoints Endpoints `json:"endpoints"` }
func (*Person) GetPrivKey ¶
func (*Person) SetPrivKey ¶
Click to show internal directories.
Click to hide internal directories.