···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package tangled
44+55+// schema: sh.tangled.repo.checkPushAllowed
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+const (
1414+ RepoCheckPushAllowedNSID = "sh.tangled.repo.checkPushAllowed"
1515+)
1616+1717+// RepoCheckPushAllowed_Output is the output of a sh.tangled.repo.checkPushAllowed call.
1818+type RepoCheckPushAllowed_Output struct {
1919+ // allowed: Whether the key's owner may push to the repo.
2020+ Allowed bool `json:"allowed" cborgen:"allowed"`
2121+ // did: DID the key resolved to, if a match was found.
2222+ Did *string `json:"did,omitempty" cborgen:"did,omitempty"`
2323+}
2424+2525+// RepoCheckPushAllowed calls the XRPC method "sh.tangled.repo.checkPushAllowed".
2626+//
2727+// key: Public key in OpenSSH authorized_keys format.
2828+// repo: A repo DID.
2929+func RepoCheckPushAllowed(ctx context.Context, c util.LexClient, key string, repo string) (*RepoCheckPushAllowed_Output, error) {
3030+ var out RepoCheckPushAllowed_Output
3131+3232+ params := map[string]interface{}{}
3333+ params["key"] = key
3434+ params["repo"] = repo
3535+ if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.checkPushAllowed", params, nil, &out); err != nil {
3636+ return nil, err
3737+ }
3838+3939+ return &out, nil
4040+}
+5-1
flake.nix
···507507 program =
508508 (pkgs.writeShellApplication {
509509 name = "lexgen";
510510+ runtimeInputs = [pkgs.stdenv.cc];
510511 text = ''
511512 if ! command -v lexgen > /dev/null; then
512513 echo "error: must be executed from devshell"
513514 exit 1
514515 fi
516516+517517+ # pin CC to a glibc gcc so a stray musl cc cant mess up CGO
518518+ export CC=${pkgs.stdenv.cc}/bin/cc
515519516520 rootDir=$(jj --ignore-working-copy root || git rev-parse --show-toplevel) || (echo "error: can't find repo root?"; exit 1)
517521 cd "$rootDir"
···528532 sed -i '/^func.*\(MarshalCBOR\|UnmarshalCBOR\)/,/^}/ s/^/\/\/ /' {} +
529533 for f in api/tangled/*_ext.go; do [ -e "''$f" ] && mv "''$f" "''$f.bak"; done
530534 ${pkgs.gotools}/bin/goimports -w api/tangled/*
531531- CGO_ENABLED=0 go run ./cmd/cborgen/
535535+ CGO_ENABLED=1 go run ./cmd/cborgen/
532536 for f in api/tangled/*_ext.go.bak; do [ -e "''$f" ] && mv "''$f" "''${f%.bak}"; done
533537534538 lexgen --build-file lexicon-build-config.json lexicons