serializer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Serializers which supported by rpc

Functions

This section is empty.

Types

type ProtoSerializer

type ProtoSerializer struct {
}

ProtoSerializer implements the Serializer interface

func (ProtoSerializer) Marshal

func (_ ProtoSerializer) Marshal(message interface{}) ([]byte, error)

Marshal .

func (ProtoSerializer) Unmarshal

func (_ ProtoSerializer) Unmarshal(data []byte, message interface{}) error

Unmarshal .

type SerializeType

type SerializeType int32

SerializeType serialized type supported by rpc

const (
	Proto SerializeType = iota
)

type Serializer

type Serializer interface {
	Marshal(message interface{}) ([]byte, error)
	Unmarshal(data []byte, message interface{}) error
}

Serializer is interface, each serializer has Marshal and Unmarshal functions

Jump to

Keyboard shortcuts

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