serializer

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaler

type Marshaler interface {
	Marshal(interface{}) ([]byte, error)
}

Marshaler represents a marshal interface

type Serializer

type Serializer interface {
	Marshaler
	Unmarshaler
}

Serializer is the interface that groups the basic Marshal and Unmarshal methods.

type SerializerType

type SerializerType uint32
const (
	Auto SerializerType = iota
	JSON
	Protobuf
	RawString
)

func MustSerializerType added in v1.1.12

func MustSerializerType(s string) SerializerType

func ParseSerializerType added in v1.1.10

func ParseSerializerType(s string) (SerializerType, error)

func (SerializerType) Serializer

func (t SerializerType) Serializer() Serializer

func (SerializerType) String

func (t SerializerType) String() string

type Unmarshaler

type Unmarshaler interface {
	Unmarshal([]byte, interface{}) error
}

Unmarshaler represents a Unmarshal interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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