def

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PositiveFixIntMin = 0x00
	PositiveFixIntMax = 0x7f

	FixMap   = 0x80
	FixArray = 0x90
	FixStr   = 0xa0

	Nil = 0xc0

	False = 0xc2
	True  = 0xc3

	Bin8  = 0xc4
	Bin16 = 0xc5
	Bin32 = 0xc6

	Ext8  = 0xc7
	Ext16 = 0xc8
	Ext32 = 0xc9

	Float32 = 0xca
	Float64 = 0xcb

	Uint8  = 0xcc
	Uint16 = 0xcd
	Uint32 = 0xce
	Uint64 = 0xcf

	Int8  = 0xd0
	Int16 = 0xd1
	Int32 = 0xd2
	Int64 = 0xd3

	Fixext1  = 0xd4
	Fixext2  = 0xd5
	Fixext4  = 0xd6
	Fixext8  = 0xd7
	Fixext16 = 0xd8

	Str8  = 0xd9
	Str16 = 0xda
	Str32 = 0xdb

	Array16 = 0xdc
	Array32 = 0xdd

	Map16 = 0xde
	Map32 = 0xdf

	NegativeFixintMin = -32 // 0xe0
	NegativeFixintMax = -1  // 0xff
)

message pack format

View Source
const (
	Byte1 = 1 << iota
	Byte2
	Byte4
	Byte8
	Byte16
	Byte32
)

byte

View Source
const IntSize = 32 << (^uint(0) >> 63)

IntSize : 32 or 64

View Source
const (
	TimeStamp = -1
)

ext type

Variables

View Source
var (
	ErrMsgpack = errors.New("")

	ErrNoData                 = fmt.Errorf("%wno data", ErrMsgpack)
	ErrHasLeftOver            = fmt.Errorf("%wdata has left over", ErrMsgpack)
	ErrReceiverNotPointer     = fmt.Errorf("%wreceiver not pointer", ErrMsgpack)
	ErrNotMatchArrayElement   = fmt.Errorf("%wnot match array element", ErrMsgpack)
	ErrCanNotDecode           = fmt.Errorf("%winvalid code", ErrMsgpack)
	ErrCanNotSetSliceAsMapKey = fmt.Errorf("%wcan not set slice as map key", ErrMsgpack)
	ErrCanNotSetMapAsMapKey   = fmt.Errorf("%wcan not set map as map key", ErrMsgpack)

	ErrTooShortBytes         = fmt.Errorf("%wtoo short bytes", ErrMsgpack)
	ErrLackDataLengthToSlice = fmt.Errorf("%wdata length lacks to create slice", ErrMsgpack)
	ErrLackDataLengthToMap   = fmt.Errorf("%wdata length lacks to create map", ErrMsgpack)
	ErrUnsupportedType       = fmt.Errorf("%wunsupported type", ErrMsgpack)
	ErrUnsupportedLength     = fmt.Errorf("%wunsupported length", ErrMsgpack)
	ErrNotMatchLastIndex     = fmt.Errorf("%wnot match last index", ErrMsgpack)
)
View Source
var IsIntSize32 = IntSize == 32

Functions

func ComplexTypeCode

func ComplexTypeCode() int8

ComplexTypeCode gets complexTypeCode

func SetComplexTypeCode

func SetComplexTypeCode(code int8)

SetComplexTypeCode sets complexTypeCode

Types

This section is empty.

Jump to

Keyboard shortcuts

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