serde

package
v0.0.0-...-815bbef Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinarySerde

type BinarySerde interface {
	SerializeBinary(value any) ([]byte, error)
	DeserializeBinary(data []byte, valuePtr any) error
}

type JsonSerde

type JsonSerde struct{}

JsonSerde implements the BinarySerde interface using JSON.

func (*JsonSerde) DeserializeBinary

func (j *JsonSerde) DeserializeBinary(data []byte, valuePtr any) error

DeserializeBinary deserializes JSON data into a Go value.

func (*JsonSerde) SerializeBinary

func (j *JsonSerde) SerializeBinary(value any) ([]byte, error)

SerializeBinary serializes a Go value to its JSON representation.

type ProtoSerde

type ProtoSerde struct{}

ProtoSerde implements the BinarySerde interface using Protobuf.

func (*ProtoSerde) DeserializeBinary

func (p *ProtoSerde) DeserializeBinary(data []byte, valuePtr any) error

DeserializeBinary deserializes binary data into a proto.Message.

func (*ProtoSerde) SerializeBinary

func (p *ProtoSerde) SerializeBinary(value any) ([]byte, error)

SerializeBinary serializes a proto.Message to its binary representation.

Jump to

Keyboard shortcuts

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