aboutsummaryrefslogtreecommitdiff
path: root/resources/profile.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--resources/profile.go18
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
}