aboutsummaryrefslogtreecommitdiff
path: root/resources/webfinger.go
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-12-29 20:08:16 +0000
committerJulio Capote <jcapote@gmail.com>2022-12-29 20:08:16 +0000
commita4288b06bf13210721c8f2fae64bc12c118f9041 (patch)
tree49808a68d61aa450c6625477e468968fd3198ded /resources/webfinger.go
parent5a990719a02f4fd33817a2188be17b3b50498b49 (diff)
downloadcommunique-a4288b06bf13210721c8f2fae64bc12c118f9041.tar.gz
refactor
Diffstat (limited to 'resources/webfinger.go')
-rw-r--r--resources/webfinger.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/resources/webfinger.go b/resources/webfinger.go
deleted file mode 100644
index e7c47ea..0000000
--- a/resources/webfinger.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package resources
-
-import (
- "fmt"
- "path"
-)
-
-type Link struct {
- Rel string `json:"rel"`
- Type string `json:"type"`
- Href string `json:"href"`
-}
-
-type WebfingerResource struct {
- Subject string `json:"subject"`
- Aliases []string `json:"aliases"`
- Links []Link `json:"links"`
-}
-
-func RenderWebfingerResource(name, domain string) (*WebfingerResource, error) {
- rs := WebfingerResource{
- // TODO clean up
- Subject: fmt.Sprintf("acct:%s@%s", name, domain),
- Aliases: []string{},
- Links: []Link{{
- Rel: "self",
- Href: path.Join("https://", domain, "actors", name),
- Type: "application/activity+json",
- }},
- }
- return &rs, nil
-}