mcpack

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MCPACKV2_INVALID      = 0x00
	MCPACKV2_OBJECT       = 0x10
	MCPACKV2_ARRAY        = 0x20
	MCPACKV2_STRING       = 0x50
	MCPACKV2_BINARY       = 0x60
	MCPACKV2_INT8         = 0x11
	MCPACKV2_INT16        = 0x12
	MCPACKV2_INT32        = 0x14
	MCPACKV2_INT64        = 0x18
	MCPACKV2_UINT8        = 0x21
	MCPACKV2_UINT16       = 0x22
	MCPACKV2_UINT32       = 0x24
	MCPACKV2_UINT64       = 0x28
	MCPACKV2_BOOL         = 0x31
	MCPACKV2_FLOAT        = 0x44
	MCPACKV2_DOUBLE       = 0x48
	MCPACKV2_DATE         = 0x58
	MCPACKV2_NULL         = 0x61
	MCPACKV2_SHORT_ITEM   = 0x80
	MCPACKV2_FIXED_ITEM   = 0xf0
	MCPACKV2_DELETED_ITEM = 0x70

	MCPACKV2_SHORT_STRING = MCPACKV2_STRING | MCPACKV2_SHORT_ITEM
	MCPACKV2_SHORT_BINARY = MCPACKV2_BINARY | MCPACKV2_SHORT_ITEM

	MCPACKV2_KEY_MAX_LEN = 254

	MAX_SHORT_VITEM_LEN = 255
)

Variables

This section is empty.

Functions

func Float32

func Float32(b []byte) float32

func Float64

func Float64(b []byte) float64

func Int16

func Int16(b []byte) int16

func Int32

func Int32(b []byte) int32

func Int64

func Int64(b []byte) int64

func Int8

func Int8(b []byte) int8

func Marshal

func Marshal(v interface{}) ([]byte, error)

func PutFloat32

func PutFloat32(b []byte, v float32)

func PutFloat64

func PutFloat64(b []byte, v float64)

func PutInt16

func PutInt16(b []byte, v int16)

func PutInt32

func PutInt32(b []byte, v int32)

func PutInt64

func PutInt64(b []byte, v int64)

func PutInt8

func PutInt8(b []byte, v int8)

func PutUint16

func PutUint16(b []byte, v uint16)

func PutUint32

func PutUint32(b []byte, v uint32)

func PutUint64

func PutUint64(b []byte, v uint64)

func PutUint8

func PutUint8(b []byte, v uint8)

func Uint16

func Uint16(b []byte) uint16

func Uint32

func Uint32(b []byte) uint32

func Uint64

func Uint64(b []byte) uint64

func Uint8

func Uint8(b []byte) uint8

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Types

type InvalidUnmarshalError

type InvalidUnmarshalError struct {
	Type reflect.Type
}

func (*InvalidUnmarshalError) Error

func (e *InvalidUnmarshalError) Error() string

type Unmarshaler

type Unmarshaler interface {
	UnmarshalMCPACK([]byte) error
}

Jump to

Keyboard shortcuts

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