proto

package module
v0.0.0-...-b87209e Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package proto implements a marshaler interface for protocol buffers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proto

type Proto struct{}

Proto is a proto marshaler that can encode and decode protocol buffers.

func (*Proto) ContentTypes

func (p *Proto) ContentTypes() []string

ContentTypes returns the list of content types this marshaller is able to handle.

func (*Proto) Decode

func (*Proto) Decode(data []byte, value interface{}) error

Decode decodes proto "data" into "value".

func (*Proto) Decodes

func (p *Proto) Decodes(v any) bool

Decodes returns if this is able to decode the given type.

func (*Proto) Encode

func (*Proto) Encode(value interface{}) ([]byte, error)

Encode encodes "value" into Proto.

func (*Proto) Encodes

func (p *Proto) Encodes(v any) bool

Encodes returns if this is able to encode the given type.

func (*Proto) Exts

func (p *Proto) Exts() []string

Exts is a list of file extensions this marshaler supports.

func (*Proto) NewDecoder

func (p *Proto) NewDecoder(reader io.Reader) codecs.Decoder

NewDecoder returns a Decoder which reads proto stream from "reader".

func (*Proto) NewEncoder

func (p *Proto) NewEncoder(writer io.Writer) codecs.Encoder

NewEncoder returns an Encoder which writes proto stream into "writer".

func (*Proto) String

func (p *Proto) String() string

String returns the codec plugin name.

Jump to

Keyboard shortcuts

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