Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.1 kB · 71 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.vod.deleteDraft
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type VodDeleteDraft_Input struct { LexiconTypeID string `json:"$type,omitempty"` // uri: The ats:// URI of the draft to discard. Uri string `json:"uri"`}
// RecordTypeID implements glex.Record.func (t *VodDeleteDraft_Input) RecordTypeID() string { return "place.stream.vod.deleteDraft" }
func (t *VodDeleteDraft_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.vod.deleteDraft" return glex.MarshalCBOR(w, &cp)}
func (t *VodDeleteDraft_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type VodDeleteDraft_Output struct { LexiconTypeID string `json:"$type,omitempty"`}
// RecordTypeID implements glex.Record.func (t *VodDeleteDraft_Output) RecordTypeID() string { return "place.stream.vod.deleteDraft" }
func (t *VodDeleteDraft_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.vod.deleteDraft" return glex.MarshalCBOR(w, &cp)}
func (t *VodDeleteDraft_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// VodDeleteDraft calls the XRPC method "place.stream.vod.deleteDraft".//// Discard a draft VOD. The processed content blob is not deleted (it may be referenced elsewhere). Only the draft record is removed.func VodDeleteDraft(ctx context.Context, c glex.LexClient, input *VodDeleteDraft_Input) (*VodDeleteDraft_Output, error) { var out VodDeleteDraft_Output
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.vod.deleteDraft", nil, input, &out); err != nil { return nil, err } return &out, nil}