dataencoding

package
v0.0.0-...-48f0ced Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEncodingUnavailable = errors.New("dataencoding: encoding unavailable")
View Source
var NopEncoding = &Encoding{
	Marshal: func(v interface{}) ([]byte, error) {
		return nil, ErrEncodingUnavailable
	},
	Unmarshal: func(data []byte, v interface{}) error {
		return ErrEncodingUnavailable
	},
}

Functions

This section is empty.

Types

type Encoding

type Encoding struct {
	Marshal   func(v interface{}) ([]byte, error)
	Unmarshal func(data []byte, v interface{}) error
}

func (*Encoding) MarshalData

func (e *Encoding) MarshalData(v interface{}) ([]byte, error)

func (*Encoding) UnmarshalData

func (e *Encoding) UnmarshalData(data []byte, v interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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