encode

package
v0.0.0-...-0f28e9b Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encode

type Encode interface {
	Marshal(message interface{}) ([]byte, error)
	Unmarshal(buf []byte, obj interface{}) error
}

func NewEncode

func NewEncode(name string) Encode

type JsonEncoder

type JsonEncoder struct {
}

func (*JsonEncoder) Marshal

func (x *JsonEncoder) Marshal(message interface{}) ([]byte, error)

func (*JsonEncoder) Unmarshal

func (x *JsonEncoder) Unmarshal(buf []byte, obj interface{}) error

type ProtoBufBase64Encoder

type ProtoBufBase64Encoder struct {
}

func (*ProtoBufBase64Encoder) Marshal

func (x *ProtoBufBase64Encoder) Marshal(message interface{}) ([]byte, error)

func (*ProtoBufBase64Encoder) Unmarshal

func (x *ProtoBufBase64Encoder) Unmarshal(buf []byte, obj interface{}) error

type ProtoBufEncoder

type ProtoBufEncoder struct {
}

func (*ProtoBufEncoder) Marshal

func (x *ProtoBufEncoder) Marshal(message interface{}) ([]byte, error)

func (*ProtoBufEncoder) Unmarshal

func (x *ProtoBufEncoder) Unmarshal(buf []byte, obj interface{}) error

Jump to

Keyboard shortcuts

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