encoder

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodeCodec

type EncodeCodec string

type Encoder

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

func DefaultJSONEncoder

func DefaultJSONEncoder() Encoder

func DefaultYAMLEncoder

func DefaultYAMLEncoder() Encoder

type JSONEncoder

type JSONEncoder struct{}

func (JSONEncoder) Marshal

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

func (JSONEncoder) Unmarshal

func (encoder JSONEncoder) Unmarshal(data []byte, v interface{}) error

type YAMLEncoder

type YAMLEncoder struct{}

func (YAMLEncoder) Marshal

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

func (YAMLEncoder) Unmarshal

func (encoder YAMLEncoder) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

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