tangled
alpha
login
or
join now
edavis.dev
/
bsky-feeds
1
fork
atom
this repo has no description
1
fork
atom
overview
issues
pulls
pipelines
fix: export DidDocument fields
Eric Davis
1 year ago
69241487
2ca7f877
+13
-13
2 changed files
expand all
collapse all
unified
split
Makefile
cmd
feedweb
did.go
+1
-1
Makefile
···
3
3
bin/mostliked: cmd/mostliked/main.go pkg/mostliked/handler.go db/mostliked/*.go pkg/feeds/*.go
4
4
go build -o $@ ./cmd/mostliked
5
5
6
6
-
bin/feedweb: cmd/feedweb/main.go pkg/*/generator.go db/*/*.go pkg/feeds/*.go
6
6
+
bin/feedweb: cmd/feedweb/*.go pkg/*/generator.go db/*/*.go pkg/feeds/*.go
7
7
go build -o $@ ./cmd/feedweb
8
8
9
9
.PHONY: clean
+12
-12
cmd/feedweb/did.go
···
9
9
const NgrokHostname = "routinely-right-barnacle.ngrok-free.app"
10
10
11
11
type DidDocument struct {
12
12
-
context []string `json:"@context"`
13
13
-
id string `json:"id"`
14
14
-
services []DidService `json:"service"`
12
12
+
Context []string `json:"@context"`
13
13
+
ID string `json:"id"`
14
14
+
Services []DidService `json:"service"`
15
15
}
16
16
17
17
type DidService struct {
18
18
-
id string `json:"id"`
19
19
-
serviceType string `json:"type"`
20
20
-
serviceEndpoint string `json:"serviceEndpoint"`
18
18
+
ID string `json:"id"`
19
19
+
ServiceType string `json:"type"`
20
20
+
ServiceEndpoint string `json:"serviceEndpoint"`
21
21
}
22
22
23
23
func didDoc(c echo.Context) error {
24
24
doc := DidDocument{
25
25
-
context: []string{"https://www.w3.org/ns/did/v1"},
26
26
-
id: `did:web:` + NgrokHostname,
27
27
-
services: []DidService{
25
25
+
Context: []string{"https://www.w3.org/ns/did/v1"},
26
26
+
ID: `did:web:` + NgrokHostname,
27
27
+
Services: []DidService{
28
28
DidService{
29
29
-
id: "#bsky_fg",
30
30
-
serviceType: "BskyFeedGenerator",
31
31
-
serviceEndpoint: `https://` + NgrokHostname,
29
29
+
ID: "#bsky_fg",
30
30
+
ServiceType: "BskyFeedGenerator",
31
31
+
ServiceEndpoint: `https://` + NgrokHostname,
32
32
},
33
33
},
34
34
}