···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.knot.health
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ KnotHealthNSID = "sh.tangled.knot.health"
15+)
16+17+// KnotHealth_Output is the output of a sh.tangled.knot.health call.
18+type KnotHealth_Output struct {
19+ // status: Health status of the knot
20+ Status string `json:"status" cborgen:"status"`
21+ // timestamp: Timestamp of the health check
22+ Timestamp *string `json:"timestamp,omitempty" cborgen:"timestamp,omitempty"`
23+ // version: Version of the knot server
24+ Version *string `json:"version,omitempty" cborgen:"version,omitempty"`
25+}
26+27+// KnotHealth calls the XRPC method "sh.tangled.knot.health".
28+func KnotHealth(ctx context.Context, c util.LexClient) (*KnotHealth_Output, error) {
29+ var out KnotHealth_Output
30+ if err := c.LexDo(ctx, util.Query, "", "sh.tangled.knot.health", nil, nil, &out); err != nil {
31+ return nil, err
32+ }
33+34+ return &out, nil
35+}
+34
api/tangled/repocreate.go
···0000000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.create
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoCreateNSID = "sh.tangled.repo.create"
15+)
16+17+// RepoCreate_Input is the input argument to a sh.tangled.repo.create call.
18+type RepoCreate_Input struct {
19+ // default_branch: Default branch name
20+ Default_branch *string `json:"default_branch,omitempty" cborgen:"default_branch,omitempty"`
21+ // did: DID of the user creating the repository
22+ Did string `json:"did" cborgen:"did"`
23+ // name: Name of the repository
24+ Name string `json:"name" cborgen:"name"`
25+}
26+27+// RepoCreate calls the XRPC method "sh.tangled.repo.create".
28+func RepoCreate(ctx context.Context, c util.LexClient, input *RepoCreate_Input) error {
29+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.create", nil, input, nil); err != nil {
30+ return err
31+ }
32+33+ return nil
34+}
+32
api/tangled/repodelete.go
···00000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.delete
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoDeleteNSID = "sh.tangled.repo.delete"
15+)
16+17+// RepoDelete_Input is the input argument to a sh.tangled.repo.delete call.
18+type RepoDelete_Input struct {
19+ // did: DID of the repository owner
20+ Did string `json:"did" cborgen:"did"`
21+ // name: Name of the repository to delete
22+ Name string `json:"name" cborgen:"name"`
23+}
24+25+// RepoDelete calls the XRPC method "sh.tangled.repo.delete".
26+func RepoDelete(ctx context.Context, c util.LexClient, input *RepoDelete_Input) error {
27+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.delete", nil, input, nil); err != nil {
28+ return err
29+ }
30+31+ return nil
32+}
+34
api/tangled/repofork.go
···0000000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.fork
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoForkNSID = "sh.tangled.repo.fork"
15+)
16+17+// RepoFork_Input is the input argument to a sh.tangled.repo.fork call.
18+type RepoFork_Input struct {
19+ // did: DID of the user creating the fork
20+ Did string `json:"did" cborgen:"did"`
21+ // name: Name for the forked repository (defaults to basename of source)
22+ Name *string `json:"name,omitempty" cborgen:"name,omitempty"`
23+ // source: Source repository URL to fork from
24+ Source string `json:"source" cborgen:"source"`
25+}
26+27+// RepoFork calls the XRPC method "sh.tangled.repo.fork".
28+func RepoFork(ctx context.Context, c util.LexClient, input *RepoFork_Input) error {
29+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.fork", nil, input, nil); err != nil {
30+ return err
31+ }
32+33+ return nil
34+}
+45
api/tangled/repoforkStatus.go
···000000000000000000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.forkStatus
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoForkStatusNSID = "sh.tangled.repo.forkStatus"
15+)
16+17+// RepoForkStatus_Input is the input argument to a sh.tangled.repo.forkStatus call.
18+type RepoForkStatus_Input struct {
19+ // branch: Branch to check status for
20+ Branch string `json:"branch" cborgen:"branch"`
21+ // did: DID of the fork owner
22+ Did string `json:"did" cborgen:"did"`
23+ // hiddenRef: Hidden ref to use for comparison
24+ HiddenRef string `json:"hiddenRef" cborgen:"hiddenRef"`
25+ // name: Name of the forked repository
26+ Name string `json:"name" cborgen:"name"`
27+ // source: Source repository URL
28+ Source string `json:"source" cborgen:"source"`
29+}
30+31+// RepoForkStatus_Output is the output of a sh.tangled.repo.forkStatus call.
32+type RepoForkStatus_Output struct {
33+ // status: Fork status: 0=UpToDate, 1=FastForwardable, 2=Conflict, 3=MissingBranch
34+ Status int64 `json:"status" cborgen:"status"`
35+}
36+37+// RepoForkStatus calls the XRPC method "sh.tangled.repo.forkStatus".
38+func RepoForkStatus(ctx context.Context, c util.LexClient, input *RepoForkStatus_Input) (*RepoForkStatus_Output, error) {
39+ var out RepoForkStatus_Output
40+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.forkStatus", nil, input, &out); err != nil {
41+ return nil, err
42+ }
43+44+ return &out, nil
45+}
+36
api/tangled/repoforkSync.go
···000000000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.forkSync
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoForkSyncNSID = "sh.tangled.repo.forkSync"
15+)
16+17+// RepoForkSync_Input is the input argument to a sh.tangled.repo.forkSync call.
18+type RepoForkSync_Input struct {
19+ // branch: Branch to sync
20+ Branch string `json:"branch" cborgen:"branch"`
21+ // did: DID of the fork owner
22+ Did string `json:"did" cborgen:"did"`
23+ // name: Name of the forked repository
24+ Name string `json:"name" cborgen:"name"`
25+ // source: AT-URI of the source repository
26+ Source string `json:"source" cborgen:"source"`
27+}
28+29+// RepoForkSync calls the XRPC method "sh.tangled.repo.forkSync".
30+func RepoForkSync(ctx context.Context, c util.LexClient, input *RepoForkSync_Input) error {
31+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.forkSync", nil, input, nil); err != nil {
32+ return err
33+ }
34+35+ return nil
36+}
+45
api/tangled/repohiddenRef.go
···000000000000000000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.hiddenRef
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoHiddenRefNSID = "sh.tangled.repo.hiddenRef"
15+)
16+17+// RepoHiddenRef_Input is the input argument to a sh.tangled.repo.hiddenRef call.
18+type RepoHiddenRef_Input struct {
19+ // forkRef: Fork reference name
20+ ForkRef string `json:"forkRef" cborgen:"forkRef"`
21+ // remoteRef: Remote reference name
22+ RemoteRef string `json:"remoteRef" cborgen:"remoteRef"`
23+ // repo: AT-URI of the repository
24+ Repo string `json:"repo" cborgen:"repo"`
25+}
26+27+// RepoHiddenRef_Output is the output of a sh.tangled.repo.hiddenRef call.
28+type RepoHiddenRef_Output struct {
29+ // error: Error message if creation failed
30+ Error *string `json:"error,omitempty" cborgen:"error,omitempty"`
31+ // ref: The created hidden ref name
32+ Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"`
33+ // success: Whether the hidden ref was created successfully
34+ Success bool `json:"success" cborgen:"success"`
35+}
36+37+// RepoHiddenRef calls the XRPC method "sh.tangled.repo.hiddenRef".
38+func RepoHiddenRef(ctx context.Context, c util.LexClient, input *RepoHiddenRef_Input) (*RepoHiddenRef_Output, error) {
39+ var out RepoHiddenRef_Output
40+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.hiddenRef", nil, input, &out); err != nil {
41+ return nil, err
42+ }
43+44+ return &out, nil
45+}
+44
api/tangled/repomerge.go
···00000000000000000000000000000000000000000000
···1+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2+3+package tangled
4+5+// schema: sh.tangled.repo.merge
6+7+import (
8+ "context"
9+10+ "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+const (
14+ RepoMergeNSID = "sh.tangled.repo.merge"
15+)
16+17+// RepoMerge_Input is the input argument to a sh.tangled.repo.merge call.
18+type RepoMerge_Input struct {
19+ // authorEmail: Author email for the merge commit
20+ AuthorEmail *string `json:"authorEmail,omitempty" cborgen:"authorEmail,omitempty"`
21+ // authorName: Author name for the merge commit
22+ AuthorName *string `json:"authorName,omitempty" cborgen:"authorName,omitempty"`
23+ // branch: Target branch to merge into
24+ Branch string `json:"branch" cborgen:"branch"`
25+ // commitBody: Additional commit message body
26+ CommitBody *string `json:"commitBody,omitempty" cborgen:"commitBody,omitempty"`
27+ // commitMessage: Merge commit message
28+ CommitMessage *string `json:"commitMessage,omitempty" cborgen:"commitMessage,omitempty"`
29+ // did: DID of the repository owner
30+ Did string `json:"did" cborgen:"did"`
31+ // name: Name of the repository
32+ Name string `json:"name" cborgen:"name"`
33+ // patch: Patch content to merge
34+ Patch string `json:"patch" cborgen:"patch"`
35+}
36+37+// RepoMerge calls the XRPC method "sh.tangled.repo.merge".
38+func RepoMerge(ctx context.Context, c util.LexClient, input *RepoMerge_Input) error {
39+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.merge", nil, input, nil); err != nil {
40+ return err
41+ }
42+43+ return nil
44+}