codec

package
v0.0.0-...-78a6345 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Marshal(v interface{}) ([]byte, error)
	UnMarshal([]byte, interface{}) error
}

type JsonCodec

type JsonCodec struct{}

func (JsonCodec) Marshal

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

func (JsonCodec) UnMarshal

func (JsonCodec) UnMarshal(b []byte, v interface{}) error

type ProtoCodec

type ProtoCodec struct{}

func (*ProtoCodec) Marshal

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

func (*ProtoCodec) UnMarshal

func (p *ProtoCodec) UnMarshal(b []byte, v interface{}) error

Jump to

Keyboard shortcuts

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