Documentation
¶
Index ¶
- Variables
- type AminoMarshalerInt4
- func (am AminoMarshalerInt4) MarshalAmino() (ReprStruct4, error)
- func (goo AminoMarshalerInt4) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerInt4) SizeBinary2(cdc *amino.Codec) (int, error)
- func (am *AminoMarshalerInt4) UnmarshalAmino(rs ReprStruct4) error
- func (goo *AminoMarshalerInt4) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type AminoMarshalerInt5
- func (am AminoMarshalerInt5) MarshalAmino() (string, error)
- func (goo AminoMarshalerInt5) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerInt5) SizeBinary2(cdc *amino.Codec) (int, error)
- func (am *AminoMarshalerInt5) UnmarshalAmino(repr string) error
- func (goo *AminoMarshalerInt5) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type AminoMarshalerStruct1
- func (ams AminoMarshalerStruct1) MarshalAmino() (ReprStruct1, error)
- func (goo AminoMarshalerStruct1) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerStruct1) SizeBinary2(cdc *amino.Codec) (int, error)
- func (ams *AminoMarshalerStruct1) UnmarshalAmino(rs ReprStruct1) error
- func (goo *AminoMarshalerStruct1) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type AminoMarshalerStruct2
- func (ams AminoMarshalerStruct2) MarshalAmino() ([]ReprElem2, error)
- func (goo AminoMarshalerStruct2) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerStruct2) SizeBinary2(cdc *amino.Codec) (int, error)
- func (ams *AminoMarshalerStruct2) UnmarshalAmino(repr []ReprElem2) error
- func (goo *AminoMarshalerStruct2) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type AminoMarshalerStruct3
- func (ams AminoMarshalerStruct3) MarshalAmino() (int32, error)
- func (goo AminoMarshalerStruct3) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerStruct3) SizeBinary2(cdc *amino.Codec) (int, error)
- func (ams *AminoMarshalerStruct3) UnmarshalAmino(i int32) error
- func (goo *AminoMarshalerStruct3) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type AminoMarshalerStruct6
- func (ams AminoMarshalerStruct6) MarshalAmino() ([]AminoMarshalerStruct1, error)
- func (goo AminoMarshalerStruct6) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerStruct6) SizeBinary2(cdc *amino.Codec) (int, error)
- func (ams *AminoMarshalerStruct6) UnmarshalAmino(repr []AminoMarshalerStruct1) error
- func (goo *AminoMarshalerStruct6) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type AminoMarshalerStruct7
- func (ams AminoMarshalerStruct7) MarshalAmino() ([]ReprElem7, error)
- func (goo AminoMarshalerStruct7) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo AminoMarshalerStruct7) SizeBinary2(cdc *amino.Codec) (int, error)
- func (ams *AminoMarshalerStruct7) UnmarshalAmino(repr []ReprElem7) error
- func (goo *AminoMarshalerStruct7) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ArraysArraysStruct
- type ArraysStruct
- type ByteAr
- type ByteArraySliceStruct
- type ByteSl
- type ComplexSt
- type Concrete1
- func (Concrete1) AssertInterface1()
- func (Concrete1) AssertInterface2()
- func (goo Concrete1) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo Concrete1) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *Concrete1) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type Concrete2
- func (Concrete2) AssertInterface1()
- func (Concrete2) AssertInterface2()
- func (goo Concrete2) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo Concrete2) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *Concrete2) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ConcreteRecursive
- func (ConcreteRecursive) AssertInterface1()
- func (goo ConcreteRecursive) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ConcreteRecursive) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ConcreteRecursive) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ConcreteTypeDef
- func (ConcreteTypeDef) AssertInterface1()
- func (goo ConcreteTypeDef) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ConcreteTypeDef) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ConcreteTypeDef) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ConcreteWrappedBytes
- func (ConcreteWrappedBytes) AssertInterface1()
- func (goo ConcreteWrappedBytes) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ConcreteWrappedBytes) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *ConcreteWrappedBytes) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ContainerWithAminoLists
- type CounterRepr
- func (c CounterRepr) MarshalAmino() (uint8, error)
- func (goo CounterRepr) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo CounterRepr) SizeBinary2(cdc *amino.Codec) (int, error)
- func (c *CounterRepr) UnmarshalAmino(repr uint8) error
- func (goo *CounterRepr) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type CrossPkgBoxedRepr
- func (c CrossPkgBoxedRepr) MarshalAmino() (crosspkg.Inner, error)
- func (goo CrossPkgBoxedRepr) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo CrossPkgBoxedRepr) SizeBinary2(cdc *amino.Codec) (int, error)
- func (c *CrossPkgBoxedRepr) UnmarshalAmino(r crosspkg.Inner) error
- func (goo *CrossPkgBoxedRepr) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type CrossPkgPointerSlice
- type EmbeddedSt1
- type EmbeddedSt2
- type EmbeddedSt3
- type EmbeddedSt4
- type EmbeddedSt5
- type EmptyReprOnZero
- func (e EmptyReprOnZero) MarshalAmino() (string, error)
- func (goo EmptyReprOnZero) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo EmptyReprOnZero) SizeBinary2(cdc *amino.Codec) (int, error)
- func (e *EmptyReprOnZero) UnmarshalAmino(s string) error
- func (goo *EmptyReprOnZero) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type EmptyStruct
- type FixedStringArrayStruct
- type FuzzBlock
- type FuzzContainsAminoMarshaler
- type FuzzDeclInfo
- type FuzzDeepNest
- type FuzzFieldInfo
- type FuzzFileInfo
- type FuzzFixedInt
- type FuzzFuncInfo
- type FuzzNilElements
- type FuzzNilEmptyRepr
- type FuzzPtrNest
- type FuzzStructInfo
- type FuzzUnsafeFloat
- type FuzzValueEntry
- type FuzzWriteEmpty
- type GnoVMAttrs
- type GnoVMBlock
- type GnoVMDeclaredType
- type GnoVMFieldType
- type GnoVMFileNode
- type GnoVMFuncValue
- type GnoVMLocation
- type GnoVMMapEntry
- type GnoVMNode
- type GnoVMObjectID
- type GnoVMObjectInfo
- type GnoVMPointerValue
- type GnoVMPos
- type GnoVMRefValue
- type GnoVMSliceValue
- type GnoVMSpan
- type GnoVMStructType
- type GnoVMTypedValue
- type HostRepr
- func (hr HostRepr) MarshalAmino() ([]byte, error)
- func (goo HostRepr) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo HostRepr) SizeBinary2(cdc *amino.Codec) (int, error)
- func (hr *HostRepr) UnmarshalAmino(repr []byte) error
- func (goo *HostRepr) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type IntAr
- type IntDef
- type IntSl
- type Interface1
- type Interface2
- type InterfaceFieldsStruct
- func (*InterfaceFieldsStruct) AssertInterface1()
- func (goo InterfaceFieldsStruct) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo InterfaceFieldsStruct) SizeBinary2(cdc *amino.Codec) (int, error)
- func (goo *InterfaceFieldsStruct) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type InterfaceHeavy
- type PointerSlicesStruct
- type PointersStruct
- type PrimitivesStruct
- type PrimitivesStructAr
- type PrimitivesStructDef
- type PrimitivesStructSl
- type ReprElem2
- type ReprElem7
- func (re ReprElem7) MarshalAmino() (uint8, error)
- func (goo ReprElem7) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo ReprElem7) SizeBinary2(cdc *amino.Codec) (int, error)
- func (re *ReprElem7) UnmarshalAmino(u uint8) error
- func (goo *ReprElem7) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type ReprStruct1
- type ReprStruct4
- type ShortArraysStruct
- type SimpleAddress
- func (a SimpleAddress) MarshalAmino() (string, error)
- func (goo SimpleAddress) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo SimpleAddress) SizeBinary2(cdc *amino.Codec) (int, error)
- func (a *SimpleAddress) UnmarshalAmino(repr string) error
- func (goo *SimpleAddress) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
- type SlicesSlicesStruct
- type SlicesStruct
- type StructPtrSliceWithStringRepr
- type StructUint8ReprSliceStruct
- type StructWithStringRepr
- func (s StructWithStringRepr) MarshalAmino() (string, error)
- func (goo StructWithStringRepr) MarshalBinary2(cdc *amino.Codec, buf []byte, offset int) (int, error)
- func (goo StructWithStringRepr) SizeBinary2(cdc *amino.Codec) (int, error)
- func (s *StructWithStringRepr) UnmarshalAmino(r string) error
- func (goo *StructWithStringRepr) UnmarshalBinary2(cdc *amino.Codec, bz []byte, anyDepth int) error
Constants ¶
This section is empty.
Variables ¶
var AminoTagTypes = []any{ (*FuzzWriteEmpty)(nil), (*FuzzNilElements)(nil), }
AminoTagTypes are struct types that use amino-specific encoding tags (write_empty, nil_elements) with no proto3 equivalent. These need a tailored test that skips the proto.Marshal byte comparison.
var DefTypes = []any{ (*IntDef)(nil), (*IntAr)(nil), (*IntSl)(nil), (*ByteAr)(nil), (*ByteSl)(nil), (*PrimitivesStructSl)(nil), (*PrimitivesStructDef)(nil), }
var Package = pkg.NewPackage( "github.com/gnolang/gno/tm2/pkg/amino/tests", "tests", pkg.GetCallersDirname(), ).WithDependencies().WithTypes( EmptyStruct{}, PrimitivesStruct{}, ShortArraysStruct{}, ArraysStruct{}, ArraysArraysStruct{}, SlicesStruct{}, SlicesSlicesStruct{}, PointersStruct{}, PointerSlicesStruct{}, ComplexSt{}, EmbeddedSt1{}, EmbeddedSt2{}, EmbeddedSt3{}, EmbeddedSt4{}, pkg.Type{ Type: reflect.TypeOf(EmbeddedSt5{}), Name: "EmbeddedSt5NameOverride", PointerPreferred: false, }, AminoMarshalerStruct1{}, ReprStruct1{}, AminoMarshalerStruct2{}, ReprElem2{}, AminoMarshalerStruct3{}, AminoMarshalerInt4(0), AminoMarshalerInt5(0), AminoMarshalerStruct6{}, AminoMarshalerStruct7{}, ReprElem7{}, IntDef(0), IntAr{}, IntSl(nil), ByteAr{}, ByteSl(nil), PrimitivesStructDef{}, PrimitivesStructSl(nil), PrimitivesStructAr{}, Concrete1{}, Concrete2{}, ConcreteRecursive{}, ConcreteTypeDef{}, ConcreteWrappedBytes{}, &InterfaceFieldsStruct{}, GnoVMPos{}, GnoVMSpan{}, GnoVMLocation{}, GnoVMAttrs{}, GnoVMObjectID{}, GnoVMObjectInfo{}, GnoVMTypedValue{}, GnoVMBlock{}, GnoVMFuncValue{}, GnoVMDeclaredType{}, GnoVMRefValue{}, GnoVMFieldType{}, GnoVMStructType{}, GnoVMFileNode{}, GnoVMPointerValue{}, GnoVMSliceValue{}, GnoVMMapEntry{}, GnoVMNode{}, FuzzFieldInfo{}, FuzzStructInfo{}, FuzzValueEntry{}, FuzzBlock{}, FuzzFuncInfo{}, FuzzDeclInfo{}, FuzzFileInfo{}, FuzzPtrNest{}, FuzzDeepNest{}, FuzzUnsafeFloat{}, FuzzWriteEmpty{}, FuzzNilElements{}, FuzzFixedInt{}, FuzzContainsAminoMarshaler{}, EmptyReprOnZero{}, FuzzNilEmptyRepr{}, SimpleAddress{}, HostRepr{}, CounterRepr(0), ContainerWithAminoLists{}, StructWithStringRepr{}, StructPtrSliceWithStringRepr{}, ByteArraySliceStruct{}, FixedStringArrayStruct{}, StructUint8ReprSliceStruct{}, CrossPkgPointerSlice{}, CrossPkgBoxedRepr{}, InterfaceHeavy{}, )
Creates one much like amino.RegisterPackage, but without registration. This is needed due to circular dependency issues for dependencies of Amino. Another reason to strive for many independent modules. NOTE: Register new repr types here as well. NOTE: This package registration is independent of test registration. See tests/common.go StructTypes etc to add to tests.
var StructTypes = []any{ (*EmptyStruct)(nil), (*PrimitivesStruct)(nil), (*ShortArraysStruct)(nil), (*ArraysStruct)(nil), (*ArraysArraysStruct)(nil), (*SlicesStruct)(nil), (*SlicesSlicesStruct)(nil), (*PointersStruct)(nil), (*PointerSlicesStruct)(nil), (*ComplexSt)(nil), (*EmbeddedSt1)(nil), (*EmbeddedSt2)(nil), (*EmbeddedSt3)(nil), (*EmbeddedSt4)(nil), (*EmbeddedSt5)(nil), (*AminoMarshalerStruct1)(nil), (*AminoMarshalerStruct2)(nil), (*AminoMarshalerStruct3)(nil), (*AminoMarshalerInt4)(nil), (*AminoMarshalerInt5)(nil), (*AminoMarshalerStruct6)(nil), (*AminoMarshalerStruct7)(nil), (*FuzzStructInfo)(nil), (*FuzzBlock)(nil), (*FuzzDeepNest)(nil), (*FuzzPtrNest)(nil), (*FuzzUnsafeFloat)(nil), (*FuzzFixedInt)(nil), (*FuzzContainsAminoMarshaler)(nil), (*ContainerWithAminoLists)(nil), (*StructPtrSliceWithStringRepr)(nil), (*ByteArraySliceStruct)(nil), (*FixedStringArrayStruct)(nil), (*StructUint8ReprSliceStruct)(nil), (*CrossPkgBoxedRepr)(nil), (*InterfaceHeavy)(nil), }
Functions ¶
This section is empty.
Types ¶
type AminoMarshalerInt4 ¶
type AminoMarshalerInt4 int32
func (AminoMarshalerInt4) MarshalAmino ¶
func (am AminoMarshalerInt4) MarshalAmino() (ReprStruct4, error)
func (AminoMarshalerInt4) MarshalBinary2 ¶
func (AminoMarshalerInt4) SizeBinary2 ¶
func (goo AminoMarshalerInt4) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerInt4) UnmarshalAmino ¶
func (am *AminoMarshalerInt4) UnmarshalAmino(rs ReprStruct4) error
func (*AminoMarshalerInt4) UnmarshalBinary2 ¶
type AminoMarshalerInt5 ¶
type AminoMarshalerInt5 int32
func (AminoMarshalerInt5) MarshalAmino ¶
func (am AminoMarshalerInt5) MarshalAmino() (string, error)
func (AminoMarshalerInt5) MarshalBinary2 ¶
func (AminoMarshalerInt5) SizeBinary2 ¶
func (goo AminoMarshalerInt5) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerInt5) UnmarshalAmino ¶
func (am *AminoMarshalerInt5) UnmarshalAmino(repr string) error
func (*AminoMarshalerInt5) UnmarshalBinary2 ¶
type AminoMarshalerStruct1 ¶
func (AminoMarshalerStruct1) MarshalAmino ¶
func (ams AminoMarshalerStruct1) MarshalAmino() (ReprStruct1, error)
func (AminoMarshalerStruct1) MarshalBinary2 ¶
func (AminoMarshalerStruct1) SizeBinary2 ¶
func (goo AminoMarshalerStruct1) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerStruct1) UnmarshalAmino ¶
func (ams *AminoMarshalerStruct1) UnmarshalAmino(rs ReprStruct1) error
func (*AminoMarshalerStruct1) UnmarshalBinary2 ¶
type AminoMarshalerStruct2 ¶
type AminoMarshalerStruct2 struct {
B int32 // exposed (dontcare)
// contains filtered or unexported fields
}
func (AminoMarshalerStruct2) MarshalAmino ¶
func (ams AminoMarshalerStruct2) MarshalAmino() ([]ReprElem2, error)
func (AminoMarshalerStruct2) MarshalBinary2 ¶
func (AminoMarshalerStruct2) SizeBinary2 ¶
func (goo AminoMarshalerStruct2) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerStruct2) UnmarshalAmino ¶
func (ams *AminoMarshalerStruct2) UnmarshalAmino(repr []ReprElem2) error
func (*AminoMarshalerStruct2) UnmarshalBinary2 ¶
type AminoMarshalerStruct3 ¶
type AminoMarshalerStruct3 struct {
A int32
}
func (AminoMarshalerStruct3) MarshalAmino ¶
func (ams AminoMarshalerStruct3) MarshalAmino() (int32, error)
func (AminoMarshalerStruct3) MarshalBinary2 ¶
func (AminoMarshalerStruct3) SizeBinary2 ¶
func (goo AminoMarshalerStruct3) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerStruct3) UnmarshalAmino ¶
func (ams *AminoMarshalerStruct3) UnmarshalAmino(i int32) error
func (*AminoMarshalerStruct3) UnmarshalBinary2 ¶
type AminoMarshalerStruct6 ¶
func (AminoMarshalerStruct6) MarshalAmino ¶
func (ams AminoMarshalerStruct6) MarshalAmino() ([]AminoMarshalerStruct1, error)
func (AminoMarshalerStruct6) MarshalBinary2 ¶
func (AminoMarshalerStruct6) SizeBinary2 ¶
func (goo AminoMarshalerStruct6) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerStruct6) UnmarshalAmino ¶
func (ams *AminoMarshalerStruct6) UnmarshalAmino(repr []AminoMarshalerStruct1) error
func (*AminoMarshalerStruct6) UnmarshalBinary2 ¶
type AminoMarshalerStruct7 ¶
type AminoMarshalerStruct7 struct {
A int8
}
func (AminoMarshalerStruct7) MarshalAmino ¶
func (ams AminoMarshalerStruct7) MarshalAmino() ([]ReprElem7, error)
func (AminoMarshalerStruct7) MarshalBinary2 ¶
func (AminoMarshalerStruct7) SizeBinary2 ¶
func (goo AminoMarshalerStruct7) SizeBinary2(cdc *amino.Codec) (int, error)
func (*AminoMarshalerStruct7) UnmarshalAmino ¶
func (ams *AminoMarshalerStruct7) UnmarshalAmino(repr []ReprElem7) error
func (*AminoMarshalerStruct7) UnmarshalBinary2 ¶
type ArraysArraysStruct ¶
type ArraysArraysStruct struct {
Int8ArAr [2][2]int8
Int16ArAr [2][2]int16
Int32ArAr [2][2]int32
Int32FixedArAr [2][2]int32 `binary:"fixed32"`
Int64ArAr [2][2]int64
Int64FixedArAr [2][2]int64 `binary:"fixed64"`
IntArAr [2][2]int
ByteArAr [2][2]byte
Uint8ArAr [2][2]uint8
Uint16ArAr [2][2]uint16
Uint32ArAr [2][2]uint32
Uint32FixedArAr [2][2]uint32 `binary:"fixed32"`
Uint64ArAr [2][2]uint64
Uint64FixedArAr [2][2]uint64 `binary:"fixed64"`
UintArAr [2][2]uint
StrArAr [2][2]string
BytesArAr [2][2][]byte
TimeArAr [2][2]time.Time
DurationArAr [2][2]time.Duration
EmptyArAr [2][2]EmptyStruct
}
func (ArraysArraysStruct) MarshalBinary2 ¶
func (ArraysArraysStruct) SizeBinary2 ¶
func (goo ArraysArraysStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ArraysArraysStruct) UnmarshalBinary2 ¶
type ArraysStruct ¶
type ArraysStruct struct {
Int8Ar [4]int8
Int16Ar [4]int16
Int32Ar [4]int32
Int32FixedAr [4]int32 `binary:"fixed32"`
Int64Ar [4]int64
Int64FixedAr [4]int64 `binary:"fixed64"`
IntAr [4]int
ByteAr [4]byte
Uint8Ar [4]uint8
Uint16Ar [4]uint16
Uint32Ar [4]uint32
Uint32FixedAr [4]uint32 `binary:"fixed32"`
Uint64Ar [4]uint64
Uint64FixedAr [4]uint64 `binary:"fixed64"`
UintAr [4]uint
StrAr [4]string
BytesAr [4][]byte
TimeAr [4]time.Time
DurationAr [4]time.Duration
EmptyAr [4]EmptyStruct
}
func (ArraysStruct) MarshalBinary2 ¶
func (ArraysStruct) SizeBinary2 ¶
func (goo ArraysStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ArraysStruct) UnmarshalBinary2 ¶
type ByteAr ¶
type ByteAr [4]byte
This will be encoded as message SomeName { bytes val = 1; }
func (ByteAr) MarshalBinary2 ¶
type ByteArraySliceStruct ¶
type ByteArraySliceStruct struct {
Items [][8]byte
}
ByteArraySliceStruct: a struct with a `[][8]byte` field. Each element is a fixed-size 8-byte array, decoded as a list element via writePrimitiveDecodeFrom's Array+Uint8 branch. Exercises the byte-array element length check: the generator must enforce that the decoded payload length matches the array length, mirroring reflect (binary_decode.go:551-555).
func (ByteArraySliceStruct) MarshalBinary2 ¶
func (ByteArraySliceStruct) SizeBinary2 ¶
func (goo ByteArraySliceStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ByteArraySliceStruct) UnmarshalBinary2 ¶
type ByteSl ¶
type ByteSl []byte
This will be encoded as message SomeName { bytes val = 1; }
func (ByteSl) MarshalBinary2 ¶
type ComplexSt ¶
type ComplexSt struct {
PrField PrimitivesStruct
ArField ArraysStruct
SlField SlicesStruct
PtField PointersStruct
}
func (ComplexSt) MarshalBinary2 ¶
type Concrete1 ¶
type Concrete1 struct{}
func (Concrete1) AssertInterface1 ¶
func (Concrete1) AssertInterface1()
func (Concrete1) AssertInterface2 ¶
func (Concrete1) AssertInterface2()
func (Concrete1) MarshalBinary2 ¶
type Concrete2 ¶
type Concrete2 struct{}
func (Concrete2) AssertInterface1 ¶
func (Concrete2) AssertInterface1()
func (Concrete2) AssertInterface2 ¶
func (Concrete2) AssertInterface2()
func (Concrete2) MarshalBinary2 ¶
type ConcreteRecursive ¶
type ConcreteRecursive struct {
Inner Interface1
}
ConcreteRecursive implements Interface1 and has an Interface1 field, allowing unbounded nesting for depth-limit testing.
func (ConcreteRecursive) AssertInterface1 ¶
func (ConcreteRecursive) AssertInterface1()
func (ConcreteRecursive) MarshalBinary2 ¶
func (ConcreteRecursive) SizeBinary2 ¶
func (goo ConcreteRecursive) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ConcreteRecursive) UnmarshalBinary2 ¶
type ConcreteTypeDef ¶
type ConcreteTypeDef [4]byte
Special case: this concrete implementation (of Interface1) is a type definition.
func (ConcreteTypeDef) AssertInterface1 ¶
func (ConcreteTypeDef) AssertInterface1()
func (ConcreteTypeDef) MarshalBinary2 ¶
func (ConcreteTypeDef) SizeBinary2 ¶
func (goo ConcreteTypeDef) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ConcreteTypeDef) UnmarshalBinary2 ¶
type ConcreteWrappedBytes ¶
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 ¶
func (ConcreteWrappedBytes) AssertInterface1()
func (ConcreteWrappedBytes) MarshalBinary2 ¶
func (ConcreteWrappedBytes) SizeBinary2 ¶
func (goo ConcreteWrappedBytes) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ConcreteWrappedBytes) UnmarshalBinary2 ¶
type ContainerWithAminoLists ¶
type ContainerWithAminoLists struct {
Addrs []SimpleAddress // slice, string repr
TopAddrs [3]SimpleAddress // array, string repr
}
func (ContainerWithAminoLists) MarshalBinary2 ¶
func (ContainerWithAminoLists) SizeBinary2 ¶
func (goo ContainerWithAminoLists) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ContainerWithAminoLists) UnmarshalBinary2 ¶
type CounterRepr ¶
type CounterRepr uint8
func (CounterRepr) MarshalAmino ¶
func (c CounterRepr) MarshalAmino() (uint8, error)
func (CounterRepr) MarshalBinary2 ¶
func (CounterRepr) SizeBinary2 ¶
func (goo CounterRepr) SizeBinary2(cdc *amino.Codec) (int, error)
func (*CounterRepr) UnmarshalAmino ¶
func (c *CounterRepr) UnmarshalAmino(repr uint8) error
func (*CounterRepr) UnmarshalBinary2 ¶
type CrossPkgBoxedRepr ¶
type CrossPkgBoxedRepr struct {
Val int64
}
func (CrossPkgBoxedRepr) MarshalAmino ¶
func (c CrossPkgBoxedRepr) MarshalAmino() (crosspkg.Inner, error)
func (CrossPkgBoxedRepr) MarshalBinary2 ¶
func (CrossPkgBoxedRepr) SizeBinary2 ¶
func (goo CrossPkgBoxedRepr) SizeBinary2(cdc *amino.Codec) (int, error)
func (*CrossPkgBoxedRepr) UnmarshalAmino ¶
func (c *CrossPkgBoxedRepr) UnmarshalAmino(r crosspkg.Inner) error
func (*CrossPkgBoxedRepr) UnmarshalBinary2 ¶
type CrossPkgPointerSlice ¶
type CrossPkgPointerSlice struct {
Counts []*crosspkg.SmallCount
}
func (CrossPkgPointerSlice) MarshalBinary2 ¶
func (CrossPkgPointerSlice) SizeBinary2 ¶
func (goo CrossPkgPointerSlice) SizeBinary2(cdc *amino.Codec) (int, error)
func (*CrossPkgPointerSlice) UnmarshalBinary2 ¶
type EmbeddedSt1 ¶
type EmbeddedSt1 struct {
PrimitivesStruct
}
func (EmbeddedSt1) MarshalBinary2 ¶
func (EmbeddedSt1) SizeBinary2 ¶
func (goo EmbeddedSt1) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmbeddedSt1) UnmarshalBinary2 ¶
type EmbeddedSt2 ¶
type EmbeddedSt2 struct {
PrimitivesStruct
ArraysStruct
SlicesStruct
PointersStruct
}
func (EmbeddedSt2) MarshalBinary2 ¶
func (EmbeddedSt2) SizeBinary2 ¶
func (goo EmbeddedSt2) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmbeddedSt2) UnmarshalBinary2 ¶
type EmbeddedSt3 ¶
type EmbeddedSt3 struct {
*PrimitivesStruct
*ArraysStruct
*SlicesStruct
*PointersStruct
*EmptyStruct
}
func (EmbeddedSt3) MarshalBinary2 ¶
func (EmbeddedSt3) SizeBinary2 ¶
func (goo EmbeddedSt3) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmbeddedSt3) UnmarshalBinary2 ¶
type EmbeddedSt4 ¶
type EmbeddedSt4 struct {
Foo1 int
PrimitivesStruct
Foo2 string
ArraysStructField ArraysStruct
Foo3 []byte
SlicesStruct
Foo4 bool
PointersStructField PointersStruct
Foo5 uint
}
func (EmbeddedSt4) MarshalBinary2 ¶
func (EmbeddedSt4) SizeBinary2 ¶
func (goo EmbeddedSt4) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmbeddedSt4) UnmarshalBinary2 ¶
type EmbeddedSt5 ¶
type EmbeddedSt5 struct {
Foo1 int
*PrimitivesStruct
Foo2 string
ArraysStructField *ArraysStruct
Foo3 []byte
*SlicesStruct
Foo4 bool
PointersStructField *PointersStruct
Foo5 uint
}
func (EmbeddedSt5) MarshalBinary2 ¶
func (EmbeddedSt5) SizeBinary2 ¶
func (goo EmbeddedSt5) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmbeddedSt5) UnmarshalBinary2 ¶
type EmptyReprOnZero ¶
type EmptyReprOnZero struct {
Val int32
}
EmptyReprOnZero: a struct AminoMarshaler whose MarshalAmino returns the empty string for the zero value and a decimal representation otherwise. Mirrors std.Coin's "zero → empty string repr" behavior but is self- contained in the tests package. Used by FuzzNilEmptyRepr and as a standalone field to exercise the gen_marshal.go zero-check branch for struct Go type + non-struct repr where the repr IS zero (the path production AminoMarshalers rarely hit).
func (EmptyReprOnZero) MarshalAmino ¶
func (e EmptyReprOnZero) MarshalAmino() (string, error)
func (EmptyReprOnZero) MarshalBinary2 ¶
func (EmptyReprOnZero) SizeBinary2 ¶
func (goo EmptyReprOnZero) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmptyReprOnZero) UnmarshalAmino ¶
func (e *EmptyReprOnZero) UnmarshalAmino(s string) error
func (*EmptyReprOnZero) UnmarshalBinary2 ¶
type EmptyStruct ¶
type EmptyStruct struct{}
func (EmptyStruct) MarshalBinary2 ¶
func (EmptyStruct) SizeBinary2 ¶
func (goo EmptyStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*EmptyStruct) UnmarshalBinary2 ¶
type FixedStringArrayStruct ¶
type FixedStringArrayStruct struct {
Names [4]string
}
FixedStringArrayStruct: a struct with a `[4]string` field — a fixed-size array of ByteLength-typed elements (decoded as unpacked-list entries). Exercises the unpacked-list-array short-input rejection rule: the generator must reject wire input that provides fewer than N entries, matching reflect (binary_decode.go:625-644).
func (FixedStringArrayStruct) MarshalBinary2 ¶
func (FixedStringArrayStruct) SizeBinary2 ¶
func (goo FixedStringArrayStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FixedStringArrayStruct) UnmarshalBinary2 ¶
type FuzzBlock ¶
type FuzzBlock struct {
GnoVMObjectInfo
Values []FuzzValueEntry
Name string
}
FuzzBlock: models Block (embedded struct + slice of nested structs) Pattern: embedded ObjectInfo + slice of struct
func (FuzzBlock) MarshalBinary2 ¶
type FuzzContainsAminoMarshaler ¶
type FuzzContainsAminoMarshaler struct {
AM AminoMarshalerStruct1
}
FuzzContainsAminoMarshaler: a struct with an AminoMarshaler struct field whose repr is itself a struct. Exercises the `IsAminoMarshaler && field-type==struct && repr-type==struct` path in gen_size.go / gen_marshal.go, which are easy to get out of sync on the "should we emit the field key?" decision.
func (FuzzContainsAminoMarshaler) MarshalBinary2 ¶
func (FuzzContainsAminoMarshaler) SizeBinary2 ¶
func (goo FuzzContainsAminoMarshaler) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzContainsAminoMarshaler) UnmarshalBinary2 ¶
type FuzzDeclInfo ¶
type FuzzDeclInfo struct {
PkgPath string
Name string
ParentLoc GnoVMLocation
Methods []FuzzValueEntry
}
FuzzDeclInfo: models DeclaredType (nested Location + slice of structs) Pattern: nested non-embedded struct + struct slice
func (FuzzDeclInfo) MarshalBinary2 ¶
func (FuzzDeclInfo) SizeBinary2 ¶
func (goo FuzzDeclInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzDeclInfo) UnmarshalBinary2 ¶
type FuzzDeepNest ¶
type FuzzDeepNest struct {
Blocks []FuzzBlock
Meta GnoVMAttrs
}
FuzzDeepNest: deeply nested struct slices (3 levels) Pattern: struct containing slice of struct containing slice of struct
func (FuzzDeepNest) MarshalBinary2 ¶
func (FuzzDeepNest) SizeBinary2 ¶
func (goo FuzzDeepNest) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzDeepNest) UnmarshalBinary2 ¶
type FuzzFieldInfo ¶
FuzzFieldInfo: like gnovm's FieldType but without interface Pattern: slice of these used in FuzzStructInfo
func (FuzzFieldInfo) MarshalBinary2 ¶
func (FuzzFieldInfo) SizeBinary2 ¶
func (goo FuzzFieldInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzFieldInfo) UnmarshalBinary2 ¶
type FuzzFileInfo ¶
type FuzzFileInfo struct {
GnoVMAttrs
FileName string
PkgName string
Decls []FuzzFieldInfo
}
FuzzFileInfo: models FileNode (deeply embedded + slice of structs) Pattern: 4-level embedded struct + slice of nested structs
func (FuzzFileInfo) MarshalBinary2 ¶
func (FuzzFileInfo) SizeBinary2 ¶
func (goo FuzzFileInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzFileInfo) UnmarshalBinary2 ¶
type FuzzFixedInt ¶
FuzzFixedInt: exercises binary:"fixed64" on bare int/uint types (not just int64/uint64). Catches marshal/unmarshal wire-format divergence. Note: binary:"fixed32" on int/uint is rejected by amino's ValidateBasic.
func (FuzzFixedInt) MarshalBinary2 ¶
func (FuzzFixedInt) SizeBinary2 ¶
func (goo FuzzFixedInt) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzFixedInt) UnmarshalBinary2 ¶
type FuzzFuncInfo ¶
type FuzzFuncInfo struct {
GnoVMObjectInfo
IsMethod bool
IsClosure bool
Name string
PkgPath string
Captures []FuzzValueEntry
}
FuzzFuncInfo: models FuncValue (many mixed fields + slice of nested structs) Pattern: embedded struct + bool flags + string fields + struct slice
func (FuzzFuncInfo) MarshalBinary2 ¶
func (FuzzFuncInfo) SizeBinary2 ¶
func (goo FuzzFuncInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzFuncInfo) UnmarshalBinary2 ¶
type FuzzNilElements ¶
type FuzzNilElements struct {
Entries []*FuzzFieldInfo `amino:"nil_elements"`
Poses []*GnoVMPos `amino:"nil_elements"`
Name string
}
FuzzNilElements: exercises amino:"nil_elements" on pointer-to-struct slices.
func (FuzzNilElements) MarshalBinary2 ¶
func (FuzzNilElements) SizeBinary2 ¶
func (goo FuzzNilElements) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzNilElements) UnmarshalBinary2 ¶
type FuzzNilEmptyRepr ¶
type FuzzNilEmptyRepr struct {
Vals []*EmptyReprOnZero `amino:"nil_elements"`
}
FuzzNilEmptyRepr: []*EmptyReprOnZero amino:"nil_elements". Under nil_elements semantics both nil and a non-nil pointer whose MarshalAmino produces "" serialize identically (zero-length element) and both decode to nil, so strict DeepEqual roundtrip is intentionally lossy for the empty-repr case. The parity invariants that still apply are (1) encoder parity, (2) size correctness, and (3) cross-decoder agreement.
func (FuzzNilEmptyRepr) MarshalBinary2 ¶
func (FuzzNilEmptyRepr) SizeBinary2 ¶
func (goo FuzzNilEmptyRepr) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzNilEmptyRepr) UnmarshalBinary2 ¶
type FuzzPtrNest ¶
type FuzzPtrNest struct {
Entry *FuzzValueEntry
Index int
Name string
}
FuzzPtrNest: models PointerValue (pointer to nested struct) Pattern: pointer to struct containing byte array + nested struct
func (FuzzPtrNest) MarshalBinary2 ¶
func (FuzzPtrNest) SizeBinary2 ¶
func (goo FuzzPtrNest) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzPtrNest) UnmarshalBinary2 ¶
type FuzzStructInfo ¶
type FuzzStructInfo struct {
PkgPath string
Fields []FuzzFieldInfo
}
FuzzStructInfo: models gnovm's StructType (slice of nested structs) Pattern: slice of struct fields
func (FuzzStructInfo) MarshalBinary2 ¶
func (FuzzStructInfo) SizeBinary2 ¶
func (goo FuzzStructInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzStructInfo) UnmarshalBinary2 ¶
type FuzzUnsafeFloat ¶
type FuzzUnsafeFloat struct {
Score float64 `amino:"unsafe"`
Weight float32 `amino:"unsafe"`
Label string
Count int32
}
FuzzUnsafeFloat: exercises amino:"unsafe" for float types.
func (FuzzUnsafeFloat) MarshalBinary2 ¶
func (FuzzUnsafeFloat) SizeBinary2 ¶
func (goo FuzzUnsafeFloat) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzUnsafeFloat) UnmarshalBinary2 ¶
type FuzzValueEntry ¶
type FuzzValueEntry struct {
N [8]byte
Loc GnoVMLocation
Kind int32
Data []byte
}
FuzzValueEntry: like TypedValue but fuzzable (no interfaces) Pattern: byte array + nested struct + primitives
func (FuzzValueEntry) MarshalBinary2 ¶
func (FuzzValueEntry) SizeBinary2 ¶
func (goo FuzzValueEntry) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzValueEntry) UnmarshalBinary2 ¶
type FuzzWriteEmpty ¶
type FuzzWriteEmpty struct {
Name string `amino:"write_empty"`
Values []int32 `amino:"write_empty"`
Inner GnoVMPos `amino:"write_empty"`
Data []byte `amino:"write_empty"`
Count int64 `amino:"write_empty"`
Flag bool `amino:"write_empty"`
Normal string // control: no write_empty
}
FuzzWriteEmpty: exercises amino:"write_empty" on various field types.
func (FuzzWriteEmpty) MarshalBinary2 ¶
func (FuzzWriteEmpty) SizeBinary2 ¶
func (goo FuzzWriteEmpty) SizeBinary2(cdc *amino.Codec) (int, error)
func (*FuzzWriteEmpty) UnmarshalBinary2 ¶
type GnoVMAttrs ¶
type GnoVMAttrs struct {
GnoVMLocation
Label string
Line int
}
func (GnoVMAttrs) MarshalBinary2 ¶
func (GnoVMAttrs) SizeBinary2 ¶
func (goo GnoVMAttrs) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMAttrs) UnmarshalBinary2 ¶
type GnoVMBlock ¶
type GnoVMBlock struct {
GnoVMObjectInfo
Source Interface1
Values []GnoVMTypedValue
}
func (GnoVMBlock) MarshalBinary2 ¶
func (GnoVMBlock) SizeBinary2 ¶
func (goo GnoVMBlock) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMBlock) UnmarshalBinary2 ¶
type GnoVMDeclaredType ¶
type GnoVMDeclaredType struct {
PkgPath string
Name string
ParentLoc GnoVMLocation
Base Interface1
Methods []GnoVMTypedValue
}
func (GnoVMDeclaredType) MarshalBinary2 ¶
func (GnoVMDeclaredType) SizeBinary2 ¶
func (goo GnoVMDeclaredType) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMDeclaredType) UnmarshalBinary2 ¶
type GnoVMFieldType ¶
type GnoVMFieldType struct {
Name string
Type Interface1
Embedded bool
Tag string
}
func (GnoVMFieldType) MarshalBinary2 ¶
func (GnoVMFieldType) SizeBinary2 ¶
func (goo GnoVMFieldType) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMFieldType) UnmarshalBinary2 ¶
type GnoVMFileNode ¶
type GnoVMFileNode struct {
GnoVMAttrs
FileName string
PkgName string
Decls []Interface1
}
func (GnoVMFileNode) MarshalBinary2 ¶
func (GnoVMFileNode) SizeBinary2 ¶
func (goo GnoVMFileNode) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMFileNode) UnmarshalBinary2 ¶
type GnoVMFuncValue ¶
type GnoVMFuncValue struct {
GnoVMObjectInfo
Type Interface1
IsMethod bool
IsClosure bool
Name string
Parent Interface1
Captures []GnoVMTypedValue
PkgPath string
}
func (GnoVMFuncValue) MarshalBinary2 ¶
func (GnoVMFuncValue) SizeBinary2 ¶
func (goo GnoVMFuncValue) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMFuncValue) UnmarshalBinary2 ¶
type GnoVMLocation ¶
func (GnoVMLocation) MarshalBinary2 ¶
func (GnoVMLocation) SizeBinary2 ¶
func (goo GnoVMLocation) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMLocation) UnmarshalBinary2 ¶
type GnoVMMapEntry ¶
type GnoVMMapEntry struct {
Key GnoVMTypedValue
Value GnoVMTypedValue
}
func (GnoVMMapEntry) MarshalBinary2 ¶
func (GnoVMMapEntry) SizeBinary2 ¶
func (goo GnoVMMapEntry) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMMapEntry) UnmarshalBinary2 ¶
type GnoVMNode ¶
type GnoVMNode struct {
GnoVMAttrs
Op int32
Left Interface1
Right Interface1
Args []Interface1
}
func (GnoVMNode) MarshalBinary2 ¶
type GnoVMObjectID ¶
GnoVMObjectID: models gnovm's ObjectID with amino marshaler
func (GnoVMObjectID) MarshalBinary2 ¶
func (GnoVMObjectID) SizeBinary2 ¶
func (goo GnoVMObjectID) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMObjectID) UnmarshalBinary2 ¶
type GnoVMObjectInfo ¶
type GnoVMObjectInfo struct {
ID GnoVMObjectID
Hash [20]byte // like Hashlet
OwnerID GnoVMObjectID
ModTime uint64
}
func (GnoVMObjectInfo) MarshalBinary2 ¶
func (GnoVMObjectInfo) SizeBinary2 ¶
func (goo GnoVMObjectInfo) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMObjectInfo) UnmarshalBinary2 ¶
type GnoVMPointerValue ¶
type GnoVMPointerValue struct {
TV *GnoVMTypedValue
Base Interface1
Index int
}
func (GnoVMPointerValue) MarshalBinary2 ¶
func (GnoVMPointerValue) SizeBinary2 ¶
func (goo GnoVMPointerValue) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMPointerValue) UnmarshalBinary2 ¶
type GnoVMPos ¶
func (GnoVMPos) MarshalBinary2 ¶
type GnoVMRefValue ¶
type GnoVMRefValue struct {
ObjectID GnoVMObjectID
Escaped bool
PkgPath string
Hash [20]byte
}
func (GnoVMRefValue) MarshalBinary2 ¶
func (GnoVMRefValue) SizeBinary2 ¶
func (goo GnoVMRefValue) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMRefValue) UnmarshalBinary2 ¶
type GnoVMSliceValue ¶
type GnoVMSliceValue struct {
Base Interface1
Offset int
Length int
Maxcap int
}
func (GnoVMSliceValue) MarshalBinary2 ¶
func (GnoVMSliceValue) SizeBinary2 ¶
func (goo GnoVMSliceValue) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMSliceValue) UnmarshalBinary2 ¶
type GnoVMSpan ¶
func (GnoVMSpan) MarshalBinary2 ¶
type GnoVMStructType ¶
type GnoVMStructType struct {
PkgPath string
Fields []GnoVMFieldType
}
func (GnoVMStructType) MarshalBinary2 ¶
func (GnoVMStructType) SizeBinary2 ¶
func (goo GnoVMStructType) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMStructType) UnmarshalBinary2 ¶
type GnoVMTypedValue ¶
type GnoVMTypedValue struct {
T Interface1 // Type interface
V Interface1 // Value interface
N [8]byte // like TypedValue.N
}
func (GnoVMTypedValue) MarshalBinary2 ¶
func (GnoVMTypedValue) SizeBinary2 ¶
func (goo GnoVMTypedValue) SizeBinary2(cdc *amino.Codec) (int, error)
func (*GnoVMTypedValue) UnmarshalBinary2 ¶
type HostRepr ¶
type HostRepr struct {
IP string
}
func (HostRepr) MarshalAmino ¶
func (HostRepr) MarshalBinary2 ¶
func (*HostRepr) UnmarshalAmino ¶
type IntAr ¶
type IntAr [4]int
This will be encoded as message SomeName { repeated int val = 1; }
func (IntAr) MarshalBinary2 ¶
type IntDef ¶
type IntDef int
This will be encoded as message SomeName { int64 val = 1; }
func (IntDef) MarshalBinary2 ¶
type IntSl ¶
type IntSl []int
This will be encoded as message SomeName { repeated int val = 1; }
func (IntSl) MarshalBinary2 ¶
type Interface1 ¶
type Interface1 interface {
AssertInterface1()
}
type Interface2 ¶
type Interface2 interface {
AssertInterface2()
}
type InterfaceFieldsStruct ¶
type InterfaceFieldsStruct struct {
F1 Interface1
F2 Interface1
F3 any
F4 any
}
Yet another special case: Field could be a type alias (should not be wrapped).
func (*InterfaceFieldsStruct) AssertInterface1 ¶
func (*InterfaceFieldsStruct) AssertInterface1()
func (InterfaceFieldsStruct) MarshalBinary2 ¶
func (InterfaceFieldsStruct) SizeBinary2 ¶
func (goo InterfaceFieldsStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*InterfaceFieldsStruct) UnmarshalBinary2 ¶
type InterfaceHeavy ¶
type InterfaceHeavy struct {
Field1 Interface1
Field2 Interface1
Field3 Interface1
Items []Interface1
Name string
}
InterfaceHeavy: benchmarks MarshalAnyBinary2 with multiple interface fields.
func (InterfaceHeavy) MarshalBinary2 ¶
func (InterfaceHeavy) SizeBinary2 ¶
func (goo InterfaceHeavy) SizeBinary2(cdc *amino.Codec) (int, error)
func (*InterfaceHeavy) UnmarshalBinary2 ¶
type PointerSlicesStruct ¶
type PointerSlicesStruct struct {
Int8PtSl []*int8
Int16PtSl []*int16
Int32PtSl []*int32
Int32FixedPtSl []*int32 `binary:"fixed32"`
Int64PtSl []*int64
Int64FixedPtSl []*int64 `binary:"fixed64"`
IntPtSl []*int
BytePtSl []*byte
Uint8PtSl []*uint8
Uint16PtSl []*uint16
Uint32PtSl []*uint32
Uint32FixedPtSl []*uint32 `binary:"fixed32"`
Uint64PtSl []*uint64
Uint64FixedPtSl []*uint64 `binary:"fixed64"`
UintPtSl []*uint
StrPtSl []*string
BytesPtSl []*[]byte
TimePtSl []*time.Time
DurationPtSl []*time.Duration
EmptyPtSl []*EmptyStruct
}
func (PointerSlicesStruct) MarshalBinary2 ¶
func (PointerSlicesStruct) SizeBinary2 ¶
func (goo PointerSlicesStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*PointerSlicesStruct) UnmarshalBinary2 ¶
type PointersStruct ¶
type PointersStruct struct {
Int8Pt *int8
Int16Pt *int16
Int32Pt *int32
Int32FixedPt *int32 `binary:"fixed32"`
Int64Pt *int64
Int64FixedPt *int64 `binary:"fixed64"`
IntPt *int
BytePt *byte
Uint8Pt *uint8
Uint16Pt *uint16
Uint32Pt *uint32
Uint32FixedPt *uint32 `binary:"fixed32"`
Uint64Pt *uint64
Uint64FixedPt *uint64 `binary:"fixed64"`
UintPt *uint
StrPt *string
BytesPt *[]byte
TimePt *time.Time
DurationPt *time.Duration
EmptyPt *EmptyStruct
}
func (PointersStruct) MarshalBinary2 ¶
func (PointersStruct) SizeBinary2 ¶
func (goo PointersStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*PointersStruct) UnmarshalBinary2 ¶
type PrimitivesStruct ¶
type PrimitivesStruct struct {
Int8 int8
Int16 int16
Int32 int32
Int32Fixed int32 `binary:"fixed32"`
Int64 int64
Int64Fixed int64 `binary:"fixed64"`
Int int
Byte byte
Uint8 uint8
Uint16 uint16
Uint32 uint32
Uint32Fixed uint32 `binary:"fixed32"`
Uint64 uint64
Uint64Fixed uint64 `binary:"fixed64"`
Uint uint
Str string
Bytes []byte
Time time.Time
Duration time.Duration
Empty EmptyStruct
}
func (PrimitivesStruct) MarshalBinary2 ¶
func (PrimitivesStruct) SizeBinary2 ¶
func (goo PrimitivesStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*PrimitivesStruct) UnmarshalBinary2 ¶
type PrimitivesStructAr ¶
type PrimitivesStructAr [2]PrimitivesStruct
This will be encoded as message SomeName { repeated PrimitivesStruct val = 1; }
func (PrimitivesStructAr) MarshalBinary2 ¶
func (PrimitivesStructAr) SizeBinary2 ¶
func (goo PrimitivesStructAr) SizeBinary2(cdc *amino.Codec) (int, error)
func (*PrimitivesStructAr) UnmarshalBinary2 ¶
type PrimitivesStructDef ¶
type PrimitivesStructDef PrimitivesStruct
func (PrimitivesStructDef) MarshalBinary2 ¶
func (PrimitivesStructDef) SizeBinary2 ¶
func (goo PrimitivesStructDef) SizeBinary2(cdc *amino.Codec) (int, error)
func (*PrimitivesStructDef) UnmarshalBinary2 ¶
type PrimitivesStructSl ¶
type PrimitivesStructSl []PrimitivesStruct
This will be encoded as message SomeName { repeated PrimitivesStruct val = 1; }
func (PrimitivesStructSl) MarshalBinary2 ¶
func (PrimitivesStructSl) SizeBinary2 ¶
func (goo PrimitivesStructSl) SizeBinary2(cdc *amino.Codec) (int, error)
func (*PrimitivesStructSl) UnmarshalBinary2 ¶
type ReprElem2 ¶
func (ReprElem2) MarshalBinary2 ¶
type ReprElem7 ¶
type ReprElem7 struct {
A int8
}
func (ReprElem7) MarshalAmino ¶
func (ReprElem7) MarshalBinary2 ¶
func (*ReprElem7) UnmarshalAmino ¶
type ReprStruct1 ¶
func (ReprStruct1) MarshalBinary2 ¶
func (ReprStruct1) SizeBinary2 ¶
func (goo ReprStruct1) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ReprStruct1) UnmarshalBinary2 ¶
type ReprStruct4 ¶
type ReprStruct4 struct {
A int32
}
type ShortArraysStruct ¶
func (ShortArraysStruct) MarshalBinary2 ¶
func (ShortArraysStruct) SizeBinary2 ¶
func (goo ShortArraysStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*ShortArraysStruct) UnmarshalBinary2 ¶
type SimpleAddress ¶
type SimpleAddress [20]byte
func (SimpleAddress) MarshalAmino ¶
func (a SimpleAddress) MarshalAmino() (string, error)
func (SimpleAddress) MarshalBinary2 ¶
func (SimpleAddress) SizeBinary2 ¶
func (goo SimpleAddress) SizeBinary2(cdc *amino.Codec) (int, error)
func (*SimpleAddress) UnmarshalAmino ¶
func (a *SimpleAddress) UnmarshalAmino(repr string) error
func (*SimpleAddress) UnmarshalBinary2 ¶
type SlicesSlicesStruct ¶
type SlicesSlicesStruct struct {
Int8SlSl [][]int8
Int16SlSl [][]int16
Int32SlSl [][]int32
Int32FixedSlSl [][]int32 `binary:"fixed32"`
Int64SlSl [][]int64
Int64FixedSlSl [][]int64 `binary:"fixed64"`
IntSlSl [][]int
ByteSlSl [][]byte
Uint8SlSl [][]uint8
Uint16SlSl [][]uint16
Uint32SlSl [][]uint32
Uint32FixedSlSl [][]uint32 `binary:"fixed32"`
Uint64SlSl [][]uint64
Uint64FixedSlSl [][]uint64 `binary:"fixed64"`
UintSlSl [][]uint
StrSlSl [][]string
BytesSlSl [][][]byte
TimeSlSl [][]time.Time
DurationSlSl [][]time.Duration
EmptySlSl [][]EmptyStruct
}
func (SlicesSlicesStruct) MarshalBinary2 ¶
func (SlicesSlicesStruct) SizeBinary2 ¶
func (goo SlicesSlicesStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*SlicesSlicesStruct) UnmarshalBinary2 ¶
type SlicesStruct ¶
type SlicesStruct struct {
Int8Sl []int8
Int16Sl []int16
Int32Sl []int32
Int32FixedSl []int32 `binary:"fixed32"`
Int64Sl []int64
Int64FixedSl []int64 `binary:"fixed64"`
IntSl []int
ByteSl []byte
Uint8Sl []uint8
Uint16Sl []uint16
Uint32Sl []uint32
Uint32FixedSl []uint32 `binary:"fixed32"`
Uint64Sl []uint64
Uint64FixedSl []uint64 `binary:"fixed64"`
UintSl []uint
StrSl []string
BytesSl [][]byte
TimeSl []time.Time
DurationSl []time.Duration
EmptySl []EmptyStruct
}
func (SlicesStruct) MarshalBinary2 ¶
func (SlicesStruct) SizeBinary2 ¶
func (goo SlicesStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*SlicesStruct) UnmarshalBinary2 ¶
type StructPtrSliceWithStringRepr ¶
type StructPtrSliceWithStringRepr struct {
Items []*StructWithStringRepr // no nil_elements tag
}
StructPtrSliceWithStringRepr exercises the list-element nil_elements rule for `[]*X` where X is a Go struct with non-struct (string) repr. If `ertIsStruct` were keyed off `einfo.ReprType.Type.Kind()` (string, false), the generator would silently encode nil entries as 0x00 sentinels. Correct behavior: key off `einfo.Type.Kind() == Struct` (Go kind, true) and reject nil entries without a `nil_elements` tag — matching reflect.
func (StructPtrSliceWithStringRepr) MarshalBinary2 ¶
func (StructPtrSliceWithStringRepr) SizeBinary2 ¶
func (goo StructPtrSliceWithStringRepr) SizeBinary2(cdc *amino.Codec) (int, error)
func (*StructPtrSliceWithStringRepr) UnmarshalBinary2 ¶
type StructUint8ReprSliceStruct ¶
type StructUint8ReprSliceStruct struct {
Vals []ReprElem7
}
StructUint8ReprSliceStruct: exercises the unpacked-list packed-branch bare-byte (beOptionByte) emission for AminoMarshaler-struct elements whose repr is uint8. Reflect detects this via beOptionByte at binary_encode.go:165 and emits EncodeByte (1 byte). Without the generator's bare-byte handling at this site, writePrimitiveEncode would emit `PrependUvarint(buf, offset, uint64(elem))` against a struct-typed accessor — a Go compile error AND a wire divergence (uvarint of byte ≥128 is 2 bytes; reflect emits 1 bare byte).
Mirror of AminoMarshalerStruct7 (top-level repr-bytes) but at the struct-field position, where writeUnpackedListMarshal handles the list rather than writePackedSliceReprMarshal.
func (StructUint8ReprSliceStruct) MarshalBinary2 ¶
func (StructUint8ReprSliceStruct) SizeBinary2 ¶
func (goo StructUint8ReprSliceStruct) SizeBinary2(cdc *amino.Codec) (int, error)
func (*StructUint8ReprSliceStruct) UnmarshalBinary2 ¶
type StructWithStringRepr ¶
type StructWithStringRepr struct {
Name string
}
StructWithStringRepr is a Go struct whose MarshalAmino returns a string. Used to exercise the "struct-pointer needs nil_elements" rule for list elements whose Go kind is Struct but repr kind is String (Typ3ByteLength, so unpacked list encoding is used). The generator must key off `einfo.Type.Kind() == Struct` (Go kind), not the repr kind — matching reflect at binary_encode.go:399.
func (StructWithStringRepr) MarshalAmino ¶
func (s StructWithStringRepr) MarshalAmino() (string, error)
func (StructWithStringRepr) MarshalBinary2 ¶
func (StructWithStringRepr) SizeBinary2 ¶
func (goo StructWithStringRepr) SizeBinary2(cdc *amino.Codec) (int, error)
func (*StructWithStringRepr) UnmarshalAmino ¶
func (s *StructWithStringRepr) UnmarshalAmino(r string) error