forked from
tangled.org/core
Monorepo for Tangled
1.1 kB
38 lines
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.repo.getRepoByRepoDid
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 RepoGetRepoByRepoDidNSID = "sh.tangled.repo.getRepoByRepoDid"
15)
16
17// RepoGetRepoByRepoDid_Output is the output of a sh.tangled.repo.getRepoByRepoDid call.
18type RepoGetRepoByRepoDid_Output struct {
19 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
20 Uri string `json:"uri" cborgen:"uri"`
21 // value: Embedded sh.tangled.repo record.
22 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
23}
24
25// RepoGetRepoByRepoDid calls the XRPC method "sh.tangled.repo.getRepoByRepoDid".
26//
27// repoDid: Repo DID whose sh.tangled.repo record to fetch.
28func RepoGetRepoByRepoDid(ctx context.Context, c util.LexClient, repoDid string) (*RepoGetRepoByRepoDid_Output, error) {
29 var out RepoGetRepoByRepoDid_Output
30
31 params := map[string]interface{}{}
32 params["repoDid"] = repoDid
33 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.getRepoByRepoDid", params, nil, &out); err != nil {
34 return nil, err
35 }
36
37 return &out, nil
38}