Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.5 kB · 52 lines
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.multistream.putTarget
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type MultistreamPutTarget_Input struct { LexiconTypeID string `json:"$type,omitempty"` MultistreamTarget MultistreamTarget `json:"multistreamTarget"` // rkey: The Record Key. Rkey *string `json:"rkey,omitempty"`}
// RecordTypeID implements glex.Record.func (t *MultistreamPutTarget_Input) RecordTypeID() string { return "place.stream.multistream.putTarget"}
func (t *MultistreamPutTarget_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.multistream.putTarget" return glex.MarshalCBOR(w, &cp)}
func (t *MultistreamPutTarget_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// MultistreamPutTarget calls the XRPC method "place.stream.multistream.putTarget".//// Update an existing target for rebroadcasting a Streamplace stream.func MultistreamPutTarget(ctx context.Context, c glex.LexClient, input *MultistreamPutTarget_Input) (*MultistreamDefs_TargetView, error) { var out MultistreamDefs_TargetView
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.multistream.putTarget", nil, input, &out); err != nil { return nil, err } return &out, nil}