encoder

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: GPL-3.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilWriter  = errors.New("writer is nil")
	ErrNilBody    = errors.New("body cannot be nil")
	ErrNilEncoder = errors.New("encoder is nil")
)

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(
		body any,
	) ([]byte, error)
	EncodeAndWrite(
		writer io.Writer,
		beforeWriteFn func() error,
		body any,
	) error
}

Encoder interface

type ProtoJSONEncoder

type ProtoJSONEncoder interface {
	Encoder
	PrecomputeMarshal(
		body any,
	) (map[string]any, error)
}

ProtoJSONEncoder interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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