encoder

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0, ISC, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromSmbString

func FromSmbString(d []byte) (string, error)

func FromUnicode

func FromUnicode(d []byte) (string, error)

func Marshal

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

func ToSmbString

func ToSmbString(s string) []byte

func ToUnicode

func ToUnicode(s string) []byte

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