fork of indigo with slightly nicer lexgen
at main 2.0 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package ozone 4 5// schema: tools.ozone.safelink.queryRules 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// SafelinkQueryRules_Input is the input argument to a tools.ozone.safelink.queryRules call. 14type SafelinkQueryRules_Input struct { 15 // actions: Filter by action types 16 Actions []string `json:"actions,omitempty" cborgen:"actions,omitempty"` 17 // createdBy: Filter by rule creator 18 CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"` 19 // cursor: Cursor for pagination 20 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 21 // limit: Maximum number of results to return 22 Limit *int64 `json:"limit,omitempty" cborgen:"limit,omitempty"` 23 // patternType: Filter by pattern type 24 PatternType *string `json:"patternType,omitempty" cborgen:"patternType,omitempty"` 25 // reason: Filter by reason type 26 Reason *string `json:"reason,omitempty" cborgen:"reason,omitempty"` 27 // sortDirection: Sort direction 28 SortDirection *string `json:"sortDirection,omitempty" cborgen:"sortDirection,omitempty"` 29 // urls: Filter by specific URLs or domains 30 Urls []string `json:"urls,omitempty" cborgen:"urls,omitempty"` 31} 32 33// SafelinkQueryRules_Output is the output of a tools.ozone.safelink.queryRules call. 34type SafelinkQueryRules_Output struct { 35 // cursor: Next cursor for pagination. Only present if there are more results. 36 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 37 Rules []*SafelinkDefs_UrlRule `json:"rules" cborgen:"rules"` 38} 39 40// SafelinkQueryRules calls the XRPC method "tools.ozone.safelink.queryRules". 41func SafelinkQueryRules(ctx context.Context, c util.LexClient, input *SafelinkQueryRules_Input) (*SafelinkQueryRules_Output, error) { 42 var out SafelinkQueryRules_Output 43 if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.queryRules", nil, input, &out); err != nil { 44 return nil, err 45 } 46 47 return &out, nil 48}