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

package tangled

// schema: sh.tangled.repo.listSecrets

import (
	"context"

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

const (
	RepoListSecretsNSID = "sh.tangled.repo.listSecrets"
)

// RepoListSecrets_Output is the output of a sh.tangled.repo.listSecrets call.
type RepoListSecrets_Output struct {
	Secrets []*RepoListSecrets_Secret `json:"secrets" cborgen:"secrets"`
}

// RepoListSecrets_Secret is a "secret" in the sh.tangled.repo.listSecrets schema.
type RepoListSecrets_Secret struct {
	CreatedAt string `json:"createdAt" cborgen:"createdAt"`
	CreatedBy string `json:"createdBy" cborgen:"createdBy"`
	Key       string `json:"key" cborgen:"key"`
	Repo      string `json:"repo" cborgen:"repo"`
}

// RepoListSecrets calls the XRPC method "sh.tangled.repo.listSecrets".
func RepoListSecrets(ctx context.Context, c util.LexClient, repo string) (*RepoListSecrets_Output, error) {
	var out RepoListSecrets_Output

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

	return &out, nil
}
