1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package ozone
4
5// schema: tools.ozone.set.querySets
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/xrpc"
11)
12
13// SetQuerySets_Output is the output of a tools.ozone.set.querySets call.
14type SetQuerySets_Output struct {
15 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
16 Sets []*SetDefs_SetView `json:"sets" cborgen:"sets"`
17}
18
19// SetQuerySets calls the XRPC method "tools.ozone.set.querySets".
20//
21// sortDirection: Defaults to ascending order of name field.
22func SetQuerySets(ctx context.Context, c *xrpc.Client, cursor string, limit int64, namePrefix string, sortBy string, sortDirection string) (*SetQuerySets_Output, error) {
23 var out SetQuerySets_Output
24
25 params := map[string]interface{}{
26 "cursor": cursor,
27 "limit": limit,
28 "namePrefix": namePrefix,
29 "sortBy": sortBy,
30 "sortDirection": sortDirection,
31 }
32 if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.set.querySets", params, nil, &out); err != nil {
33 return nil, err
34 }
35
36 return &out, nil
37}