serialize

package
v0.0.0-...-85cd7ee Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 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 JsonSerializer

type JsonSerializer[V any] struct{}

func (*JsonSerializer[V]) Decode

func (*JsonSerializer[V]) Decode(ctx context.Context, value string) (V, error)

func (*JsonSerializer[V]) Encode

func (*JsonSerializer[V]) Encode(ctx context.Context, value V) (string, error)

type ProtoSerializer

type ProtoSerializer[V proto.Message] struct{}

func (*ProtoSerializer[V]) Decode

func (*ProtoSerializer[V]) Decode(ctx context.Context, value string) (V, error)

func (*ProtoSerializer[V]) Encode

func (*ProtoSerializer[V]) Encode(ctx context.Context, value V) (string, error)

type Serialize

type Serialize[V any] interface {
	Encode(ctx context.Context, value V) (string, error)
	Decode(ctx context.Context, value string) (V, error)
}

type YamlSerializer

type YamlSerializer[V any] struct{}

func (*YamlSerializer[V]) Decode

func (*YamlSerializer[V]) Decode(ctx context.Context, value string) (V, error)

func (*YamlSerializer[V]) Encode

func (*YamlSerializer[V]) Encode(ctx context.Context, value V) (string, error)

Jump to

Keyboard shortcuts

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