encoding

package
v0.211.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package encoding defines the internal encoding that FTL uses to encode and decode messages. It is currently JSON.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(ctx context.Context, v any) ([]byte, error)

func Unmarshal added in v0.133.2

func Unmarshal(ctx context.Context, data []byte, v any) error

Types

type OptionMarshaler added in v0.203.0

type OptionMarshaler interface {
	Marshal(ctx context.Context, w *bytes.Buffer, encode func(ctx context.Context, v reflect.Value, w *bytes.Buffer) error) error
}

type OptionUnmarshaler added in v0.203.0

type OptionUnmarshaler interface {
	Unmarshal(ctx context.Context, d *json.Decoder, isNull bool, decode func(ctx context.Context, d *json.Decoder, v reflect.Value) error) error
}

Jump to

Keyboard shortcuts

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