typeddata

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// TypeNull const for TypedData type
	TypeNull byte = 0
	// TypeBoolean const for TypedData type
	TypeBoolean byte = 1
	// TypeInt32 const for TypedData type
	TypeInt32 byte = 2
	// TypeUInt32 const for TypedData type
	TypeUInt32 byte = 3
	// TypeInt64 const for TypedData type
	TypeInt64 byte = 4
	// TypeUInt64 const for TypedData type
	TypeUInt64 byte = 5
	// TypeIPv4 const for TypedData type
	TypeIPv4 byte = 6
	// TypeIPv6 const for TypedData type
	TypeIPv6 byte = 7
	// TypeString const for TypedData type
	TypeString byte = 8
	// TypeBinary const for TypedData type
	TypeBinary byte = 9
)

Variables

View Source
var ErrDecodingBufferTooSmall = errors.New("decoding buffer too small")

ErrDecodingBufferTooSmall describe error for too small decoding buffer

View Source
var ErrEmptyBuffer = errors.New("empty buffer for decode")

ErrEmptyBuffer describe error, if passed empty buffer for decoding

Functions

func Decode

func Decode(buf []byte) (data interface{}, n int, err error)

Decode TypedData value Returns decoded variable, bytes count and error

func Encode

func Encode(data interface{}, buf []byte) ([]byte, int, error)

Encode variable to TypedData value returns filled buffer, count of bytes and error

Types

This section is empty.

Jump to

Keyboard shortcuts

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