cherrySerializer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON struct{}

func NewJSON

func NewJSON() *JSON

func (*JSON) Marshal

func (j *JSON) Marshal(v interface{}) ([]byte, error)

Marshal returns the JSON encoding of v.

func (*JSON) Name

func (j *JSON) Name() string

Name returns the name of the serializer.

func (*JSON) Unmarshal

func (j *JSON) Unmarshal(data []byte, v interface{}) error

Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v.

type Protobuf

type Protobuf struct{}

Protobuf implements the serialize.Protobuf interface

func NewProtobuf

func NewProtobuf() *Protobuf

NewProtobuf NewSerializer returns a new Protobuf.

func (*Protobuf) Marshal

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

Marshal returns the protobuf encoding of v.

func (*Protobuf) Name

func (p *Protobuf) Name() string

Name returns the name of the serializer.

func (*Protobuf) Unmarshal

func (p *Protobuf) Unmarshal(data []byte, v interface{}) error

Unmarshal parses the protobuf-encoded data and stores the result in the value pointed to by v.

Jump to

Keyboard shortcuts

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