this repo has no description
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package ozone
4
5// schema: tools.ozone.setting.listOptions
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13// SettingListOptions_Output is the output of a tools.ozone.setting.listOptions call.
14type SettingListOptions_Output struct {
15 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
16 Options []*SettingDefs_Option `json:"options" cborgen:"options"`
17}
18
19// SettingListOptions calls the XRPC method "tools.ozone.setting.listOptions".
20//
21// keys: Filter for only the specified keys. Ignored if prefix is provided
22// prefix: Filter keys by prefix
23func SettingListOptions(ctx context.Context, c util.LexClient, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) {
24 var out SettingListOptions_Output
25
26 params := map[string]interface{}{}
27 if cursor != "" {
28 params["cursor"] = cursor
29 }
30 if len(keys) != 0 {
31 params["keys"] = keys
32 }
33 if limit != 0 {
34 params["limit"] = limit
35 }
36 if prefix != "" {
37 params["prefix"] = prefix
38 }
39 if scope != "" {
40 params["scope"] = scope
41 }
42 if err := c.LexDo(ctx, util.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil {
43 return nil, err
44 }
45
46 return &out, nil
47}