Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.0 kB · 67 lines
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.multistream.defs
package placestream
import ( "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
// MultistreamDefs_Event is a "event" in the place.stream.multistream.defs schema.type MultistreamDefs_Event struct { LexiconTypeID string `json:"$type,omitempty"` CreatedAt string `json:"createdAt"` Message string `json:"message"` Status string `json:"status"`}
// RecordTypeID implements glex.Record.func (t *MultistreamDefs_Event) RecordTypeID() string { return "place.stream.multistream.defs#event" }
func (t *MultistreamDefs_Event) 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.defs#event" return glex.MarshalCBOR(w, &cp)}
func (t *MultistreamDefs_Event) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// MultistreamDefs_TargetView is a "targetView" in the place.stream.multistream.defs schema.type MultistreamDefs_TargetView struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` LatestEvent *MultistreamDefs_Event `json:"latestEvent,omitempty"` Record *glex.LexiconTypeDecoder `json:"record"` Uri string `json:"uri"`}
// RecordTypeID implements glex.Record.func (t *MultistreamDefs_TargetView) RecordTypeID() string { return "place.stream.multistream.defs#targetView"}
func (t *MultistreamDefs_TargetView) 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.defs#targetView" return glex.MarshalCBOR(w, &cp)}
func (t *MultistreamDefs_TargetView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}