+8
-4
api/bild/bildpublicKey.go
api/tangled/tangledpublicKey.go
+8
-4
api/bild/bildpublicKey.go
api/tangled/tangledpublicKey.go
···
1
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3
-
package bild
4
5
-
// schema: sh.bild.publicKey
6
7
import (
8
"github.com/bluesky-social/indigo/lex/util"
9
)
10
11
func init() {
12
-
util.RegisterType("sh.bild.publicKey", &PublicKey{})
13
} //
14
// RECORDTYPE: PublicKey
15
type PublicKey struct {
16
-
LexiconTypeID string `json:"$type,const=sh.bild.publicKey" cborgen:"$type,const=sh.bild.publicKey"`
17
// created: key upload timestamp
18
Created string `json:"created" cborgen:"created"`
19
// key: public key contents
···
1
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3
+
package tangled
4
5
+
// schema: sh.tangled.publicKey
6
7
import (
8
"github.com/bluesky-social/indigo/lex/util"
9
)
10
11
+
const (
12
+
PublicKeyNSID = "sh.tangled.publicKey"
13
+
)
14
+
15
func init() {
16
+
util.RegisterType("sh.tangled.publicKey", &PublicKey{})
17
} //
18
// RECORDTYPE: PublicKey
19
type PublicKey struct {
20
+
LexiconTypeID string `json:"$type,const=sh.tangled.publicKey" cborgen:"$type,const=sh.tangled.publicKey"`
21
// created: key upload timestamp
22
Created string `json:"created" cborgen:"created"`
23
// key: public key contents
+3
-3
api/bild/cbor_gen.go
api/tangled/cbor_gen.go
+3
-3
api/bild/cbor_gen.go
api/tangled/cbor_gen.go
···
1
// Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT.
2
3
-
package bild
4
5
import (
6
"fmt"
···
88
return err
89
}
90
91
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.bild.publicKey"))); err != nil {
92
return err
93
}
94
-
if _, err := cw.WriteString(string("sh.bild.publicKey")); err != nil {
95
return err
96
}
97
···
1
// Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT.
2
3
+
package tangled
4
5
import (
6
"fmt"
···
88
return err
89
}
90
91
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.publicKey"))); err != nil {
92
return err
93
}
94
+
if _, err := cw.WriteString(string("sh.tangled.publicKey")); err != nil {
95
return err
96
}
97
+2
-2
appview/state/state.go
+2
-2
appview/state/state.go
···
14
"github.com/gliderlabs/ssh"
15
"github.com/go-chi/chi/v5"
16
"github.com/google/uuid"
17
-
shbild "github.com/icyphox/bild/api/bild"
18
"github.com/icyphox/bild/appview"
19
"github.com/icyphox/bild/appview/auth"
20
"github.com/icyphox/bild/appview/db"
···
148
Collection: "sh.bild.publicKey",
149
Repo: did,
150
Rkey: uuid.New().String(),
151
-
Record: &lexutil.LexiconTypeDecoder{Val: &shbild.PublicKey{
152
Created: time.Now().String(),
153
Key: key,
154
Name: name,
···
14
"github.com/gliderlabs/ssh"
15
"github.com/go-chi/chi/v5"
16
"github.com/google/uuid"
17
+
tangled "github.com/icyphox/bild/api/tangled"
18
"github.com/icyphox/bild/appview"
19
"github.com/icyphox/bild/appview/auth"
20
"github.com/icyphox/bild/appview/db"
···
148
Collection: "sh.bild.publicKey",
149
Repo: did,
150
Rkey: uuid.New().String(),
151
+
Record: &lexutil.LexiconTypeDecoder{Val: &tangled.PublicKey{
152
Created: time.Now().String(),
153
Key: key,
154
Name: name,
+4
-4
cmd/gen.go
+4
-4
cmd/gen.go
···
1
package main
2
3
import (
4
+
shtangled "github.com/icyphox/bild/api/tangled"
5
cbg "github.com/whyrusleeping/cbor-gen"
6
)
7
···
12
}
13
14
if err := genCfg.WriteMapEncodersToFile(
15
+
"api/tangled/cbor_gen.go",
16
+
"tangled",
17
+
shtangled.PublicKey{},
18
); err != nil {
19
panic(err)
20
}
+1
flake.nix
+1
flake.nix
+2
-1
knotserver/handler.go
+2
-1
knotserver/handler.go
···
8
"net/http"
9
10
"github.com/go-chi/chi/v5"
11
"github.com/icyphox/bild/knotserver/config"
12
"github.com/icyphox/bild/knotserver/db"
13
"github.com/icyphox/bild/knotserver/jsclient"
···
71
}
72
73
func (h *Handle) StartJetstream(ctx context.Context) error {
74
-
colections := []string{"sh.bild.publicKeys"}
75
dids := []string{}
76
77
h.js = jsclient.NewJetstreamClient(colections, dids)
···
8
"net/http"
9
10
"github.com/go-chi/chi/v5"
11
+
tangled "github.com/icyphox/bild/api/tangled"
12
"github.com/icyphox/bild/knotserver/config"
13
"github.com/icyphox/bild/knotserver/db"
14
"github.com/icyphox/bild/knotserver/jsclient"
···
72
}
73
74
func (h *Handle) StartJetstream(ctx context.Context) error {
75
+
colections := []string{tangled.PublicKeyNSID}
76
dids := []string{}
77
78
h.js = jsclient.NewJetstreamClient(colections, dids)
+4
-4
lexicon-build-config.json
+4
-4
lexicon-build-config.json