forked from tangled.org/core
this repo has no description

rename to tangled

Changed files
+25 -19
api
appview
state
cmd
knotserver
lexicons
+8 -4
api/bild/bildpublicKey.go api/tangled/tangledpublicKey.go
···
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
-
package bild
+
package tangled
-
// schema: sh.bild.publicKey
+
// schema: sh.tangled.publicKey
import (
"github.com/bluesky-social/indigo/lex/util"
)
+
const (
+
PublicKeyNSID = "sh.tangled.publicKey"
+
)
+
func init() {
-
util.RegisterType("sh.bild.publicKey", &PublicKey{})
+
util.RegisterType("sh.tangled.publicKey", &PublicKey{})
} //
// RECORDTYPE: PublicKey
type PublicKey struct {
-
LexiconTypeID string `json:"$type,const=sh.bild.publicKey" cborgen:"$type,const=sh.bild.publicKey"`
+
LexiconTypeID string `json:"$type,const=sh.tangled.publicKey" cborgen:"$type,const=sh.tangled.publicKey"`
// created: key upload timestamp
Created string `json:"created" cborgen:"created"`
// key: public key contents
+3 -3
api/bild/cbor_gen.go api/tangled/cbor_gen.go
···
// Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT.
-
package bild
+
package tangled
import (
"fmt"
···
return err
}
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.bild.publicKey"))); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.publicKey"))); err != nil {
return err
}
-
if _, err := cw.WriteString(string("sh.bild.publicKey")); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.publicKey")); err != nil {
return err
}
+2 -2
appview/state/state.go
···
"github.com/gliderlabs/ssh"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
-
shbild "github.com/icyphox/bild/api/bild"
+
tangled "github.com/icyphox/bild/api/tangled"
"github.com/icyphox/bild/appview"
"github.com/icyphox/bild/appview/auth"
"github.com/icyphox/bild/appview/db"
···
Collection: "sh.bild.publicKey",
Repo: did,
Rkey: uuid.New().String(),
-
Record: &lexutil.LexiconTypeDecoder{Val: &shbild.PublicKey{
+
Record: &lexutil.LexiconTypeDecoder{Val: &tangled.PublicKey{
Created: time.Now().String(),
Key: key,
Name: name,
+4 -4
cmd/gen.go
···
package main
import (
-
shbild "github.com/icyphox/bild/api/bild"
+
shtangled "github.com/icyphox/bild/api/tangled"
cbg "github.com/whyrusleeping/cbor-gen"
)
···
}
if err := genCfg.WriteMapEncodersToFile(
-
"api/bild/cbor_gen.go",
-
"bild",
-
shbild.PublicKey{},
+
"api/tangled/cbor_gen.go",
+
"tangled",
+
shtangled.PublicKey{},
); err != nil {
panic(err)
}
+1
flake.nix
···
pkgs.httpie
pkgs.indigo-lexgen
pkgs.litecli
+
pkgs.websocat
];
};
});
+2 -1
knotserver/handler.go
···
"net/http"
"github.com/go-chi/chi/v5"
+
tangled "github.com/icyphox/bild/api/tangled"
"github.com/icyphox/bild/knotserver/config"
"github.com/icyphox/bild/knotserver/db"
"github.com/icyphox/bild/knotserver/jsclient"
···
}
func (h *Handle) StartJetstream(ctx context.Context) error {
-
colections := []string{"sh.bild.publicKeys"}
+
colections := []string{tangled.PublicKeyNSID}
dids := []string{}
h.js = jsclient.NewJetstreamClient(colections, dids)
+4 -4
lexicon-build-config.json
···
[
{
-
"package": "bild",
-
"prefix": "sh.bild",
-
"outdir": "api/bild",
-
"import": "github.com/icyphox/bild/api/bild",
+
"package": "tangled",
+
"prefix": "sh.tangled",
+
"outdir": "api/tangled",
+
"import": "github.com/icyphox/bild/api/tangled",
"gen-server": true
}
]
+1 -1
lexicons/publicKey.json
···
{
"lexicon": 1,
-
"id": "sh.bild.publicKey",
+
"id": "sh.tangled.publicKey",
"needsCbor": true,
"needsType": true,
"defs": {