Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActivityStreams = "https://www.w3.org/ns/activitystreams" TypeCreate = "Create" TypeFollow = "Follow" TypeAccept = "Accept" TypeNote = "Note" TypeLike = "Like" TypeOrderedCollection = "OrderedCollection" Public = ActivityStreams + "#Public" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { Context interface{} `json:"@context"` ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Actor string `json:"actor,omitempty"` Object interface{} `json:"object,omitempty"` From string `json:"from,omitempty"` To interface{} `json:"to,omitempty"` InReplyTo string `json:"inReplyTo,omitempty"` Content string `json:"content,omitempty"` Published time.Time `json:"published,omitempty"` }
type Actor ¶
type Actor struct { Context []interface{} `json:"@context"` Followers string `json:"followers"` Following string `json:"following"` Id string `json:"id"` Type string `json:"type"` PreferredUsername string `json:"preferredUsername"` Inbox string `json:"inbox"` Outbox string `json:"outbox"` Playlists string `json:"playlists"` Name string `json:"name"` PublicKey PublicKey `json:"publicKey"` Url string `json:"url"` Summary string `json:"summary"` Published time.Time `json:"published"` Icon Media `json:"icon,omitempty"` Image Media `json:"image,omitempty"` }
func UnmarshalActor ¶
type Follow ¶
type Follow struct { Context string `json:"@context" validate:"activitystream"` UniqueIdentifier string `json:"-"` Id string `json:"id"` Type string `json:"type"` Actor string `json:"actor"` Object string `json:"object"` }
func UnmarshalFollow ¶
type Followers ¶
type Followers struct { Context string `json:"@context"` ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` TotalItems int `json:"totalItems"` OrderedItems interface{} `json:"orderedItems,omitempty"` }
func UnmarshalFollowers ¶
type Inbox ¶
type Inbox struct { Context string `json:"@context"` ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` TotalItems int `json:"totalItems"` OrderedItems interface{} `json:"orderedItems,omitempty"` }
func UnmarshalInbox ¶
type Note ¶
type Note struct { Context string `json:"@context" validate:"activitystream"` Id string `json:"id,omitempty"` Type string `json:"type"` To []string `json:"to"` AttributedTo string `json:"attributedTo"` InReplyTo string `json:"inReplyTo,omitempty"` Content string `json:"content"` }
func NewPublicNote ¶
func UnmarshalNote ¶
type Object ¶
type Object struct { Context interface{} `json:"@context"` Type string `json:"type"` }
func UnmarshalObject ¶
type OrderedCollection ¶
type OrderedCollection struct { Context string `json:"@context"` ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` TotalItems int `json:"totalItems"` OrderedItems interface{} `json:"orderedItems,omitempty"` First string `json:"first,omitempty"` }
func NewOrderedCollection ¶
func NewOrderedCollection(id string, items interface{}, length int) *OrderedCollection
func UnmarshalOrderedCollection ¶
func UnmarshalOrderedCollection(data []byte) (OrderedCollection, error)
func (*OrderedCollection) Marshal ¶
func (orderedCollection *OrderedCollection) Marshal() ([]byte, error)
type Outbox ¶
type Outbox struct { Context string `json:"@context"` ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` TotalItems int `json:"totalItems"` OrderedItems interface{} `json:"orderedItems,omitempty"` }
func UnmarshalOutbox ¶
Click to show internal directories.
Click to hide internal directories.