// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.repo.getRepoByRepoDid
import (
"context"
"github.com/bluesky-social/indigo/lex/util"
)
const (
RepoGetRepoByRepoDidNSID = "org.tangled.repo.getRepoByRepoDid"
)
// RepoGetRepoByRepoDid_Output is the output of a org.tangled.repo.getRepoByRepoDid call.
type RepoGetRepoByRepoDid_Output struct {
Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
// knot: Host of the knot named by the #tangled_knot service in the repo's DID document. Absent when it names none.
Knot *string `json:"knot,omitempty" cborgen:"knot,omitempty"`
Uri string `json:"uri" cborgen:"uri"`
// value: Embedded sh.tangled.repo record.
Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
}
// RepoGetRepoByRepoDid calls the XRPC method "org.tangled.repo.getRepoByRepoDid".
//
// repoDid: Repo DID whose sh.tangled.repo record to fetch.
func RepoGetRepoByRepoDid(ctx context.Context, c util.LexClient, repoDid string) (*RepoGetRepoByRepoDid_Output, error) {
var out RepoGetRepoByRepoDid_Output
params := map[string]interface{}{}
params["repoDid"] = repoDid
if err := c.LexDo(ctx, util.Query, "", "org.tangled.repo.getRepoByRepoDid", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}