// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.moderation.createVodGate package placestream import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type ModerationCreateVodGate_Input struct { LexiconTypeID string `json:"$type,omitempty"` // commentUri: The AT-URI of the VOD comment to hide. CommentUri string `json:"commentUri"` // streamer: The DID of the streamer. Streamer string `json:"streamer"` } // RecordTypeID implements glex.Record. func (t *ModerationCreateVodGate_Input) RecordTypeID() string { return "place.stream.moderation.createVodGate" } func (t *ModerationCreateVodGate_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.createVodGate" return glex.MarshalCBOR(w, &cp) } func (t *ModerationCreateVodGate_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } type ModerationCreateVodGate_Output struct { LexiconTypeID string `json:"$type,omitempty"` // cid: The CID of the created gate record. Cid string `json:"cid"` // uri: The AT-URI of the created gate record. Uri string `json:"uri"` } // RecordTypeID implements glex.Record. func (t *ModerationCreateVodGate_Output) RecordTypeID() string { return "place.stream.moderation.createVodGate" } func (t *ModerationCreateVodGate_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.createVodGate" return glex.MarshalCBOR(w, &cp) } func (t *ModerationCreateVodGate_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // ModerationCreateVodGate calls the XRPC method "place.stream.moderation.createVodGate". // // Create a gate (hide VOD comment) on behalf of a streamer. Requires 'vod.comment.hide' permission. Creates a place.stream.vod.gate record in the streamer's repository. func ModerationCreateVodGate(ctx context.Context, c glex.LexClient, input *ModerationCreateVodGate_Input) (*ModerationCreateVodGate_Output, error) { var out ModerationCreateVodGate_Output if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.moderation.createVodGate", nil, input, &out); err != nil { return nil, err } return &out, nil }