serializer

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 4 Imported by: 0

README

serializer

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotEncode = errors.New("cannot encode")

Functions

func Decode

func Decode(b []byte) any

func Encode

func Encode(value any) []byte

func RegisterType

func RegisterType(value any, typeId TypeId)

Types

type TypeId

type TypeId uint16
const (
	TypeIdUnknown TypeId = 0
	TypeIdBool    TypeId = 1
	TypeIdInt     TypeId = 2
	TypeIdInt8    TypeId = 3
	TypeIdInt16   TypeId = 4
	TypeIdInt32   TypeId = 5
	TypeIdInt64   TypeId = 6
	TypeIdUint    TypeId = 7
	TypeIdUint8   TypeId = 8
	TypeIdUint16  TypeId = 9
	TypeIdUint32  TypeId = 10
	TypeIdUint64  TypeId = 11
	TypeIdFloat32 TypeId = 12
	TypeIdFloat64 TypeId = 13
	TypeIdArray   TypeId = 14
	TypeIdMap     TypeId = 15
	TypeIdSlice   TypeId = 16
	TypeIdString  TypeId = 17
)

Jump to

Keyboard shortcuts

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