tests

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefTypes = []interface{}{
	(*IntDef)(nil),
	(*IntAr)(nil),
	(*IntSl)(nil),
	(*ByteAr)(nil),
	(*ByteSl)(nil),
	(*PrimitivesStructSl)(nil),
	(*PrimitivesStructDef)(nil),
}

Functions

This section is empty.

Types

type ArraysStruct

type ArraysStruct struct {
	Int8Ar    [4]int8
	Int16Ar   [4]int16
	Int32Ar   [4]int32
	Int64Ar   [4]int64
	VarintAr  [4]int64 `binary:"varint"`
	IntAr     [4]int
	ByteAr    [4]byte
	Uint8Ar   [4]uint8
	Uint16Ar  [4]uint16
	Uint32Ar  [4]uint32
	Uint64Ar  [4]uint64
	UvarintAr [4]uint64 `binary:"varint"`
	UintAr    [4]uint
	StringAr  [4]string
	BytesAr   [4][]byte
	TimeAr    [4]time.Time
	EmptyAr   [4]EmptyStruct
}

type ByteAr

type ByteAr [4]byte

This will be encoded as message SomeName { bytes val = 1; }

type ByteSl

type ByteSl []byte

This will be encoded as message SomeName { bytes val = 1; }

type ComplexSt

type ComplexSt struct {
	PrField PrimitivesStruct
	ArField ArraysStruct
	SlField SlicesStruct
	PtField PointersStruct
}

type Concrete1

type Concrete1 struct{}

func (Concrete1) AssertInterface1

func (Concrete1) AssertInterface1()

func (Concrete1) AssertInterface2

func (Concrete1) AssertInterface2()

type Concrete2

type Concrete2 struct{}

func (Concrete2) AssertInterface1

func (Concrete2) AssertInterface1()

func (Concrete2) AssertInterface2

func (Concrete2) AssertInterface2()

type ConcreteTypeDef added in v0.16.1

type ConcreteTypeDef [4]byte

Special case: this concrete implementation (of Interface1) is a type alias.

func (ConcreteTypeDef) AssertInterface1 added in v0.16.1

func (ConcreteTypeDef) AssertInterface1()

type ConcreteWrappedBytes added in v0.16.1

type ConcreteWrappedBytes struct {
	Value []byte
}

Ideally, user's of amino should refrain from using the above but wrap actual values in structs; e.g. like:

func (ConcreteWrappedBytes) AssertInterface1 added in v0.16.1

func (ConcreteWrappedBytes) AssertInterface1()

type EmbeddedSt1

type EmbeddedSt1 struct {
	PrimitivesStruct
}

type EmbeddedSt4

type EmbeddedSt4 struct {
	Foo1 int
	PrimitivesStruct
	Foo2              string
	ArraysStructField ArraysStruct
	Foo3              []byte
	SlicesStruct
	Foo4                bool
	PointersStructField PointersStruct
	Foo5                uint
}

type EmbeddedSt5

type EmbeddedSt5 struct {
	Foo1 int
	*PrimitivesStruct
	Foo2              string
	ArraysStructField *ArraysStruct
	Foo3              []byte
	*SlicesStruct
	Foo4                bool
	PointersStructField *PointersStruct
	Foo5                uint
}

type EmptyStruct added in v0.12.0

type EmptyStruct struct {
}

type IntAr

type IntAr [4]int

This will be encoded as message SomeName { repeated int val = 1; }

type IntDef

type IntDef int

This will be encoded as message SomeName { int64 val = 1; }

type IntSl

type IntSl []int

This will be encoded as message SomeName { repeated int val = 1; }

type Interface1

type Interface1 interface {
	AssertInterface1()
}

type Interface2

type Interface2 interface {
	AssertInterface2()
}

type InterfaceFieldsStruct

type InterfaceFieldsStruct struct {
	F1 Interface1
	F2 Interface1
}

Yet another special case: Field could be a type alias (should not be wrapped).

func (*InterfaceFieldsStruct) AssertInterface1

func (*InterfaceFieldsStruct) AssertInterface1()

type NestedPointersStruct

type NestedPointersStruct struct {
	Ptr1 *byte
	Ptr2 **byte
	Ptr3 ***byte
}

NOTE: See registered fuzz funcs for *byte, **byte, and ***byte.

type PointerSlicesStruct

type PointerSlicesStruct struct {
	Int8PtSl    []*int8
	Int16PtSl   []*int16
	Int32PtSl   []*int32
	Int64PtSl   []*int64
	VarintPtSl  []*int64 `binary:"varint"`
	IntPtSl     []*int
	BytePtSl    []*byte
	Uint8PtSl   []*uint8
	Uint16PtSl  []*uint16
	Uint32PtSl  []*uint32
	Uint64PtSl  []*uint64
	UvarintPtSl []*uint64 `binary:"varint"`
	UintPtSl    []*uint
	StringPtSl  []*string
	BytesPtSl   []*[]byte
	TimePtSl    []*time.Time
	EmptyPtSl   []*EmptyStruct
}

type PointersStruct

type PointersStruct struct {
	Int8Pt    *int8
	Int16Pt   *int16
	Int32Pt   *int32
	Int64Pt   *int64
	VarintPt  *int64 `binary:"varint"`
	IntPt     *int
	BytePt    *byte
	Uint8Pt   *uint8
	Uint16Pt  *uint16
	Uint32Pt  *uint32
	Uint64Pt  *uint64
	UvarintPt *uint64 `binary:"varint"`
	UintPt    *uint
	StringPt  *string
	BytesPt   *[]byte
	TimePt    *time.Time
	EmptyPt   *EmptyStruct
}

type PrimitivesStruct

type PrimitivesStruct struct {
	Int8    int8
	Int16   int16
	Int32   int32
	Int64   int64
	Varint  int64 `binary:"varint"`
	Int     int
	Byte    byte
	Uint8   uint8
	Uint16  uint16
	Uint32  uint32
	Uint64  uint64
	Uvarint uint64 `binary:"varint"`
	Uint    uint
	String  string
	Bytes   []byte
	Time    time.Time
	Empty   EmptyStruct
}

type PrimitivesStructAr added in v0.16.1

type PrimitivesStructAr [2]PrimitivesStruct

This will be encoded as message SomeName { repeated PrimitivesStruct val = 1; }

type PrimitivesStructDef

type PrimitivesStructDef PrimitivesStruct

type PrimitivesStructSl

type PrimitivesStructSl []PrimitivesStruct

This will be encoded as message SomeName { repeated PrimitivesStruct val = 1; }

type ShortArraysStruct

type ShortArraysStruct struct {
	TimeAr [0]time.Time
}

type SlicesStruct

type SlicesStruct struct {
	Int8Sl    []int8
	Int16Sl   []int16
	Int32Sl   []int32
	Int64Sl   []int64
	VarintSl  []int64 `binary:"varint"`
	IntSl     []int
	ByteSl    []byte
	Uint8Sl   []uint8
	Uint16Sl  []uint16
	Uint32Sl  []uint32
	Uint64Sl  []uint64
	UvarintSl []uint64 `binary:"varint"`
	UintSl    []uint
	StringSl  []string
	BytesSl   [][]byte
	TimeSl    []time.Time
	EmptySl   []EmptyStruct
}

Directories

Path Synopsis
fuzz
proto3

Jump to

Keyboard shortcuts

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