+39
api/tangled/gitkeepCommit.go
+39
api/tangled/gitkeepCommit.go
···
1
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
+
3
+
package tangled
4
+
5
+
// schema: sh.tangled.git.keepCommit
6
+
7
+
import (
8
+
"context"
9
+
10
+
"github.com/bluesky-social/indigo/lex/util"
11
+
)
12
+
13
+
const (
14
+
GitKeepCommitNSID = "sh.tangled.git.keepCommit"
15
+
)
16
+
17
+
// GitKeepCommit_Input is the input argument to a sh.tangled.git.keepCommit call.
18
+
type GitKeepCommit_Input struct {
19
+
// ref: ref to keep
20
+
Ref string `json:"ref" cborgen:"ref"`
21
+
// repo: AT-URI of the repository
22
+
Repo string `json:"repo" cborgen:"repo"`
23
+
}
24
+
25
+
// GitKeepCommit_Output is the output of a sh.tangled.git.keepCommit call.
26
+
type GitKeepCommit_Output struct {
27
+
// commitId: Keeped commit hash
28
+
CommitId string `json:"commitId" cborgen:"commitId"`
29
+
}
30
+
31
+
// GitKeepCommit calls the XRPC method "sh.tangled.git.keepCommit".
32
+
func GitKeepCommit(ctx context.Context, c util.LexClient, input *GitKeepCommit_Input) (*GitKeepCommit_Output, error) {
33
+
var out GitKeepCommit_Output
34
+
if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.keepCommit", nil, input, &out); err != nil {
35
+
return nil, err
36
+
}
37
+
38
+
return &out, nil
39
+
}
+46
lexicons/git/keepCommit.json
+46
lexicons/git/keepCommit.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "sh.tangled.git.keepCommit",
4
+
"defs": {
5
+
"main": {
6
+
"type": "procedure",
7
+
"input": {
8
+
"encoding": "application/json",
9
+
"schema": {
10
+
"type": "object",
11
+
"required": ["repo", "ref"],
12
+
"properties": {
13
+
"repo": {
14
+
"type": "string",
15
+
"format": "at-uri",
16
+
"description": "AT-URI of the repository"
17
+
},
18
+
"ref": {
19
+
"type": "string",
20
+
"description": "ref to keep"
21
+
}
22
+
}
23
+
}
24
+
},
25
+
"output": {
26
+
"encoding": "application/json",
27
+
"schema": {
28
+
"type": "object",
29
+
"required": ["commitId"],
30
+
"properties": {
31
+
"commitId": {
32
+
"type": "string",
33
+
"description": "Keeped commit hash"
34
+
}
35
+
}
36
+
}
37
+
},
38
+
"errors": [
39
+
{
40
+
"name": "InternalServerError",
41
+
"description": "Failed to keep commit"
42
+
}
43
+
]
44
+
}
45
+
}
46
+
}