// Code generated by glex; DO NOT EDIT. // Lexicon schema: com.atproto.repo.defs package comatproto import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) // RepoDefs_CommitMeta is a "commitMeta" in the com.atproto.repo.defs schema. type RepoDefs_CommitMeta struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` Rev string `json:"rev"` } // RecordTypeID implements glex.Record. func (t *RepoDefs_CommitMeta) RecordTypeID() string { return "com.atproto.repo.defs#commitMeta" } func (t *RepoDefs_CommitMeta) 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 = "com.atproto.repo.defs#commitMeta" return glex.MarshalCBOR(w, &cp) } func (t *RepoDefs_CommitMeta) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }