Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.6 kB · 82 lines
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.branding.updateBlob
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type BrandingUpdateBlob_Input struct { LexiconTypeID string `json:"$type,omitempty"` // broadcaster: DID of the broadcaster. If not provided, uses the server's default broadcaster. Broadcaster *string `json:"broadcaster,omitempty"` // data: Base64-encoded blob data Data string `json:"data"` // height: Image height in pixels (optional, for images only) Height *int64 `json:"height,omitempty"` // key: Branding asset key (mainLogo, favicon, siteTitle, etc.) Key string `json:"key"` // mimeType: MIME type of the blob (e.g., image/png, text/plain) MimeType string `json:"mimeType"` // width: Image width in pixels (optional, for images only) Width *int64 `json:"width,omitempty"`}
// RecordTypeID implements glex.Record.func (t *BrandingUpdateBlob_Input) RecordTypeID() string { return "place.stream.branding.updateBlob" }
func (t *BrandingUpdateBlob_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.branding.updateBlob" return glex.MarshalCBOR(w, &cp)}
func (t *BrandingUpdateBlob_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type BrandingUpdateBlob_Output struct { LexiconTypeID string `json:"$type,omitempty"` Success bool `json:"success"`}
// RecordTypeID implements glex.Record.func (t *BrandingUpdateBlob_Output) RecordTypeID() string { return "place.stream.branding.updateBlob" }
func (t *BrandingUpdateBlob_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.branding.updateBlob" return glex.MarshalCBOR(w, &cp)}
func (t *BrandingUpdateBlob_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// BrandingUpdateBlob calls the XRPC method "place.stream.branding.updateBlob".//// Update or create a branding asset blob. Requires admin authorization.func BrandingUpdateBlob(ctx context.Context, c glex.LexClient, input *BrandingUpdateBlob_Input) (*BrandingUpdateBlob_Output, error) { var out BrandingUpdateBlob_Output
if err := c.LexDo(ctx, glex.Procedure, "application/json", "place.stream.branding.updateBlob", nil, input, &out); err != nil { return nil, err } return &out, nil}