From f0efb48bbd45ffd149cd9eb0603f7916ab9d8b67 Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Sun, 18 Dec 2022 17:18:42 -0500 Subject: start of profiles --- resources/profile.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'resources/profile.go') 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 } -- cgit v1.2.3