Documentation
¶
Index ¶
- Constants
- type BigField
- type BigIntContainer
- type DeferredContainer
- type FieldNameOverlap
- type FixedArrays
- type IntAlias
- type IntAliasArray
- type IntArray
- type IntArrayAliasNewType
- type IntArrayNewType
- type LimitedStruct
- type LongString
- type MapStringString
- type MapTransparentType
- type NamedNumber
- type NamedString
- type NeedScratchForMap
- type RenamedFields
- type SignedArray
- type SimpleStructV1
- type SimpleStructV2
- type SimpleTypeOne
- type SimpleTypeTree
- type SimpleTypeTwo
- type StringPtrSlices
- type TestCanonicalFieldOrder
- type TestConstField
- type TestEmpty
- type TestSliceNilPreserve
- type ThingWithSomeTime
- type TupleIntArray
- type TupleIntArrayOptionals
- type TupleWithOptionalFields
Constants ¶
View Source
const Thingc = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigIntContainer ¶ added in v0.2.0
func (*BigIntContainer) MarshalCBOR ¶ added in v0.2.0
func (t *BigIntContainer) MarshalCBOR(w io.Writer) error
func (*BigIntContainer) UnmarshalCBOR ¶ added in v0.2.0
func (t *BigIntContainer) UnmarshalCBOR(r io.Reader) (err error)
type DeferredContainer ¶
type DeferredContainer struct {
Stuff *SimpleTypeOne
Deferred *cbg.Deferred
Value uint64
}
func (*DeferredContainer) MarshalCBOR ¶
func (t *DeferredContainer) MarshalCBOR(w io.Writer) error
func (*DeferredContainer) UnmarshalCBOR ¶
func (t *DeferredContainer) UnmarshalCBOR(r io.Reader) (err error)
type FieldNameOverlap ¶ added in v0.3.0
type FieldNameOverlap struct {
LongerNamedField string
Foo int64 `cborgen:"foo"`
Bar string `cborgen:"beep"`
}
func (*FieldNameOverlap) MarshalCBOR ¶ added in v0.3.0
func (t *FieldNameOverlap) MarshalCBOR(w io.Writer) error
func (*FieldNameOverlap) UnmarshalCBOR ¶ added in v0.3.0
func (t *FieldNameOverlap) UnmarshalCBOR(r io.Reader) (err error)
type FixedArrays ¶
func (*FixedArrays) MarshalCBOR ¶
func (t *FixedArrays) MarshalCBOR(w io.Writer) error
func (*FixedArrays) UnmarshalCBOR ¶
func (t *FixedArrays) UnmarshalCBOR(r io.Reader) (err error)
type IntAliasArray ¶
type IntAliasArray struct {
Ints []IntAlias `cborgen:"transparent"`
}
func (*IntAliasArray) MarshalCBOR ¶
func (t *IntAliasArray) MarshalCBOR(w io.Writer) error
func (*IntAliasArray) UnmarshalCBOR ¶
func (t *IntAliasArray) UnmarshalCBOR(r io.Reader) (err error)
type IntArrayAliasNewType ¶
type IntArrayAliasNewType []IntAlias
func (*IntArrayAliasNewType) MarshalCBOR ¶
func (t *IntArrayAliasNewType) MarshalCBOR(w io.Writer) error
func (*IntArrayAliasNewType) UnmarshalCBOR ¶
func (t *IntArrayAliasNewType) UnmarshalCBOR(r io.Reader) (err error)
type IntArrayNewType ¶
type IntArrayNewType []int64
func (*IntArrayNewType) MarshalCBOR ¶
func (t *IntArrayNewType) MarshalCBOR(w io.Writer) error
func (*IntArrayNewType) UnmarshalCBOR ¶
func (t *IntArrayNewType) UnmarshalCBOR(r io.Reader) (err error)
type LimitedStruct ¶
func (*LimitedStruct) MarshalCBOR ¶
func (t *LimitedStruct) MarshalCBOR(w io.Writer) error
func (*LimitedStruct) UnmarshalCBOR ¶
func (t *LimitedStruct) UnmarshalCBOR(r io.Reader) (err error)
type LongString ¶ added in v0.1.2
type LongString struct {
Val string
}
func (*LongString) MarshalCBOR ¶ added in v0.1.2
func (t *LongString) MarshalCBOR(w io.Writer) error
func (*LongString) UnmarshalCBOR ¶ added in v0.1.2
func (t *LongString) UnmarshalCBOR(r io.Reader) (err error)
type MapStringString ¶
func (*MapStringString) MarshalCBOR ¶
func (t *MapStringString) MarshalCBOR(w io.Writer) error
func (*MapStringString) UnmarshalCBOR ¶
func (t *MapStringString) UnmarshalCBOR(r io.Reader) (err error)
type MapTransparentType ¶
func (*MapTransparentType) MarshalCBOR ¶
func (t *MapTransparentType) MarshalCBOR(w io.Writer) error
func (*MapTransparentType) UnmarshalCBOR ¶
func (t *MapTransparentType) UnmarshalCBOR(r io.Reader) (err error)
type NamedNumber ¶
type NamedNumber uint64
type NamedString ¶
type NamedString string
type NeedScratchForMap ¶
type NeedScratchForMap struct {
Thing bool
}
Do not add fields to this type.
func (*NeedScratchForMap) MarshalCBOR ¶
func (t *NeedScratchForMap) MarshalCBOR(w io.Writer) error
func (*NeedScratchForMap) UnmarshalCBOR ¶
func (t *NeedScratchForMap) UnmarshalCBOR(r io.Reader) (err error)
type RenamedFields ¶
func (*RenamedFields) MarshalCBOR ¶
func (t *RenamedFields) MarshalCBOR(w io.Writer) error
func (*RenamedFields) UnmarshalCBOR ¶
func (t *RenamedFields) UnmarshalCBOR(r io.Reader) (err error)
type SignedArray ¶
type SignedArray struct {
Signed []uint64
}
func (*SignedArray) MarshalCBOR ¶
func (t *SignedArray) MarshalCBOR(w io.Writer) error
func (*SignedArray) UnmarshalCBOR ¶
func (t *SignedArray) UnmarshalCBOR(r io.Reader) (err error)
type SimpleStructV1 ¶
type SimpleStructV1 struct {
OldStr string
OldBytes []byte
OldNum uint64
OldPtr *cid.Cid
OldMap map[string]SimpleTypeOne
OldArray []SimpleTypeOne
OldStruct SimpleTypeOne
OldCidArray []cid.Cid
OldCidPtrArray []*cid.Cid
}
func (*SimpleStructV1) MarshalCBOR ¶
func (t *SimpleStructV1) MarshalCBOR(w io.Writer) error
func (*SimpleStructV1) UnmarshalCBOR ¶
func (t *SimpleStructV1) UnmarshalCBOR(r io.Reader) (err error)
type SimpleStructV2 ¶
type SimpleStructV2 struct {
OldStr string
NewStr string
OldBytes []byte
NewBytes []byte
OldNum uint64
NewNum uint64
OldPtr *cid.Cid
NewPtr *cid.Cid
OldMap map[string]SimpleTypeOne
NewMap map[string]SimpleTypeOne
OldArray []SimpleTypeOne
NewArray []SimpleTypeOne
OldStruct SimpleTypeOne
NewStruct SimpleTypeOne
}
func (*SimpleStructV2) MarshalCBOR ¶
func (t *SimpleStructV2) MarshalCBOR(w io.Writer) error
func (*SimpleStructV2) UnmarshalCBOR ¶
func (t *SimpleStructV2) UnmarshalCBOR(r io.Reader) (err error)
type SimpleTypeOne ¶
type SimpleTypeOne struct {
Foo string
Value uint64
Binary []byte
Signed int64
NString NamedString
Strings []string
}
func (*SimpleTypeOne) MarshalCBOR ¶
func (t *SimpleTypeOne) MarshalCBOR(w io.Writer) error
func (*SimpleTypeOne) UnmarshalCBOR ¶
func (t *SimpleTypeOne) UnmarshalCBOR(r io.Reader) (err error)
type SimpleTypeTree ¶
type SimpleTypeTree struct {
Stuff *SimpleTypeTree
Stufff *SimpleTypeTwo
Others []uint64
Test [][]byte
Dog string
SixtyThreeBitIntegerWithASignBit int64
NotPizza *uint64
StringPtr *string
BoolPtr *bool
}
func (*SimpleTypeTree) MarshalCBOR ¶
func (t *SimpleTypeTree) MarshalCBOR(w io.Writer) error
func (*SimpleTypeTree) UnmarshalCBOR ¶
func (t *SimpleTypeTree) UnmarshalCBOR(r io.Reader) (err error)
type SimpleTypeTwo ¶
type SimpleTypeTwo struct {
Stuff *SimpleTypeTwo
Others []uint64
SignedOthers []int64
Test [][]byte
Dog string
Numbers []NamedNumber
Pizza *uint64
PointyPizza *NamedNumber
Arrrrrghay [Thingc]SimpleTypeOne
}
func (*SimpleTypeTwo) MarshalCBOR ¶
func (t *SimpleTypeTwo) MarshalCBOR(w io.Writer) error
func (*SimpleTypeTwo) UnmarshalCBOR ¶
func (t *SimpleTypeTwo) UnmarshalCBOR(r io.Reader) (err error)
type StringPtrSlices ¶ added in v0.2.0
func (*StringPtrSlices) MarshalCBOR ¶ added in v0.2.0
func (t *StringPtrSlices) MarshalCBOR(w io.Writer) error
func (*StringPtrSlices) UnmarshalCBOR ¶ added in v0.2.0
func (t *StringPtrSlices) UnmarshalCBOR(r io.Reader) (err error)
type TestCanonicalFieldOrder ¶
type TestCanonicalFieldOrder struct {
Foo int64 `cborgen:"foo"`
Bar string `cborgen:"beep"`
Drond int64
Zp string `cborgen:"ap"`
}
func (*TestCanonicalFieldOrder) MarshalCBOR ¶
func (t *TestCanonicalFieldOrder) MarshalCBOR(w io.Writer) error
func (*TestCanonicalFieldOrder) UnmarshalCBOR ¶
func (t *TestCanonicalFieldOrder) UnmarshalCBOR(r io.Reader) (err error)
type TestConstField ¶
func (*TestConstField) MarshalCBOR ¶
func (t *TestConstField) MarshalCBOR(w io.Writer) error
func (*TestConstField) UnmarshalCBOR ¶
func (t *TestConstField) UnmarshalCBOR(r io.Reader) (err error)
type TestEmpty ¶
type TestSliceNilPreserve ¶
type TestSliceNilPreserve struct {
Cat string
Stuff []uint64
Not []uint64 `cborgen:"preservenil"`
Other []byte
NotOther []byte `cborgen:"preservenil"`
Beep int64
}
func (*TestSliceNilPreserve) MarshalCBOR ¶
func (t *TestSliceNilPreserve) MarshalCBOR(w io.Writer) error
func (*TestSliceNilPreserve) UnmarshalCBOR ¶
func (t *TestSliceNilPreserve) UnmarshalCBOR(r io.Reader) (err error)
type ThingWithSomeTime ¶
func (*ThingWithSomeTime) MarshalCBOR ¶
func (t *ThingWithSomeTime) MarshalCBOR(w io.Writer) error
func (*ThingWithSomeTime) UnmarshalCBOR ¶
func (t *ThingWithSomeTime) UnmarshalCBOR(r io.Reader) (err error)
type TupleIntArray ¶
func (*TupleIntArray) MarshalCBOR ¶
func (t *TupleIntArray) MarshalCBOR(w io.Writer) error
func (*TupleIntArray) UnmarshalCBOR ¶
func (t *TupleIntArray) UnmarshalCBOR(r io.Reader) (err error)
type TupleIntArrayOptionals ¶
func (*TupleIntArrayOptionals) MarshalCBOR ¶
func (t *TupleIntArrayOptionals) MarshalCBOR(w io.Writer) error
func (*TupleIntArrayOptionals) UnmarshalCBOR ¶
func (t *TupleIntArrayOptionals) UnmarshalCBOR(r io.Reader) (err error)
type TupleWithOptionalFields ¶ added in v0.3.0
type TupleWithOptionalFields struct {
Int1 int64
Uint2 uint64
Int3 int64 `cborgen:"optional"`
Int4 int64 `cborgen:"optional"`
}
func (*TupleWithOptionalFields) MarshalCBOR ¶ added in v0.3.0
func (t *TupleWithOptionalFields) MarshalCBOR(w io.Writer) error
func (*TupleWithOptionalFields) UnmarshalCBOR ¶ added in v0.3.0
func (t *TupleWithOptionalFields) UnmarshalCBOR(r io.Reader) (err error)
Click to show internal directories.
Click to hide internal directories.