Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.3 kB · 71 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.vod.createDraft
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type VodCreateDraft_Input struct { LexiconTypeID string `json:"$type,omitempty"`}
// RecordTypeID implements glex.Record.func (t *VodCreateDraft_Input) RecordTypeID() string { return "place.stream.vod.createDraft" }
func (t *VodCreateDraft_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.createDraft" return glex.MarshalCBOR(w, &cp)}
func (t *VodCreateDraft_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type VodCreateDraft_Output struct { LexiconTypeID string `json:"$type,omitempty"` // uri: The ats:// URI of the newly created draft record. Uri string `json:"uri"`}
// RecordTypeID implements glex.Record.func (t *VodCreateDraft_Output) RecordTypeID() string { return "place.stream.vod.createDraft" }
func (t *VodCreateDraft_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.createDraft" return glex.MarshalCBOR(w, &cp)}
func (t *VodCreateDraft_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// VodCreateDraft calls the XRPC method "place.stream.vod.createDraft".//// Create an empty draft VOD in the 'processing' state. The draft is the durable anchor for an upload: the client creates it first, then passes its URI to place.stream.media.createUpload so the upload's processing fills this draft. Lets the user start editing metadata while the upload runs, and supports re-upload (a failed upload leaves the draft intact; a new createUpload with the same draftUri re-points it).func VodCreateDraft(ctx context.Context, c glex.LexClient, input *VodCreateDraft_Input) (*VodCreateDraft_Output, error) { var out VodCreateDraft_Output
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.vod.createDraft", nil, input, &out); err != nil { return nil, err } return &out, nil}