marshaller

package
v1.78.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

This section is empty.

Types

type Marshaller

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

Compressor allows to have different ways to marshal/unmarshal.

type MsgPack added in v1.78.0

type MsgPack struct{}

MsgPack for marshaller.

func NewMsgPack

func NewMsgPack() *MsgPack

NewMsgPack for marshaller.

func (*MsgPack) Marshal added in v1.78.0

func (m *MsgPack) Marshal(v any) ([]byte, error)

func (*MsgPack) Unmarshal added in v1.78.0

func (m *MsgPack) Unmarshal(data []byte, v any) error

type Proto added in v1.78.0

type Proto struct{}

Proto for marshaller.

func NewProto

func NewProto() *Proto

NewProto for marshaller.

func (*Proto) Marshal added in v1.78.0

func (m *Proto) Marshal(v any) ([]byte, error)

func (*Proto) Unmarshal added in v1.78.0

func (m *Proto) Unmarshal(data []byte, v any) error

type YAML added in v1.78.0

type YAML struct{}

YAML for marshaller.

func NewYAML added in v1.78.0

func NewYAML() *YAML

NewMsgPack for marshaller.

func (*YAML) Marshal added in v1.78.0

func (m *YAML) Marshal(v any) ([]byte, error)

func (*YAML) Unmarshal added in v1.78.0

func (m *YAML) Unmarshal(data []byte, v any) error

Jump to

Keyboard shortcuts

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