Documentation ¶
Overview ¶
Package encoding provides functions for working with conversions of numbers, structures, strings and bytes.
Package functions: 1. HexEncode/HexDecode 2. Uint64ToBytes/BytesToUint64 3. Serialize/Deserialize
Index ¶
- Constants
- Variables
- func BytesToUint64(pBytes [cSizeUint64]byte) uint64
- func DeserializeJSON(pData []byte, pRes interface{}) error
- func DeserializeYAML(pData []byte, pRes interface{}) error
- func HexDecode(pData string) []byte
- func HexEncode(pData []byte) string
- func SerializeJSON(pData interface{}) []byte
- func SerializeYAML(pData interface{}) []byte
- func Uint64ToBytes(pNum uint64) [cSizeUint64]byte
Constants ¶
View Source
const (
CSizeUint64 = 8 // bytes
)
Variables ¶
View Source
var (
ErrDeserialize = errors.New("deserialize bytes")
)
Functions ¶
func BytesToUint64 ¶
Slice of bytes to uint64 by big endian.
func DeserializeJSON ¶ added in v1.5.22
func DeserializeYAML ¶ added in v1.5.22
func SerializeJSON ¶ added in v1.5.22
func SerializeJSON(pData interface{}) []byte
func SerializeYAML ¶ added in v1.5.22
func SerializeYAML(pData interface{}) []byte
func Uint64ToBytes ¶
Uint64 to slice of bytes by big endian.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.