Monorepo for Tangled
tangled.org
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.repo.getRepos
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 RepoGetReposNSID = "sh.tangled.repo.getRepos"
15)
16
17// RepoGetRepos_Output is the output of a sh.tangled.repo.getRepos call.
18type RepoGetRepos_Output struct {
19 Items []*RepoGetRepos_RecordView `json:"items" cborgen:"items"`
20}
21
22// RepoGetRepos_RecordView is a "recordView" in the sh.tangled.repo.getRepos schema.
23type RepoGetRepos_RecordView struct {
24 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
25 Uri string `json:"uri" cborgen:"uri"`
26 // value: Embedded sh.tangled.repo record.
27 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
28}
29
30// RepoGetRepos calls the XRPC method "sh.tangled.repo.getRepos".
31//
32// repos: AT-URIs of the sh.tangled.repo records to fetch. At most 50 per request.
33func RepoGetRepos(ctx context.Context, c util.LexClient, repos []string) (*RepoGetRepos_Output, error) {
34 var out RepoGetRepos_Output
35
36 params := map[string]interface{}{}
37 params["repos"] = repos
38 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.getRepos", params, nil, &out); err != nil {
39 return nil, err
40 }
41
42 return &out, nil
43}