Files
web-core-fr-gp/activitystreams/person.go
T

35 lines
926 B
Go
Raw Normal View History

2018-06-22 16:42:38 -04:00
package activitystreams
type Person struct {
2018-06-22 17:11:07 -04:00
BaseObject
2018-06-22 16:42:38 -04:00
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"`
}
func NewPerson(accountRoot string) *Person {
p := Person{
2018-06-22 17:11:07 -04:00
BaseObject: BaseObject{
Type: "Person",
Context: []string{
"https://www.w3.org/ns/activitystreams",
},
ID: accountRoot,
2018-06-22 16:42:38 -04:00
},
URL: accountRoot,
Following: accountRoot + "/following",
Followers: accountRoot + "/followers",
Inbox: accountRoot + "/inbox",
Outbox: accountRoot + "/outbox",
}
return &p
}