serializer

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GobSerializer

type GobSerializer struct{}
var Gob GobSerializer

func (GobSerializer) Deserialize

func (g GobSerializer) Deserialize(b []byte, val interface{}) error

func (GobSerializer) Serialize

func (g GobSerializer) Serialize(val interface{}) ([]byte, error)

type JSONSerializer

type JSONSerializer struct{}
var JSON JSONSerializer

func (JSONSerializer) Deserialize

func (s JSONSerializer) Deserialize(b []byte, val interface{}) error

func (JSONSerializer) Serialize

func (s JSONSerializer) Serialize(val interface{}) ([]byte, error)

type Serializer

type Serializer interface {
	Serialize(val interface{}) ([]byte, error)
	Deserialize(b []byte, val interface{}) error
}

Jump to

Keyboard shortcuts

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