Versions in this module Expand all Collapse all v0 v0.0.2 Aug 29, 2021 v0.0.1 Aug 24, 2021 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(gti *GenTypeInfo, w io.Writer) error + func GenTupleEncodersForType(gti *GenTypeInfo, w io.Writer) error + func PrintHeaderAndUtilityMethods(w io.Writer, pkg string, typeInfos []*GenTypeInfo) 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 ValidateCBOR(b []byte) 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 + 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) UnmarshalCBOR(r io.Reader) error + func (cb CborBool) MarshalCBOR(w io.Writer) error + type CborCid cid.Cid + func (c *CborCid) UnmarshalCBOR(r io.Reader) error + func (c CborCid) MarshalCBOR(w io.Writer) error + type CborInt int64 + func (ci *CborInt) UnmarshalCBOR(r io.Reader) error + func (ci CborInt) MarshalCBOR(w io.Writer) error + type CborTime time.Time + func (ct *CborTime) UnmarshalCBOR(r io.Reader) error + func (ct *CborTime) UnmarshalJSON(b []byte) error + func (ct CborTime) MarshalCBOR(w io.Writer) error + func (ct CborTime) MarshalJSON() ([]byte, error) + func (ct CborTime) Time() time.Time + type Deferred struct + Raw []byte + 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(i interface{}) (*GenTypeInfo, error) + func (gti *GenTypeInfo) Imports() []Import + 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 + type Import struct + Name string + PkgPath string + func ImportsForType(currPkg string, t reflect.Type) []Import