Monorepo for Tangled
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.repo.create
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 RepoCreateNSID = "sh.tangled.repo.create"
15)
16
17// RepoCreate_Input is the input argument to a sh.tangled.repo.create call.
18type RepoCreate_Input struct {
19 // defaultBranch: Default branch to push to
20 DefaultBranch *string `json:"defaultBranch,omitempty" cborgen:"defaultBranch,omitempty"`
21 // name: Name of the repository
22 Name string `json:"name" cborgen:"name"`
23 // repoDid: Optional user-provided did:web to use as the repo identity instead of minting a did:plc.
24 RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"`
25 // rkey: Rkey of the repository record
26 Rkey string `json:"rkey" cborgen:"rkey"`
27 // source: A source URL to clone from, populate this when forking or importing a repository.
28 Source *string `json:"source,omitempty" cborgen:"source,omitempty"`
29}
30
31// RepoCreate_Output is the output of a sh.tangled.repo.create call.
32type RepoCreate_Output struct {
33 RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"`
34}
35
36// RepoCreate calls the XRPC method "sh.tangled.repo.create".
37func RepoCreate(ctx context.Context, c util.LexClient, input *RepoCreate_Input) (*RepoCreate_Output, error) {
38 var out RepoCreate_Output
39 if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.create", nil, input, &out); err != nil {
40 return nil, err
41 }
42
43 return &out, nil
44}