encoder

package
v0.0.0-...-8d0f603 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

func StringFromUUID

func StringFromUUID(b []byte) string

func StringToUnicode

func StringToUnicode(s string) []byte

func UUIDFromString

func UUIDFromString(s string) []byte

func UnicodeToString

func UnicodeToString(b []byte) string

func Unmarshal

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

Types

type BinaryMarshallable

type BinaryMarshallable interface {
	MarshalBinary(*Metadata) ([]byte, error)
	UnmarshalBinary([]byte, *Metadata) error
}

type Metadata

type Metadata struct {
	Tags       *TagMap
	Lens       map[string]uint64
	Offsets    map[string]uint64
	Parent     interface{}
	ParentBuf  []byte
	CurrOffset uint64
	CurrField  string
}

type TagMap

type TagMap struct {
	// contains filtered or unexported fields
}

func (TagMap) Get

func (t TagMap) Get(key string) interface{}

func (TagMap) GetInt

func (t TagMap) GetInt(key string) (int, error)

func (TagMap) GetString

func (t TagMap) GetString(key string) (string, error)

func (TagMap) Has

func (t TagMap) Has(key string) bool

func (TagMap) Set

func (t TagMap) Set(key string, val interface{})

Jump to

Keyboard shortcuts

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