encoder

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GobEncoder

type GobEncoder struct{}

GobEncoder is a Go specific GOB Encoder implementation for EncodedConn. This encoder will use the builtin encoding/gob to Marshal and Unmarshal most types, including structs.

func (*GobEncoder) Decode

func (g *GobEncoder) Decode(data []byte, vPtr any) error

func (*GobEncoder) Encode

func (g *GobEncoder) Encode(v any) ([]byte, error)

type JsonEncoder

type JsonEncoder struct{}

func (*JsonEncoder) Decode

func (j *JsonEncoder) Decode(data []byte, vPtr any) error

func (*JsonEncoder) Encode

func (j *JsonEncoder) Encode(v any) ([]byte, error)

type ProtoBufEncoder

type ProtoBufEncoder struct{}

ProtoBufEncoder is a protobuf implementation for EncodedConn This encoder will use the builtin protobuf lib to Marshal and Unmarshal structs.

func (*ProtoBufEncoder) Decode

func (p *ProtoBufEncoder) Decode(data []byte, vPtr any) error

func (*ProtoBufEncoder) Encode

func (p *ProtoBufEncoder) Encode(v any) ([]byte, error)

Jump to

Keyboard shortcuts

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