converter

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter interface {
	Marshal(v any) ([]byte, error)
	Unmarshal(data []byte, v any) error
}

Converter interaface

var (
	JSON Converter = Fnk{/* contains filtered or unexported fields */}
	BSON Converter = Fnk{/* contains filtered or unexported fields */}
	RAW  Converter = Fnk{
			// contains filtered or unexported fields
	}
)

Converters

func ByName

func ByName(name string) Converter

ByName decoder object

type Fnk

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

Fnk decoder wrapper

func (Fnk) Marshal

func (f Fnk) Marshal(v any) ([]byte, error)

Marshal value to data

func (Fnk) String

func (f Fnk) String() string

func (Fnk) Unmarshal

func (f Fnk) Unmarshal(data []byte, v any) error

Unmarshal data to value

Jump to

Keyboard shortcuts

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