testing

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Thingc = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type BigField

type BigField struct {
	LargeBytes []byte `cborgen:"maxlen=10000000"`
}

func (*BigField) MarshalCBOR

func (t *BigField) MarshalCBOR(w io.Writer) error

func (*BigField) UnmarshalCBOR

func (t *BigField) 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 FixedArrays

type FixedArrays struct {
	Bytes  [20]byte
	Uint8  [20]uint8
	Uint64 [20]uint64
}

func (*FixedArrays) MarshalCBOR

func (t *FixedArrays) MarshalCBOR(w io.Writer) error

func (*FixedArrays) UnmarshalCBOR

func (t *FixedArrays) UnmarshalCBOR(r io.Reader) (err error)

type IntAlias

type IntAlias int64

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 IntArray

type IntArray struct {
	Ints []int64 `cborgen:"transparent"`
}

func (*IntArray) MarshalCBOR

func (t *IntArray) MarshalCBOR(w io.Writer) error

func (*IntArray) UnmarshalCBOR

func (t *IntArray) 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

type LimitedStruct struct {
	Arr  []uint64
	Byts []byte
	Str  string
}

func (*LimitedStruct) MarshalCBOR

func (t *LimitedStruct) MarshalCBOR(w io.Writer) error

func (*LimitedStruct) UnmarshalCBOR

func (t *LimitedStruct) UnmarshalCBOR(r io.Reader) (err error)

type MapStringString

type MapStringString struct {
	Snorkleblump map[string]string
}

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

type MapTransparentType map[string]string

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

type RenamedFields struct {
	Foo int64  `cborgen:"foo"`
	Bar string `cborgen:"beep"`
}

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 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

type TestConstField struct {
	Cats  string `cborgen:"const=dogsdrool"`
	Thing int64
}

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 TestEmpty struct {
	Foo  *string `cborgen:"omitempty"`
	Beep string  `cborgen:"omitempty"`
	Cat  int64
}

func (*TestEmpty) MarshalCBOR

func (t *TestEmpty) MarshalCBOR(w io.Writer) error

func (*TestEmpty) UnmarshalCBOR

func (t *TestEmpty) UnmarshalCBOR(r io.Reader) (err error)

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

type ThingWithSomeTime struct {
	When    cbg.CborTime
	Stuff   int64
	CatName string
}

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

type TupleIntArray struct {
	Int1 int64
	Int2 int64
	Int3 int64
}

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

type TupleIntArrayOptionals struct {
	Int1 *int64
	Int2 int64
	Int3 uint64
	Int4 *uint64
}

func (*TupleIntArrayOptionals) MarshalCBOR

func (t *TupleIntArrayOptionals) MarshalCBOR(w io.Writer) error

func (*TupleIntArrayOptionals) UnmarshalCBOR

func (t *TupleIntArrayOptionals) UnmarshalCBOR(r io.Reader) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL