Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
Go
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package tangled
// schema: sh.tangled.query.enrichResponse
import ( "context"
"github.com/bluesky-social/indigo/lex/util")
const ( QueryEnrichResponseNSID = "sh.tangled.query.enrichResponse")
// QueryEnrichResponse_Input is the input argument to a sh.tangled.query.enrichResponse call.type QueryEnrichResponse_Input struct { // enrich: Payloads to compute for each found reference. Enrich []*QueryEnrichResponse_LinkDescriptor `json:"enrich" cborgen:"enrich"` // params: Parameters for the inner query, exactly as it declares them. Params *util.LexiconTypeDecoder `json:"params,omitempty" cborgen:"params,omitempty"` // viewer: DID whose own relation to each reference is looked up for viewer payloads. Required when any descriptor requests one. Viewer *string `json:"viewer,omitempty" cborgen:"viewer,omitempty"` // xrpc: NSID of the inner query to run, e.g. sh.tangled.repo.listRepos. Xrpc string `json:"xrpc" cborgen:"xrpc"`}
// QueryEnrichResponse_LinkDescriptor is a "linkDescriptor" in the sh.tangled.query.enrichResponse schema.//// One sidecar payload, computed from the records at a link source whose reference equals the found reference.type QueryEnrichResponse_LinkDescriptor struct { // source: Collection whose records are linked, a colon, then an index-backed path (subject or .repo). Source string `json:"source" cborgen:"source"` // targets: Record paths into the inner response selecting references for this payload. All references are considered when omitted. Targets []string `json:"targets,omitempty" cborgen:"targets,omitempty"` // type: NSID of the payload type to produce, which also defines the payload's shape. Results land at data[ref][source][type]. Type string `json:"type" cborgen:"type"`}
// QueryEnrichResponse_Output is the output of a sh.tangled.query.enrichResponse call.type QueryEnrichResponse_Output struct { // data: Reference (did or at-uri) -> link source -> payload type nsid -> payload. References no descriptor applies to are absent. Data *util.LexiconTypeDecoder `json:"data" cborgen:"data"` // output: The inner query's response, unmodified. Output *util.LexiconTypeDecoder `json:"output" cborgen:"output"`}
// QueryEnrichResponse calls the XRPC method "sh.tangled.query.enrichResponse".func QueryEnrichResponse(ctx context.Context, c util.LexClient, input *QueryEnrichResponse_Input) (*QueryEnrichResponse_Output, error) { var out QueryEnrichResponse_Output if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.query.enrichResponse", nil, input, &out); err != nil { return nil, err }
return &out, nil}