Live video on the AT Protocol
at eli/deterministic-muxing 46 lines 1.9 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package streamplace 4 5// schema: place.stream.server.createWebhook 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// ServerCreateWebhook_Input is the input argument to a place.stream.server.createWebhook call. 14type ServerCreateWebhook_Input struct { 15 // active: Whether this webhook should be active upon creation. 16 Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 17 // description: A description of what this webhook is used for. 18 Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 19 // events: The types of events this webhook should receive. 20 Events []string `json:"events" cborgen:"events"` 21 // name: A user-friendly name for this webhook. 22 Name *string `json:"name,omitempty" cborgen:"name,omitempty"` 23 // prefix: Text to prepend to webhook messages. 24 Prefix *string `json:"prefix,omitempty" cborgen:"prefix,omitempty"` 25 // rewrite: Text replacement rules for webhook messages. 26 Rewrite []*ServerDefs_RewriteRule `json:"rewrite,omitempty" cborgen:"rewrite,omitempty"` 27 // suffix: Text to append to webhook messages. 28 Suffix *string `json:"suffix,omitempty" cborgen:"suffix,omitempty"` 29 // url: The webhook URL where events will be sent. 30 Url string `json:"url" cborgen:"url"` 31} 32 33// ServerCreateWebhook_Output is the output of a place.stream.server.createWebhook call. 34type ServerCreateWebhook_Output struct { 35 Webhook *ServerDefs_Webhook `json:"webhook" cborgen:"webhook"` 36} 37 38// ServerCreateWebhook calls the XRPC method "place.stream.server.createWebhook". 39func ServerCreateWebhook(ctx context.Context, c util.LexClient, input *ServerCreateWebhook_Input) (*ServerCreateWebhook_Output, error) { 40 var out ServerCreateWebhook_Output 41 if err := c.LexDo(ctx, util.Procedure, "application/json", "place.stream.server.createWebhook", nil, input, &out); err != nil { 42 return nil, err 43 } 44 45 return &out, nil 46}