Monorepo for Tangled
tangled.org
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.pipeline.listPipelines
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 PipelineListPipelinesNSID = "sh.tangled.pipeline.listPipelines"
15)
16
17// PipelineListPipelines_ListItem is a "listItem" in the sh.tangled.pipeline.listPipelines schema.
18type PipelineListPipelines_ListItem struct {
19 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
20 Uri string `json:"uri" cborgen:"uri"`
21 // value: Embedded sh.tangled.pipeline record
22 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
23}
24
25// PipelineListPipelines_Output is the output of a sh.tangled.pipeline.listPipelines call.
26type PipelineListPipelines_Output struct {
27 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
28 Items []*PipelineListPipelines_ListItem `json:"items" cborgen:"items"`
29}
30
31// PipelineListPipelines calls the XRPC method "sh.tangled.pipeline.listPipelines".
32//
33// cursor: Pagination cursor
34// order: Sort direction by createdAt.
35// subject: Repo or spindle identifier whose pipeline records to list.
36func PipelineListPipelines(ctx context.Context, c util.LexClient, cursor string, limit int64, order string, subject string) (*PipelineListPipelines_Output, error) {
37 var out PipelineListPipelines_Output
38
39 params := map[string]interface{}{}
40 if cursor != "" {
41 params["cursor"] = cursor
42 }
43 if limit != 0 {
44 params["limit"] = limit
45 }
46 if order != "" {
47 params["order"] = order
48 }
49 params["subject"] = subject
50 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.pipeline.listPipelines", params, nil, &out); err != nil {
51 return nil, err
52 }
53
54 return &out, nil
55}