diff options
author | Julio Capote <jcapote@gmail.com> | 2022-12-18 22:18:42 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2022-12-18 22:18:42 +0000 |
commit | f0efb48bbd45ffd149cd9eb0603f7916ab9d8b67 (patch) | |
tree | 70ec7746b861d2f8791a4919a1247610605be211 /resources/profile.go | |
parent | 20faf99a2076905159a6d623a3f59f5eca1f808b (diff) | |
download | communique-f0efb48bbd45ffd149cd9eb0603f7916ab9d8b67.tar.gz |
start of profiles
Diffstat (limited to '')
-rw-r--r-- | resources/profile.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/resources/profile.go b/resources/profile.go index 207f4de..83b2159 100644 --- a/resources/profile.go +++ b/resources/profile.go @@ -1,12 +1,26 @@ package resources +import "path" + type Profile struct { - Context []string `json:"@context"` + Context []string `json:"@context"` + Type string `json:"type"` + Id string `json:"id"` + Inbox string `json:"inbox"` + Outbox string `json:"outbox"` + Summary string `json:"summary"` + Username string `json:"preferredUsername"` +} + +type PublicKey struct { } -func RenderProfile() *Profile { +func RenderProfile(name, domain string) *Profile { p := Profile{ Context: []string{"https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"}, + Type: "Service", + Inbox: path.Join("https://", domain, "actors", name, "inbox"), + Outbox: path.Join("https://", domain, "actors", name, "outbox"), } return &p } |