byteutil

package
v1.8.17-0...-7deff2d Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

create by platon

Index

Constants

This section is empty.

Variables

View Source
var Command = map[string]interface{}{
	"string":            BytesToString,
	"[]uint8":           OriginBytes,
	"[64]uint8":         BytesTo64Bytes,
	"[32]uint8":         BytesTo32Bytes,
	"int":               BytesToInt,
	"*big.Int":          BytesToBigInt,
	"uint32":            BytesTouint32,
	"uint64":            BytesTouint64,
	"int32":             common.BytesToInt32,
	"int64":             common.BytesToInt64,
	"float32":           common.BytesToFloat32,
	"float64":           common.BytesToFloat64,
	"discover.NodeID":   BytesToNodeId,
	"[]discover.NodeID": ArrBytesToNodeId,
	"common.Hash":       BytesToHash,
	"[]common.Hash":     ArrBytesToHash,
	"common.Address":    BytesToAddress,
}

Functions

func ArrBytesToHash

func ArrBytesToHash(curByte []byte) []common.Hash

func ArrBytesToNodeId

func ArrBytesToNodeId(curByte []byte) []discover.NodeID

func BytesTo32Bytes

func BytesTo32Bytes(curByte []byte) [32]byte

func BytesTo64Bytes

func BytesTo64Bytes(curByte []byte) [64]byte

func BytesToAddress

func BytesToAddress(curByte []byte) common.Address

func BytesToBigInt

func BytesToBigInt(curByte []byte) *big.Int

func BytesToHash

func BytesToHash(curByte []byte) common.Hash

func BytesToInt

func BytesToInt(curByte []byte) int

func BytesToNodeId

func BytesToNodeId(curByte []byte) discover.NodeID

func BytesToString

func BytesToString(curByte []byte) string

func BytesTouint32

func BytesTouint32(b []byte) uint32

func BytesTouint64

func BytesTouint64(b []byte) uint64

func HexToAddress

func HexToAddress(b []byte) common.Address

func IntToBytes

func IntToBytes(curInt int) []byte

func OriginBytes

func OriginBytes(curByte []byte) []byte

func Uint32ToBytes

func Uint32ToBytes(val uint32) []byte

func Uint64ToBytes

func Uint64ToBytes(val 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