codec

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(c *Codec)

Types

type Codec

type Codec struct {
	Input  Decoder
	Output Encoder
}

type Decoder

type Decoder interface {
	Decode(src io.Reader, dst any) error
}

type Encoder

type Encoder interface {
	Encode(src any, dst io.Writer) error
}

type JSON

type JSON struct{}

func (JSON) Decode

func (c JSON) Decode(src io.Reader, dst any) error

func (JSON) Encode

func (c JSON) Encode(src any, dst io.Writer) error

type XML

type XML struct{}

func (XML) Decode

func (c XML) Decode(src io.Reader, dst any) error

func (XML) Encode

func (c XML) Encode(src any, dst io.Writer) error

Jump to

Keyboard shortcuts

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