Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.1 kB · 75 lines
Go
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.server.deleteWebhook
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type ServerDeleteWebhook_Input struct { LexiconTypeID string `json:"$type,omitempty"` // id: The ID of the webhook to delete. Id string `json:"id"`}
// RecordTypeID implements glex.Record.func (t *ServerDeleteWebhook_Input) RecordTypeID() string { return "place.stream.server.deleteWebhook" }
func (t *ServerDeleteWebhook_Input) 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.deleteWebhook" return glex.MarshalCBOR(w, &cp)}
func (t *ServerDeleteWebhook_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type ServerDeleteWebhook_Output struct { LexiconTypeID string `json:"$type,omitempty"` // success: Whether the webhook was successfully deleted. Success bool `json:"success"`}
// RecordTypeID implements glex.Record.func (t *ServerDeleteWebhook_Output) RecordTypeID() string { return "place.stream.server.deleteWebhook"}
func (t *ServerDeleteWebhook_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.deleteWebhook" return glex.MarshalCBOR(w, &cp)}
func (t *ServerDeleteWebhook_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ServerDeleteWebhook calls the XRPC method "place.stream.server.deleteWebhook".//// Delete an existing webhook.func ServerDeleteWebhook(ctx context.Context, c glex.LexClient, input *ServerDeleteWebhook_Input) (*ServerDeleteWebhook_Output, error) { var out ServerDeleteWebhook_Output
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.server.deleteWebhook", nil, input, &out); err != nil { return nil, err } return &out, nil}