// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.server.getWebhook package placestream import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type ServerGetWebhook_Output struct { LexiconTypeID string `json:"$type,omitempty"` Webhook ServerDefs_Webhook `json:"webhook"` } // RecordTypeID implements glex.Record. func (t *ServerGetWebhook_Output) RecordTypeID() string { return "place.stream.server.getWebhook" } func (t *ServerGetWebhook_Output) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "place.stream.server.getWebhook" return glex.MarshalCBOR(w, &cp) } func (t *ServerGetWebhook_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // ServerGetWebhook calls the XRPC method "place.stream.server.getWebhook". // // Get details for a specific webhook. // // id: The ID of the webhook to retrieve. func ServerGetWebhook(ctx context.Context, c glex.LexClient, id string) (*ServerGetWebhook_Output, error) { var out ServerGetWebhook_Output params := map[string]interface{}{} params["id"] = id if err := c.LexDo(ctx, glex.Query, "", "place.stream.server.getWebhook", params, nil, &out); err != nil { return nil, err } return &out, nil }