Documentation ¶
Index ¶
- func CollectionsShow(env *Env, w http.ResponseWriter, r *http.Request) error
- func Follow(ctx context.Context, follower *models.Account, target *models.Actor) error
- func Followers(env *Env, w http.ResponseWriter, r *http.Request) error
- func Following(env *Env, w http.ResponseWriter, r *http.Request) error
- func Like(ctx context.Context, liker *models.Account, target *models.Status) error
- func Outbox(env *Env, w http.ResponseWriter, r *http.Request) error
- func Unfollow(ctx context.Context, follower *models.Account, target *models.Actor) error
- func Unlike(ctx context.Context, liker *models.Account, target *models.Status) error
- func UsersShow(env *Env, w http.ResponseWriter, r *http.Request) error
- type Activity
- type Attachment
- type Collection
- type Env
- type HashTag
- type Image
- type InboxController
- type Item
- type Object
- type Option
- type Status
- type StringOrArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectionsShow ¶
Types ¶
type Activity ¶
type Activity struct { // Type is the type of the Activity. Type string `json:"type"` // The Activity's unique global identifier. ID string `json:"id"` // Object is the Object that the Activity is acting upon. Object any `json:"object"` // Actor is the Actor that performed the Activity. Actor any `json:"actor"` // Target is the Object that the Activity is directed at. Target string `json:"target"` Published time.Time `json:"published"` Updated time.Time `json:"updated"` }
Activity is an ActivityStreams Activity. https://www.w3.org/TR/activitystreams-core/#activities
type Attachment ¶
type Collection ¶
type Env ¶
type HashTag ¶
type HashTag struct { Type string `json:"type"` Href string `json:"href"` Name string `json:"name"` }
HashTag is an ActivityStreams Hashtag
type Image ¶
type Image struct { Type string `json:"type"` MediaType string `json:"mediaType"` URL string `json:"url"` }
Image is an ActivityStreams Image
type InboxController ¶
type InboxController struct { }
func NewInbox ¶
func NewInbox(db *gorm.DB) *InboxController
func (*InboxController) Create ¶
func (i *InboxController) Create(env *Env, w http.ResponseWriter, r *http.Request) error
type Object ¶
type Object struct { // Type is the type of the Object. Type string `json:"type"` }
Object is an ActivityPub Object. https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object
type Option ¶
type Option struct { Type string `json:"type"` Name string `json:"name"` Replies Collection `json:"replies"` }
type Status ¶
type Status struct { // Type is the type of the Status. Type string `json:"type"` // The Status's unique global identifier. ID string `json:"id"` AttributedTo string `json:"attributedTo"` InReplyTo string `json:"inReplyTo"` Published time.Time `json:"published"` Updated time.Time `json:"updated"` To StringOrArray `json:"to"` CC StringOrArray `json:"cc"` Sensitive bool `json:"sensitive"` Summary string `json:"summary"` Content string `json:"content"` Attachments []interface{} `json:"attachment"` Tags []HashTag `json:"tag"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` OneOf []Option `json:"oneOf"` }
type StringOrArray ¶
type StringOrArray []string
func (*StringOrArray) UnmarshalJSON ¶
func (s *StringOrArray) UnmarshalJSON(b []byte) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.