Documentation ¶
Index ¶
- Constants
- Variables
- func GetBool(buf []byte) bool
- func GetByte(buf []byte) byte
- func GetBytes20(buf []byte) [20]byte
- func GetBytes32(buf []byte) [32]byte
- func GetFloat32(buf []byte) float32
- func GetFloat64(buf []byte) float64
- func GetInt16(buf []byte) int16
- func GetInt16Polyfill(buf []byte) (n int16)
- func GetInt32(buf []byte) int32
- func GetInt32Polyfill(buf []byte) (n int32)
- func GetInt64(buf []byte) int64
- func GetInt64Polyfill(buf []byte) (n int64)
- func GetInt8(buf []byte) int8
- func GetInt8Polyfill(buf []byte) (n int8)
- func GetUint16(buf []byte) uint16
- func GetUint16Polyfill(buf []byte) (n uint16)
- func GetUint256(buf []byte) *big.Int
- func GetUint32(buf []byte) uint32
- func GetUint32Polyfill(buf []byte) (n uint32)
- func GetUint64(buf []byte) (n uint64)
- func GetUint64Polyfill(buf []byte) (n uint64)
- func GetUint8(buf []byte) (n uint8)
- func GetUint8Polyfill(buf []byte) (n uint8)
- func GetUnionType(buf []byte) uint16
- func HexDumpRawInLines(raw []byte, lineLen int)
- func WriteBool(buf []byte, n bool)
- func WriteByte(buf []byte, n byte)
- func WriteBytes20(buf []byte, v [20]byte)
- func WriteBytes32(buf []byte, v [32]byte)
- func WriteFloat32(buf []byte, n float32)
- func WriteFloat64(buf []byte, n float64)
- func WriteInt16(buf []byte, n int16)
- func WriteInt16Polyfill(buf []byte, n int16)
- func WriteInt32(buf []byte, n int32)
- func WriteInt32Polyfill(buf []byte, n int32)
- func WriteInt64(buf []byte, n int64)
- func WriteInt64Polyfill(buf []byte, n int64)
- func WriteInt8(buf []byte, n int8)
- func WriteInt8Polyfill(buf []byte, n int8)
- func WriteOffset(buf []byte, n Offset)
- func WriteUint16(buf []byte, n uint16)
- func WriteUint16Polyfill(buf []byte, n uint16)
- func WriteUint256(buf []byte, v *big.Int)
- func WriteUint32(buf []byte, n uint32)
- func WriteUint32Polyfill(buf []byte, n uint32)
- func WriteUint64(buf []byte, n uint64)
- func WriteUint64Polyfill(buf []byte, n uint64)
- func WriteUint8(buf []byte, n uint8)
- func WriteUint8Polyfill(buf []byte, n uint8)
- func WriteUnionType(buf []byte, n uint16)
- type Builder
- type ErrBufferOverrun
- type ErrInvalidField
- type ErrSizeMismatch
- type FieldType
- type InternalBuilder
- func (w *InternalBuilder) CalcRequiredSize() Offset
- func (w *InternalBuilder) GetSize() Offset
- func (w *InternalBuilder) HexDumpBool(prefix string, offsetFromStart Offset, fieldName string, v bool)
- func (w *InternalBuilder) HexDumpBoolArray(prefix string, offsetFromStart Offset, fieldName string, v []bool)
- func (w *InternalBuilder) HexDumpBytes(prefix string, offsetFromStart Offset, fieldName string, v []byte)
- func (w *InternalBuilder) HexDumpBytes20(prefix string, offsetFromStart Offset, fieldName string, v [20]byte)
- func (w *InternalBuilder) HexDumpBytes20Array(prefix string, offsetFromStart Offset, fieldName string, v [][20]byte)
- func (w *InternalBuilder) HexDumpBytes32(prefix string, offsetFromStart Offset, fieldName string, v [32]byte)
- func (w *InternalBuilder) HexDumpBytes32Array(prefix string, offsetFromStart Offset, fieldName string, v [][32]byte)
- func (w *InternalBuilder) HexDumpBytesArray(prefix string, offsetFromStart Offset, fieldName string, v [][]byte)
- func (w *InternalBuilder) HexDumpMessage(prefix string, offsetFromStart Offset, fieldName string, v MessageWriter) (err error)
- func (w *InternalBuilder) HexDumpMessageArray(prefix string, offsetFromStart Offset, fieldName string, v []MessageWriter) (err error)
- func (w *InternalBuilder) HexDumpString(prefix string, offsetFromStart Offset, fieldName string, v string)
- func (w *InternalBuilder) HexDumpStringArray(prefix string, offsetFromStart Offset, fieldName string, v []string)
- func (w *InternalBuilder) HexDumpUint16(prefix string, offsetFromStart Offset, fieldName string, v uint16)
- func (w *InternalBuilder) HexDumpUint16Array(prefix string, offsetFromStart Offset, fieldName string, v []uint16)
- func (w *InternalBuilder) HexDumpUint256(prefix string, offsetFromStart Offset, fieldName string, v *big.Int)
- func (w *InternalBuilder) HexDumpUint256Array(prefix string, offsetFromStart Offset, fieldName string, v []*big.Int)
- func (w *InternalBuilder) HexDumpUint32(prefix string, offsetFromStart Offset, fieldName string, v uint32)
- func (w *InternalBuilder) HexDumpUint32Array(prefix string, offsetFromStart Offset, fieldName string, v []uint32)
- func (w *InternalBuilder) HexDumpUint64(prefix string, offsetFromStart Offset, fieldName string, v uint64)
- func (w *InternalBuilder) HexDumpUint64Array(prefix string, offsetFromStart Offset, fieldName string, v []uint64)
- func (w *InternalBuilder) HexDumpUint8(prefix string, offsetFromStart Offset, fieldName string, v uint8)
- func (w *InternalBuilder) HexDumpUint8Array(prefix string, offsetFromStart Offset, fieldName string, v []uint8)
- func (w *InternalBuilder) HexDumpUnionIndex(prefix string, offsetFromStart Offset, fieldName string, unionIndex uint16)
- func (w *InternalBuilder) NotifyBuildEnd()
- func (w *InternalBuilder) NotifyBuildStart()
- func (w *InternalBuilder) Reset()
- func (w *InternalBuilder) Write(buf []byte) (err error)
- func (w *InternalBuilder) WriteBool(buf []byte, v bool)
- func (w *InternalBuilder) WriteBoolArray(buf []byte, v []bool)
- func (w *InternalBuilder) WriteBytes(buf []byte, v []byte)
- func (w *InternalBuilder) WriteBytes20(buf []byte, v [20]byte)
- func (w *InternalBuilder) WriteBytes20Array(buf []byte, v [][20]byte)
- func (w *InternalBuilder) WriteBytes32(buf []byte, v [32]byte)
- func (w *InternalBuilder) WriteBytes32Array(buf []byte, v [][32]byte)
- func (w *InternalBuilder) WriteBytesArray(buf []byte, v [][]byte)
- func (w *InternalBuilder) WriteMessage(buf []byte, v MessageWriter) (err error)
- func (w *InternalBuilder) WriteMessageArray(buf []byte, v []MessageWriter) (err error)
- func (w *InternalBuilder) WriteOverrideWithRawBuffer(buf []byte, overrideWithRawBuffer []byte) error
- func (w *InternalBuilder) WriteString(buf []byte, v string)
- func (w *InternalBuilder) WriteStringArray(buf []byte, v []string)
- func (w *InternalBuilder) WriteUint16(buf []byte, v uint16)
- func (w *InternalBuilder) WriteUint16Array(buf []byte, v []uint16)
- func (w *InternalBuilder) WriteUint256(buf []byte, v *big.Int)
- func (w *InternalBuilder) WriteUint256Array(buf []byte, v []*big.Int)
- func (w *InternalBuilder) WriteUint32(buf []byte, v uint32)
- func (w *InternalBuilder) WriteUint32Array(buf []byte, v []uint32)
- func (w *InternalBuilder) WriteUint64(buf []byte, v uint64)
- func (w *InternalBuilder) WriteUint64Array(buf []byte, v []uint64)
- func (w *InternalBuilder) WriteUint8(buf []byte, v uint8)
- func (w *InternalBuilder) WriteUint8Array(buf []byte, v []uint8)
- func (w *InternalBuilder) WriteUnionIndex(buf []byte, unionIndex uint16)
- type InternalMessage
- func (m *InternalMessage) GetBool(fieldNum int) bool
- func (m *InternalMessage) GetBoolArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetBoolArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetBoolInOffset(off Offset) bool
- func (m *InternalMessage) GetBytes(fieldNum int) []byte
- func (m *InternalMessage) GetBytes20(fieldNum int) [20]byte
- func (m *InternalMessage) GetBytes20ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetBytes20ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetBytes20InOffset(off Offset) [20]byte
- func (m *InternalMessage) GetBytes32(fieldNum int) [32]byte
- func (m *InternalMessage) GetBytes32ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetBytes32ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetBytes32InOffset(off Offset) [32]byte
- func (m *InternalMessage) GetBytesArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetBytesArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetBytesInOffset(off Offset) []byte
- func (m *InternalMessage) GetMessage(fieldNum int) (buf []byte, size Offset)
- func (m *InternalMessage) GetMessageArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetMessageArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetMessageInOffset(off Offset) (buf []byte, size Offset)
- func (m *InternalMessage) GetOffsetInOffset(off Offset) Offset
- func (m *InternalMessage) GetString(fieldNum int) string
- func (m *InternalMessage) GetStringArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetStringArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetStringInOffset(off Offset) string
- func (m *InternalMessage) GetUint16(fieldNum int) uint16
- func (m *InternalMessage) GetUint16ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetUint16ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetUint16InOffset(off Offset) uint16
- func (m *InternalMessage) GetUint256(fieldNum int) *big.Int
- func (m *InternalMessage) GetUint256ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetUint256ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetUint256InOffset(off Offset) *big.Int
- func (m *InternalMessage) GetUint32(fieldNum int) uint32
- func (m *InternalMessage) GetUint32ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetUint32ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetUint32InOffset(off Offset) uint32
- func (m *InternalMessage) GetUint64(fieldNum int) uint64
- func (m *InternalMessage) GetUint64ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetUint64ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetUint64InOffset(off Offset) uint64
- func (m *InternalMessage) GetUint8(fieldNum int) uint8
- func (m *InternalMessage) GetUint8ArrayIterator(fieldNum int) *Iterator
- func (m *InternalMessage) GetUint8ArrayIteratorInOffset(off Offset) *Iterator
- func (m *InternalMessage) GetUint8InOffset(off Offset) uint8
- func (m *InternalMessage) GetUnionIndex(fieldNum int, unionNum int) uint16
- func (m *InternalMessage) Init(buf []byte, size Offset, scheme []FieldType, unions [][]FieldType)
- func (m *InternalMessage) IsUnionIndex(fieldNum int, unionNum int, unionIndex uint16) (bool, Offset)
- func (m *InternalMessage) IsValid() bool
- func (m *InternalMessage) RawBuffer() []byte
- func (m *InternalMessage) RawBufferForField(fieldNum int, unionNum int) []byte
- func (m *InternalMessage) RawBufferWithHeaderForField(fieldNum int, unionNum int) []byte
- func (m *InternalMessage) SetBool(fieldNum int, v bool) error
- func (m *InternalMessage) SetBoolInOffset(off Offset, v bool)
- func (m *InternalMessage) SetBytes(fieldNum int, v []byte) error
- func (m *InternalMessage) SetBytes20(fieldNum int, v [20]byte) error
- func (m *InternalMessage) SetBytes20InOffset(off Offset, v [20]byte) error
- func (m *InternalMessage) SetBytes32(fieldNum int, v [32]byte) error
- func (m *InternalMessage) SetBytes32InOffset(off Offset, v [32]byte) error
- func (m *InternalMessage) SetBytesInOffset(off Offset, v []byte) error
- func (m *InternalMessage) SetString(fieldNum int, v string) error
- func (m *InternalMessage) SetStringInOffset(off Offset, v string) error
- func (m *InternalMessage) SetUint16(fieldNum int, v uint16) error
- func (m *InternalMessage) SetUint16InOffset(off Offset, v uint16)
- func (m *InternalMessage) SetUint256(fieldNum int, v *big.Int) error
- func (m *InternalMessage) SetUint256InOffset(off Offset, v *big.Int) error
- func (m *InternalMessage) SetUint32(fieldNum int, v uint32) error
- func (m *InternalMessage) SetUint32InOffset(off Offset, v uint32)
- func (m *InternalMessage) SetUint64(fieldNum int, v uint64) error
- func (m *InternalMessage) SetUint64InOffset(off Offset, v uint64)
- func (m *InternalMessage) SetUint8(fieldNum int, v uint8) error
- func (m *InternalMessage) SetUint8InOffset(off Offset, v uint8)
- type Iterator
- func (i *Iterator) HasNext() bool
- func (i *Iterator) NextBool() bool
- func (i *Iterator) NextBytes() []byte
- func (i *Iterator) NextBytes20() (out [20]byte)
- func (i *Iterator) NextBytes32() (out [32]byte)
- func (i *Iterator) NextMessage() (buf []byte, size Offset)
- func (i *Iterator) NextString() string
- func (i *Iterator) NextUint16() uint16
- func (i *Iterator) NextUint256() (out *big.Int)
- func (i *Iterator) NextUint32() uint32
- func (i *Iterator) NextUint64() uint64
- func (i *Iterator) NextUint8() uint8
- type Message
- type MessageWriter
- type Offset
Constants ¶
View Source
const HEX_DUMP_INDENT = " "
Variables ¶
View Source
var FieldAlignment = map[FieldType]Offset{ TypeMessage: 4, TypeBytes: 4, TypeString: 4, TypeUnion: 2, TypeBool: 1, TypeUint8: 1, TypeUint16: 2, TypeUint32: 4, TypeUint64: 4, TypeUint256: 4, TypeUint8Array: 4, TypeBoolArray: 4, TypeUint16Array: 4, TypeUint32Array: 4, TypeUint64Array: 4, TypeUint256Array: 4, TypeMessageArray: 4, TypeBytesArray: 4, TypeStringArray: 4, TypeBytes32: 4, TypeBytes20: 4, TypeBytes32Array: 4, TypeBytes20Array: 4, }
View Source
var FieldDynamic = map[FieldType]bool{ TypeMessage: true, TypeBytes: true, TypeString: true, TypeUnion: true, TypeBool: false, TypeUint8: false, TypeUint16: false, TypeUint32: false, TypeUint64: false, TypeUint256: false, TypeBoolArray: true, TypeUint8Array: true, TypeUint16Array: true, TypeUint32Array: true, TypeUint64Array: true, TypeUint256Array: true, TypeMessageArray: true, TypeBytesArray: true, TypeStringArray: true, TypeBytes32: false, TypeBytes20: false, TypeBytes32Array: true, TypeBytes20Array: true, }
View Source
var FieldDynamicContentAlignment = map[FieldType]Offset{ TypeMessage: 4, TypeBytes: 1, TypeString: 1, TypeUnion: 0, TypeBool: 0, TypeUint8: 0, TypeUint16: 0, TypeUint32: 0, TypeUint64: 0, TypeUint256: 0, TypeBoolArray: 1, TypeUint8Array: 1, TypeUint16Array: 2, TypeUint32Array: 4, TypeUint64Array: 4, TypeUint256Array: 4, TypeMessageArray: 4, TypeBytesArray: 4, TypeStringArray: 4, TypeBytes32: 0, TypeBytes20: 0, TypeBytes32Array: 4, TypeBytes20Array: 4, }
View Source
var FieldSizes = map[FieldType]Offset{ TypeMessage: 4, TypeBytes: 4, TypeString: 4, TypeUnion: 2, TypeBool: 1, TypeUint8: 1, TypeUint16: 2, TypeUint32: 4, TypeUint64: 8, TypeUint256: 32, TypeBoolArray: 4, TypeUint8Array: 4, TypeUint16Array: 4, TypeUint32Array: 4, TypeUint64Array: 4, TypeUint256Array: 4, TypeMessageArray: 4, TypeBytesArray: 4, TypeStringArray: 4, TypeBytes32: 32, TypeBytes20: 20, TypeBytes32Array: 4, TypeBytes20Array: 4, }
Functions ¶
func GetBytes20 ¶ added in v0.3.1
func GetBytes32 ¶ added in v0.3.1
func GetFloat32 ¶
func GetFloat64 ¶
func GetInt16Polyfill ¶
func GetInt32Polyfill ¶
func GetInt64Polyfill ¶
func GetInt8Polyfill ¶
func GetUint16Polyfill ¶
func GetUint256 ¶ added in v0.3.2
func GetUint32Polyfill ¶
func GetUint64Polyfill ¶
func GetUint8Polyfill ¶
func GetUnionType ¶
func HexDumpRawInLines ¶
func WriteBytes20 ¶ added in v0.3.1
func WriteBytes32 ¶ added in v0.3.1
func WriteFloat32 ¶
func WriteFloat64 ¶
func WriteInt16 ¶
func WriteInt16Polyfill ¶
func WriteInt32 ¶
func WriteInt32Polyfill ¶
func WriteInt64 ¶
func WriteInt64Polyfill ¶
func WriteInt8Polyfill ¶
func WriteOffset ¶
func WriteUint16 ¶
func WriteUint16Polyfill ¶
func WriteUint256 ¶ added in v0.3.2
func WriteUint32 ¶
func WriteUint32Polyfill ¶
func WriteUint64 ¶
func WriteUint64Polyfill ¶
func WriteUint8 ¶
func WriteUint8Polyfill ¶
func WriteUnionType ¶
Types ¶
type ErrBufferOverrun ¶
type ErrBufferOverrun struct{}
func (*ErrBufferOverrun) Error ¶
func (e *ErrBufferOverrun) Error() string
type ErrInvalidField ¶
type ErrInvalidField struct{}
func (*ErrInvalidField) Error ¶
func (e *ErrInvalidField) Error() string
type ErrSizeMismatch ¶
type ErrSizeMismatch struct{}
func (*ErrSizeMismatch) Error ¶
func (e *ErrSizeMismatch) Error() string
type FieldType ¶
type FieldType uint16
const ( TypeMessage FieldType = 1 TypeBytes FieldType = 2 TypeString FieldType = 3 TypeUnion FieldType = 4 TypeBool FieldType = 10 TypeUint8 FieldType = 11 TypeUint16 FieldType = 12 TypeUint32 FieldType = 13 TypeUint64 FieldType = 14 TypeUint256 FieldType = 16 TypeBoolArray FieldType = 20 TypeUint8Array FieldType = 21 TypeUint16Array FieldType = 22 TypeUint32Array FieldType = 23 TypeUint64Array FieldType = 24 TypeUint256Array FieldType = 26 TypeMessageArray FieldType = 31 TypeBytesArray FieldType = 32 TypeStringArray FieldType = 33 TypeBytes32 FieldType = 41 TypeBytes20 FieldType = 42 TypeBytes32Array FieldType = 51 TypeBytes20Array FieldType = 52 )
type InternalBuilder ¶
type InternalBuilder struct {
// contains filtered or unexported fields
}
func (*InternalBuilder) CalcRequiredSize ¶
func (w *InternalBuilder) CalcRequiredSize() Offset
func (*InternalBuilder) GetSize ¶
func (w *InternalBuilder) GetSize() Offset
func (*InternalBuilder) HexDumpBool ¶ added in v0.3.2
func (w *InternalBuilder) HexDumpBool(prefix string, offsetFromStart Offset, fieldName string, v bool)
func (*InternalBuilder) HexDumpBoolArray ¶ added in v0.3.2
func (w *InternalBuilder) HexDumpBoolArray(prefix string, offsetFromStart Offset, fieldName string, v []bool)
func (*InternalBuilder) HexDumpBytes ¶
func (w *InternalBuilder) HexDumpBytes(prefix string, offsetFromStart Offset, fieldName string, v []byte)
func (*InternalBuilder) HexDumpBytes20 ¶ added in v0.3.1
func (w *InternalBuilder) HexDumpBytes20(prefix string, offsetFromStart Offset, fieldName string, v [20]byte)
func (*InternalBuilder) HexDumpBytes20Array ¶ added in v0.3.1
func (w *InternalBuilder) HexDumpBytes20Array(prefix string, offsetFromStart Offset, fieldName string, v [][20]byte)
func (*InternalBuilder) HexDumpBytes32 ¶ added in v0.3.1
func (w *InternalBuilder) HexDumpBytes32(prefix string, offsetFromStart Offset, fieldName string, v [32]byte)
func (*InternalBuilder) HexDumpBytes32Array ¶ added in v0.3.1
func (w *InternalBuilder) HexDumpBytes32Array(prefix string, offsetFromStart Offset, fieldName string, v [][32]byte)
func (*InternalBuilder) HexDumpBytesArray ¶
func (w *InternalBuilder) HexDumpBytesArray(prefix string, offsetFromStart Offset, fieldName string, v [][]byte)
func (*InternalBuilder) HexDumpMessage ¶
func (w *InternalBuilder) HexDumpMessage(prefix string, offsetFromStart Offset, fieldName string, v MessageWriter) (err error)
func (*InternalBuilder) HexDumpMessageArray ¶
func (w *InternalBuilder) HexDumpMessageArray(prefix string, offsetFromStart Offset, fieldName string, v []MessageWriter) (err error)
func (*InternalBuilder) HexDumpString ¶
func (w *InternalBuilder) HexDumpString(prefix string, offsetFromStart Offset, fieldName string, v string)
func (*InternalBuilder) HexDumpStringArray ¶
func (w *InternalBuilder) HexDumpStringArray(prefix string, offsetFromStart Offset, fieldName string, v []string)
func (*InternalBuilder) HexDumpUint16 ¶
func (w *InternalBuilder) HexDumpUint16(prefix string, offsetFromStart Offset, fieldName string, v uint16)
func (*InternalBuilder) HexDumpUint16Array ¶
func (w *InternalBuilder) HexDumpUint16Array(prefix string, offsetFromStart Offset, fieldName string, v []uint16)
func (*InternalBuilder) HexDumpUint256 ¶ added in v0.3.2
func (*InternalBuilder) HexDumpUint256Array ¶ added in v0.3.2
func (*InternalBuilder) HexDumpUint32 ¶
func (w *InternalBuilder) HexDumpUint32(prefix string, offsetFromStart Offset, fieldName string, v uint32)
func (*InternalBuilder) HexDumpUint32Array ¶
func (w *InternalBuilder) HexDumpUint32Array(prefix string, offsetFromStart Offset, fieldName string, v []uint32)
func (*InternalBuilder) HexDumpUint64 ¶
func (w *InternalBuilder) HexDumpUint64(prefix string, offsetFromStart Offset, fieldName string, v uint64)
func (*InternalBuilder) HexDumpUint64Array ¶
func (w *InternalBuilder) HexDumpUint64Array(prefix string, offsetFromStart Offset, fieldName string, v []uint64)
func (*InternalBuilder) HexDumpUint8 ¶
func (w *InternalBuilder) HexDumpUint8(prefix string, offsetFromStart Offset, fieldName string, v uint8)
func (*InternalBuilder) HexDumpUint8Array ¶
func (w *InternalBuilder) HexDumpUint8Array(prefix string, offsetFromStart Offset, fieldName string, v []uint8)
func (*InternalBuilder) HexDumpUnionIndex ¶
func (w *InternalBuilder) HexDumpUnionIndex(prefix string, offsetFromStart Offset, fieldName string, unionIndex uint16)
func (*InternalBuilder) NotifyBuildEnd ¶
func (w *InternalBuilder) NotifyBuildEnd()
func (*InternalBuilder) NotifyBuildStart ¶
func (w *InternalBuilder) NotifyBuildStart()
func (*InternalBuilder) Reset ¶
func (w *InternalBuilder) Reset()
func (*InternalBuilder) WriteBool ¶ added in v0.3.2
func (w *InternalBuilder) WriteBool(buf []byte, v bool)
func (*InternalBuilder) WriteBoolArray ¶ added in v0.3.2
func (w *InternalBuilder) WriteBoolArray(buf []byte, v []bool)
func (*InternalBuilder) WriteBytes ¶
func (w *InternalBuilder) WriteBytes(buf []byte, v []byte)
func (*InternalBuilder) WriteBytes20 ¶ added in v0.3.1
func (w *InternalBuilder) WriteBytes20(buf []byte, v [20]byte)
func (*InternalBuilder) WriteBytes20Array ¶ added in v0.3.1
func (w *InternalBuilder) WriteBytes20Array(buf []byte, v [][20]byte)
func (*InternalBuilder) WriteBytes32 ¶ added in v0.3.1
func (w *InternalBuilder) WriteBytes32(buf []byte, v [32]byte)
func (*InternalBuilder) WriteBytes32Array ¶ added in v0.3.1
func (w *InternalBuilder) WriteBytes32Array(buf []byte, v [][32]byte)
func (*InternalBuilder) WriteBytesArray ¶
func (w *InternalBuilder) WriteBytesArray(buf []byte, v [][]byte)
func (*InternalBuilder) WriteMessage ¶
func (w *InternalBuilder) WriteMessage(buf []byte, v MessageWriter) (err error)
func (*InternalBuilder) WriteMessageArray ¶
func (w *InternalBuilder) WriteMessageArray(buf []byte, v []MessageWriter) (err error)
func (*InternalBuilder) WriteOverrideWithRawBuffer ¶
func (w *InternalBuilder) WriteOverrideWithRawBuffer(buf []byte, overrideWithRawBuffer []byte) error
instead of implementing Write with the actual fields, this allows to take a ready-made raw buffer
func (*InternalBuilder) WriteString ¶
func (w *InternalBuilder) WriteString(buf []byte, v string)
func (*InternalBuilder) WriteStringArray ¶
func (w *InternalBuilder) WriteStringArray(buf []byte, v []string)
func (*InternalBuilder) WriteUint16 ¶
func (w *InternalBuilder) WriteUint16(buf []byte, v uint16)
func (*InternalBuilder) WriteUint16Array ¶
func (w *InternalBuilder) WriteUint16Array(buf []byte, v []uint16)
func (*InternalBuilder) WriteUint256 ¶ added in v0.3.2
func (w *InternalBuilder) WriteUint256(buf []byte, v *big.Int)
func (*InternalBuilder) WriteUint256Array ¶ added in v0.3.2
func (w *InternalBuilder) WriteUint256Array(buf []byte, v []*big.Int)
func (*InternalBuilder) WriteUint32 ¶
func (w *InternalBuilder) WriteUint32(buf []byte, v uint32)
func (*InternalBuilder) WriteUint32Array ¶
func (w *InternalBuilder) WriteUint32Array(buf []byte, v []uint32)
func (*InternalBuilder) WriteUint64 ¶
func (w *InternalBuilder) WriteUint64(buf []byte, v uint64)
func (*InternalBuilder) WriteUint64Array ¶
func (w *InternalBuilder) WriteUint64Array(buf []byte, v []uint64)
func (*InternalBuilder) WriteUint8 ¶
func (w *InternalBuilder) WriteUint8(buf []byte, v uint8)
func (*InternalBuilder) WriteUint8Array ¶
func (w *InternalBuilder) WriteUint8Array(buf []byte, v []uint8)
func (*InternalBuilder) WriteUnionIndex ¶
func (w *InternalBuilder) WriteUnionIndex(buf []byte, unionIndex uint16)
type InternalMessage ¶
type InternalMessage struct { sync.Mutex // only used by to trick race detector (see calc_offsets_mutex.go) // contains filtered or unexported fields }
func (*InternalMessage) GetBool ¶ added in v0.3.2
func (m *InternalMessage) GetBool(fieldNum int) bool
func (*InternalMessage) GetBoolArrayIterator ¶ added in v0.3.2
func (m *InternalMessage) GetBoolArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetBoolArrayIteratorInOffset ¶ added in v0.3.2
func (m *InternalMessage) GetBoolArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetBoolInOffset ¶ added in v0.3.2
func (m *InternalMessage) GetBoolInOffset(off Offset) bool
func (*InternalMessage) GetBytes ¶
func (m *InternalMessage) GetBytes(fieldNum int) []byte
func (*InternalMessage) GetBytes20 ¶ added in v0.3.1
func (m *InternalMessage) GetBytes20(fieldNum int) [20]byte
func (*InternalMessage) GetBytes20ArrayIterator ¶ added in v0.3.1
func (m *InternalMessage) GetBytes20ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetBytes20ArrayIteratorInOffset ¶ added in v0.3.1
func (m *InternalMessage) GetBytes20ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetBytes20InOffset ¶ added in v0.3.1
func (m *InternalMessage) GetBytes20InOffset(off Offset) [20]byte
func (*InternalMessage) GetBytes32 ¶ added in v0.3.1
func (m *InternalMessage) GetBytes32(fieldNum int) [32]byte
func (*InternalMessage) GetBytes32ArrayIterator ¶ added in v0.3.1
func (m *InternalMessage) GetBytes32ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetBytes32ArrayIteratorInOffset ¶ added in v0.3.1
func (m *InternalMessage) GetBytes32ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetBytes32InOffset ¶ added in v0.3.1
func (m *InternalMessage) GetBytes32InOffset(off Offset) [32]byte
func (*InternalMessage) GetBytesArrayIterator ¶
func (m *InternalMessage) GetBytesArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetBytesArrayIteratorInOffset ¶
func (m *InternalMessage) GetBytesArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetBytesInOffset ¶
func (m *InternalMessage) GetBytesInOffset(off Offset) []byte
func (*InternalMessage) GetMessage ¶
func (m *InternalMessage) GetMessage(fieldNum int) (buf []byte, size Offset)
func (*InternalMessage) GetMessageArrayIterator ¶
func (m *InternalMessage) GetMessageArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetMessageArrayIteratorInOffset ¶
func (m *InternalMessage) GetMessageArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetMessageInOffset ¶
func (m *InternalMessage) GetMessageInOffset(off Offset) (buf []byte, size Offset)
func (*InternalMessage) GetOffsetInOffset ¶
func (m *InternalMessage) GetOffsetInOffset(off Offset) Offset
func (*InternalMessage) GetString ¶
func (m *InternalMessage) GetString(fieldNum int) string
func (*InternalMessage) GetStringArrayIterator ¶
func (m *InternalMessage) GetStringArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetStringArrayIteratorInOffset ¶
func (m *InternalMessage) GetStringArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetStringInOffset ¶
func (m *InternalMessage) GetStringInOffset(off Offset) string
func (*InternalMessage) GetUint16 ¶
func (m *InternalMessage) GetUint16(fieldNum int) uint16
func (*InternalMessage) GetUint16ArrayIterator ¶
func (m *InternalMessage) GetUint16ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetUint16ArrayIteratorInOffset ¶
func (m *InternalMessage) GetUint16ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetUint16InOffset ¶
func (m *InternalMessage) GetUint16InOffset(off Offset) uint16
func (*InternalMessage) GetUint256 ¶ added in v0.3.2
func (m *InternalMessage) GetUint256(fieldNum int) *big.Int
func (*InternalMessage) GetUint256ArrayIterator ¶ added in v0.3.2
func (m *InternalMessage) GetUint256ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetUint256ArrayIteratorInOffset ¶ added in v0.3.2
func (m *InternalMessage) GetUint256ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetUint256InOffset ¶ added in v0.3.2
func (m *InternalMessage) GetUint256InOffset(off Offset) *big.Int
func (*InternalMessage) GetUint32 ¶
func (m *InternalMessage) GetUint32(fieldNum int) uint32
func (*InternalMessage) GetUint32ArrayIterator ¶
func (m *InternalMessage) GetUint32ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetUint32ArrayIteratorInOffset ¶
func (m *InternalMessage) GetUint32ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetUint32InOffset ¶
func (m *InternalMessage) GetUint32InOffset(off Offset) uint32
func (*InternalMessage) GetUint64 ¶
func (m *InternalMessage) GetUint64(fieldNum int) uint64
func (*InternalMessage) GetUint64ArrayIterator ¶
func (m *InternalMessage) GetUint64ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetUint64ArrayIteratorInOffset ¶
func (m *InternalMessage) GetUint64ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetUint64InOffset ¶
func (m *InternalMessage) GetUint64InOffset(off Offset) uint64
func (*InternalMessage) GetUint8 ¶
func (m *InternalMessage) GetUint8(fieldNum int) uint8
func (*InternalMessage) GetUint8ArrayIterator ¶
func (m *InternalMessage) GetUint8ArrayIterator(fieldNum int) *Iterator
func (*InternalMessage) GetUint8ArrayIteratorInOffset ¶
func (m *InternalMessage) GetUint8ArrayIteratorInOffset(off Offset) *Iterator
func (*InternalMessage) GetUint8InOffset ¶
func (m *InternalMessage) GetUint8InOffset(off Offset) uint8
func (*InternalMessage) GetUnionIndex ¶
func (m *InternalMessage) GetUnionIndex(fieldNum int, unionNum int) uint16
func (*InternalMessage) Init ¶
func (m *InternalMessage) Init(buf []byte, size Offset, scheme []FieldType, unions [][]FieldType)
func (*InternalMessage) IsUnionIndex ¶
func (*InternalMessage) IsValid ¶
func (m *InternalMessage) IsValid() bool
func (*InternalMessage) RawBuffer ¶
func (m *InternalMessage) RawBuffer() []byte
func (*InternalMessage) RawBufferForField ¶
func (m *InternalMessage) RawBufferForField(fieldNum int, unionNum int) []byte
func (*InternalMessage) RawBufferWithHeaderForField ¶
func (m *InternalMessage) RawBufferWithHeaderForField(fieldNum int, unionNum int) []byte
func (*InternalMessage) SetBool ¶ added in v0.3.2
func (m *InternalMessage) SetBool(fieldNum int, v bool) error
func (*InternalMessage) SetBoolInOffset ¶ added in v0.3.2
func (m *InternalMessage) SetBoolInOffset(off Offset, v bool)
func (*InternalMessage) SetBytes20 ¶ added in v0.3.1
func (m *InternalMessage) SetBytes20(fieldNum int, v [20]byte) error
func (*InternalMessage) SetBytes20InOffset ¶ added in v0.3.1
func (m *InternalMessage) SetBytes20InOffset(off Offset, v [20]byte) error
func (*InternalMessage) SetBytes32 ¶ added in v0.3.1
func (m *InternalMessage) SetBytes32(fieldNum int, v [32]byte) error
func (*InternalMessage) SetBytes32InOffset ¶ added in v0.3.1
func (m *InternalMessage) SetBytes32InOffset(off Offset, v [32]byte) error
func (*InternalMessage) SetBytesInOffset ¶
func (m *InternalMessage) SetBytesInOffset(off Offset, v []byte) error
func (*InternalMessage) SetString ¶
func (m *InternalMessage) SetString(fieldNum int, v string) error
func (*InternalMessage) SetStringInOffset ¶
func (m *InternalMessage) SetStringInOffset(off Offset, v string) error
func (*InternalMessage) SetUint16 ¶
func (m *InternalMessage) SetUint16(fieldNum int, v uint16) error
func (*InternalMessage) SetUint16InOffset ¶
func (m *InternalMessage) SetUint16InOffset(off Offset, v uint16)
func (*InternalMessage) SetUint256 ¶ added in v0.3.2
func (m *InternalMessage) SetUint256(fieldNum int, v *big.Int) error
func (*InternalMessage) SetUint256InOffset ¶ added in v0.3.2
func (m *InternalMessage) SetUint256InOffset(off Offset, v *big.Int) error
func (*InternalMessage) SetUint32 ¶
func (m *InternalMessage) SetUint32(fieldNum int, v uint32) error
func (*InternalMessage) SetUint32InOffset ¶
func (m *InternalMessage) SetUint32InOffset(off Offset, v uint32)
func (*InternalMessage) SetUint64 ¶
func (m *InternalMessage) SetUint64(fieldNum int, v uint64) error
func (*InternalMessage) SetUint64InOffset ¶
func (m *InternalMessage) SetUint64InOffset(off Offset, v uint64)
func (*InternalMessage) SetUint8InOffset ¶
func (m *InternalMessage) SetUint8InOffset(off Offset, v uint8)
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) NextBytes20 ¶ added in v0.3.1
func (*Iterator) NextBytes32 ¶ added in v0.3.1
func (*Iterator) NextMessage ¶
func (*Iterator) NextString ¶
func (*Iterator) NextUint16 ¶
func (*Iterator) NextUint256 ¶ added in v0.3.2
func (*Iterator) NextUint32 ¶
func (*Iterator) NextUint64 ¶
type MessageWriter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.