codec

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Unmarshal(data []byte) (interface{}, error)
	Marshal(src interface{}) ([]byte, error)
}

func NewWrapped

func NewWrapped(newFN NewObjectFN, codec RawCodec) Codec

type Json

type Json struct{}

func (Json) Marshal

func (Json) Marshal(in interface{}) ([]byte, error)

func (Json) Unmarshal

func (Json) Unmarshal(p []byte, dst interface{}) error

type NewObjectFN

type NewObjectFN func() interface{}

type RawCodec

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

Jump to

Keyboard shortcuts

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