// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.game.getGame package placestream import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type GameGetGame_Output struct { LexiconTypeID string `json:"$type,omitempty"` CoverUrl *string `json:"coverUrl,omitempty"` Genres []string `json:"genres,omitempty"` Name string `json:"name"` Summary *string `json:"summary,omitempty"` Uri string `json:"uri"` } // RecordTypeID implements glex.Record. func (t *GameGetGame_Output) RecordTypeID() string { return "place.stream.game.getGame" } func (t *GameGetGame_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.game.getGame" return glex.MarshalCBOR(w, &cp) } func (t *GameGetGame_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GameGetGame calls the XRPC method "place.stream.game.getGame". func GameGetGame(ctx context.Context, c glex.LexClient, uri string) (*GameGetGame_Output, error) { var out GameGetGame_Output params := map[string]interface{}{} params["uri"] = uri if err := c.LexDo(ctx, glex.Query, "", "place.stream.game.getGame", params, nil, &out); err != nil { return nil, err } return &out, nil }