proto

package
v2.286.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package proto provides Protocol Buffers (protobuf) encoding helpers and adapters used by go-service.

This package integrates protobuf encoding/decoding behind the go-service encoding abstraction.

Start with the package-level constructors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct{}

Binary implements protobuf binary encoding and decoding.

func NewBinary

func NewBinary() *Binary

NewBinary constructs a protobuf binary encoder.

func (*Binary) Decode

func (e *Binary) Decode(r io.Reader, v any) error

Decode reads protobuf binary from r into v.

func (*Binary) Encode

func (e *Binary) Encode(w io.Writer, v any) error

Encode writes v as protobuf binary to w.

type JSON

type JSON struct{}

JSON implements protobuf JSON encoding and decoding.

func NewJSON

func NewJSON() *JSON

NewJSON constructs a protobuf JSON encoder.

func (*JSON) Decode

func (e *JSON) Decode(r io.Reader, v any) error

Decode reads protobuf JSON from r into v.

func (*JSON) Encode

func (e *JSON) Encode(w io.Writer, v any) error

Encode writes v as protobuf JSON to w.

type Text

type Text struct{}

Text implements protobuf text encoding and decoding.

func NewText

func NewText() *Text

NewText constructs a protobuf text encoder.

func (*Text) Decode

func (e *Text) Decode(r io.Reader, v any) error

Decode reads protobuf text from r into v.

func (*Text) Encode

func (e *Text) Encode(w io.Writer, v any) error

Encode writes v as protobuf text to w.

Jump to

Keyboard shortcuts

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