Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.1 kB · 39 lines
Go
12345678910111213141516171819202122232425262728293031323334353637383940// Code generated by glex; DO NOT EDIT.
// Lexicon schema: app.bsky.embed.defs
package appbsky
import ( "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
// EmbedDefs_AspectRatio is a "aspectRatio" in the app.bsky.embed.defs schema.//// width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.type EmbedDefs_AspectRatio struct { LexiconTypeID string `json:"$type,omitempty"` Height int64 `json:"height"` Width int64 `json:"width"`}
// RecordTypeID implements glex.Record.func (t *EmbedDefs_AspectRatio) RecordTypeID() string { return "app.bsky.embed.defs#aspectRatio" }
func (t *EmbedDefs_AspectRatio) 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 = "app.bsky.embed.defs#aspectRatio" return glex.MarshalCBOR(w, &cp)}
func (t *EmbedDefs_AspectRatio) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}