// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.moderation.deleteGate package placestream import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type ModerationDeleteGate_Input struct { LexiconTypeID string `json:"$type,omitempty"` // gateUri: The AT-URI of the gate record to delete. GateUri string `json:"gateUri"` // streamer: The DID of the streamer. Streamer string `json:"streamer"` } // RecordTypeID implements glex.Record. func (t *ModerationDeleteGate_Input) RecordTypeID() string { return "place.stream.moderation.deleteGate" } func (t *ModerationDeleteGate_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.moderation.deleteGate" return glex.MarshalCBOR(w, &cp) } func (t *ModerationDeleteGate_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } type ModerationDeleteGate_Output struct { LexiconTypeID string `json:"$type,omitempty"` } // RecordTypeID implements glex.Record. func (t *ModerationDeleteGate_Output) RecordTypeID() string { return "place.stream.moderation.deleteGate" } func (t *ModerationDeleteGate_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.moderation.deleteGate" return glex.MarshalCBOR(w, &cp) } func (t *ModerationDeleteGate_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // ModerationDeleteGate calls the XRPC method "place.stream.moderation.deleteGate". // // Delete a gate (unhide message) on behalf of a streamer. Requires 'hide' permission. Deletes a place.stream.chat.gate record from the streamer's repository. func ModerationDeleteGate(ctx context.Context, c glex.LexClient, input *ModerationDeleteGate_Input) (*ModerationDeleteGate_Output, error) { var out ModerationDeleteGate_Output if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.moderation.deleteGate", nil, input, &out); err != nil { return nil, err } return &out, nil }