forked from
tangled.org/core
Monorepo for Tangled — https://tangled.org
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.repo.listRepos
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 RepoListReposNSID = "sh.tangled.repo.listRepos"
15)
16
17// RepoListRepos_Output is the output of a sh.tangled.repo.listRepos call.
18type RepoListRepos_Output struct {
19 Users []*RepoListRepos_User `json:"users" cborgen:"users"`
20}
21
22// RepoListRepos_RepoEntry is a "repoEntry" in the sh.tangled.repo.listRepos schema.
23type RepoListRepos_RepoEntry struct {
24 // defaultBranch: Default branch of the repository
25 DefaultBranch *string `json:"defaultBranch,omitempty" cborgen:"defaultBranch,omitempty"`
26 // did: DID of the repository owner
27 Did string `json:"did" cborgen:"did"`
28 // fullPath: Full path to the repository
29 FullPath string `json:"fullPath" cborgen:"fullPath"`
30 // name: Repository name
31 Name string `json:"name" cborgen:"name"`
32}
33
34// RepoListRepos_User is a "user" in the sh.tangled.repo.listRepos schema.
35type RepoListRepos_User struct {
36 // did: DID of the user
37 Did string `json:"did" cborgen:"did"`
38 Repos []*RepoListRepos_RepoEntry `json:"repos" cborgen:"repos"`
39}
40
41// RepoListRepos calls the XRPC method "sh.tangled.repo.listRepos".
42func RepoListRepos(ctx context.Context, c util.LexClient) (*RepoListRepos_Output, error) {
43 var out RepoListRepos_Output
44
45 params := map[string]interface{}{}
46 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.listRepos", params, nil, &out); err != nil {
47 return nil, err
48 }
49
50 return &out, nil
51}