Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.7 kB · 55 lines
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.broadcast.getBroadcaster
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type BroadcastGetBroadcaster_Output struct { LexiconTypeID string `json:"$type,omitempty"` // admins: Array of DIDs authorized as admins Admins []string `json:"admins,omitempty"` // broadcaster: DID of the Streamplace broadcaster to which this server belongs Broadcaster string `json:"broadcaster"` // server: DID of this particular Streamplace server Server *string `json:"server,omitempty"`}
// RecordTypeID implements glex.Record.func (t *BroadcastGetBroadcaster_Output) RecordTypeID() string { return "place.stream.broadcast.getBroadcaster"}
func (t *BroadcastGetBroadcaster_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.broadcast.getBroadcaster" return glex.MarshalCBOR(w, &cp)}
func (t *BroadcastGetBroadcaster_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// BroadcastGetBroadcaster calls the XRPC method "place.stream.broadcast.getBroadcaster".//// Get information about a Streamplace broadcaster.func BroadcastGetBroadcaster(ctx context.Context, c glex.LexClient) (*BroadcastGetBroadcaster_Output, error) { var out BroadcastGetBroadcaster_Output
if err := c.LexDo(ctx, glex.Query, "", "place.stream.broadcast.getBroadcaster", nil, nil, &out); err != nil { return nil, err } return &out, nil}