Help us shape the future of Go! Take the 2026 Go Developer Survey

codec

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT 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[T any, PT *T] interface {
	MarshalBinary(v PT) ([]byte, error)
	UnmarshalBinary(data []byte) (PT, error)
}

type ProtoCodec

type ProtoCodec[T any, PT interface {
	*T
	proto.Message
}] struct {
}

func (ProtoCodec[T, PT]) MarshalBinary

func (codec ProtoCodec[T, PT]) MarshalBinary(v PT) ([]byte, error)

func (ProtoCodec[T, PT]) UnmarshalBinary

func (codec ProtoCodec[T, PT]) UnmarshalBinary(data []byte) (PT, error)

type ProtoJsonCodec

type ProtoJsonCodec[T any, PT interface {
	*T
	proto.Message
}] struct {
}

func (ProtoJsonCodec[T, PT]) MarshalBinary

func (codec ProtoJsonCodec[T, PT]) MarshalBinary(v PT) ([]byte, error)

func (ProtoJsonCodec[T, PT]) UnmarshalBinary

func (codec ProtoJsonCodec[T, PT]) UnmarshalBinary(data []byte) (PT, error)

Jump to

Keyboard shortcuts

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