fork of indigo with slightly nicer lexgen
at main 1.3 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.updateRule 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// SafelinkUpdateRule_Input is the input argument to a tools.ozone.safelink.updateRule call. 14type SafelinkUpdateRule_Input struct { 15 Action *string `json:"action" cborgen:"action"` 16 // comment: Optional comment about the update 17 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 18 // createdBy: Optional DID to credit as the creator. Only respected for admin_token authentication. 19 CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"` 20 Pattern *string `json:"pattern" cborgen:"pattern"` 21 Reason *string `json:"reason" cborgen:"reason"` 22 // url: The URL or domain to update the rule for 23 Url string `json:"url" cborgen:"url"` 24} 25 26// SafelinkUpdateRule calls the XRPC method "tools.ozone.safelink.updateRule". 27func SafelinkUpdateRule(ctx context.Context, c util.LexClient, input *SafelinkUpdateRule_Input) (*SafelinkDefs_Event, error) { 28 var out SafelinkDefs_Event 29 if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.updateRule", nil, input, &out); err != nil { 30 return nil, err 31 } 32 33 return &out, nil 34}