// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package tangled

// schema: sh.tangled.repo.getRepo

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	RepoGetRepoNSID = "sh.tangled.repo.getRepo"
)

// RepoGetRepo_Output is the output of a sh.tangled.repo.getRepo call.
type RepoGetRepo_Output struct {
	Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
	Uri string  `json:"uri" cborgen:"uri"`
	// value: Embedded sh.tangled.repo record.
	Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
}

// RepoGetRepo calls the XRPC method "sh.tangled.repo.getRepo".
//
// repo: AT-URI of the sh.tangled.repo record to fetch.
func RepoGetRepo(ctx context.Context, c util.LexClient, repo string) (*RepoGetRepo_Output, error) {
	var out RepoGetRepo_Output

	params := map[string]interface{}{}
	params["repo"] = repo
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.getRepo", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
