Versions in this module Expand all Collapse all v1 v1.7.1 Jan 29, 2021 v1.7.0 Dec 8, 2020 Changes in this version + const ByteArrayMaxLen + const MajArray + const MajByteString + const MajMap + const MajNegativeInt + const MajOther + const MajTag + const MajTextString + const MajUnsignedInt + const MaxLength + var CborBoolFalse = []byte + var CborBoolTrue = []byte + var CborNull = []byte + func CborEncodeMajorType(t byte, l uint64) []byte + func CborReadHeader(br io.Reader) (byte, uint64, error) + func CborReadHeaderBuf(br io.Reader, scratch []byte) (byte, uint64, error) + func CborWriteHeader(w io.Writer, t byte, l uint64) error + func EncodeBool(b bool) []byte + func GenMapEncodersForType(inpkg string, i interface{}, w io.Writer) error + func GenTupleEncodersForType(inpkg string, i interface{}, w io.Writer) error + func PrintHeaderAndUtilityMethods(w io.Writer, pkg string) error + func ReadByteArray(br io.Reader, maxlen uint64) ([]byte, error) + func ReadCid(br io.Reader) (cid.Cid, error) + func ReadString(r io.Reader) (string, error) + func ReadStringBuf(r io.Reader, scratch []byte) (string, error) + func ReadTaggedByteArray(br io.Reader, exptag uint64, maxlen uint64) ([]byte, error) + func ScanForLinks(br io.Reader, cb func(cid.Cid)) error + func WriteBool(w io.Writer, b bool) error + func WriteCid(w io.Writer, c cid.Cid) error + func WriteCidBuf(buf []byte, w io.Writer, c cid.Cid) error + func WriteMajorTypeHeader(w io.Writer, t byte, l uint64) error + func WriteMajorTypeHeaderBuf(buf []byte, w io.Writer, t byte, l uint64) error + func WriteMapEncodersToFile(fname, pkg string, types ...interface{}) error + func WriteTupleEncodersToFile(fname, pkg string, types ...interface{}) error + type BytePeeker interface + PeekByte func() (byte, error) + func GetPeeker(r io.Reader) BytePeeker + type CBORMarshaler interface + MarshalCBOR func(io.Writer) error + type CBORUnmarshaler interface + UnmarshalCBOR func(io.Reader) error + type CborBool bool + func (cb *CborBool) MarshalCBOR(w io.Writer) error + func (cb *CborBool) UnmarshalCBOR(r io.Reader) error + type CborCid cid.Cid + func (c *CborCid) MarshalCBOR(w io.Writer) error + func (c *CborCid) UnmarshalCBOR(r io.Reader) error + type CborInt int64 + func (ci *CborInt) MarshalCBOR(w io.Writer) error + func (ci *CborInt) UnmarshalCBOR(r io.Reader) error + type Deferred struct + Raw []byte + func (d *Deferred) Child() Deferred + func (d *Deferred) MarshalCBOR(w io.Writer) error + func (d *Deferred) UnmarshalCBOR(br io.Reader) error + type Field struct + IterLabel string + Name string + Pkg string + Pointer bool + Type reflect.Type + func (f Field) ElemName() string + func (f Field) IsArray() bool + func (f Field) Len() int + func (f Field) TypeName() string + type GenTypeInfo struct + Fields []Field + Name string + func ParseTypeInfo(pkg string, i interface{}) (*GenTypeInfo, error) + func (gti *GenTypeInfo) NeedsScratch() bool + func (gti GenTypeInfo) MapHeader() []byte + func (gti GenTypeInfo) MapHeaderAsByteString() string + func (gti GenTypeInfo) TupleHeader() []byte + func (gti GenTypeInfo) TupleHeaderAsByteString() string