byteutil

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bytes2X_CMD = map[string]interface{}{
	"string": BytesToString,

	"uint16": BytesToUint16,
	"uint32": BytesToUint32,
	"uint64": BytesToUint64,

	"int":   BytesToInt,
	"int16": BytesToInt16,
	"int32": BytesToInt32,
	"int64": BytesToInt64,

	"*syscontracts.NodeInfo":     BytesToNodeInfo,
	"*syscontracts.UpdateNode":   BytesToUpdateNode,
	"*syscontracts.UserInfo":     BytesToUserInfo,
	"*syscontracts.UserDescInfo": BytesToUserDescInfo,
	"common.Address":             HexBytesToAddress,
}

Functions

func BoolToBytes

func BoolToBytes(b bool) []byte

func BytesToInt

func BytesToInt(b []byte) int

func BytesToInt16

func BytesToInt16(b []byte) int16

func BytesToInt32

func BytesToInt32(b []byte) int32

func BytesToInt64

func BytesToInt64(b []byte) int64

func BytesToNodeInfo

func BytesToNodeInfo(curByte []byte) *syscontracts.NodeInfo

func BytesToString

func BytesToString(curByte []byte) string

func BytesToUint16

func BytesToUint16(b []byte) uint16

func BytesToUint32

func BytesToUint32(b []byte) uint32

func BytesToUint64

func BytesToUint64(b []byte) uint64

func BytesToUpdateNode

func BytesToUpdateNode(curByte []byte) *syscontracts.UpdateNode

func BytesToUserDescInfo

func BytesToUserDescInfo(curByte []byte) *syscontracts.UserDescInfo

func BytesToUserInfo

func BytesToUserInfo(curByte []byte) *syscontracts.UserInfo

func ConvertBytesTo

func ConvertBytesTo(input []byte, targetType string) reflect.Value

func HexBytesToAddress

func HexBytesToAddress(curByte []byte) common.Address

func Int32ToBytes

func Int32ToBytes(i int32) []byte

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func Uint64ToBytes

func Uint64ToBytes(n uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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