encoding

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder func() Encoder

type Encoder

type Encoder interface {
	Encode(data interface{}) ([]byte, error)
	Decode(data []byte) (interface{}, error)
}

type IntEncoder

type IntEncoder struct{}

func (IntEncoder) Decode

func (IntEncoder) Decode(data []byte) (interface{}, error)

func (IntEncoder) Encode

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

type JsonSerializer

type JsonSerializer struct{}

func NewJsonSerDes

func NewJsonSerDes() *JsonSerializer

func (*JsonSerializer) Decode

func (s *JsonSerializer) Decode(byt []byte, v interface{}) error

func (*JsonSerializer) Encode

func (s *JsonSerializer) Encode(data interface{}) ([]byte, error)

type StringEncoder

type StringEncoder struct{}

func (StringEncoder) Decode

func (s StringEncoder) Decode(data []byte) (interface{}, error)

func (StringEncoder) Encode

func (s StringEncoder) Encode(v interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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