wire

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatIDs = map[Format][]string{
	PlainText: {"plaintext"},
	Proto:     {"proto"},
}

Functions

This section is empty.

Types

type DecodError

type DecodError struct {
	Format string
	Reason string
	Err    error
}

func ProtoDecodeError

func ProtoDecodeError(baseErr error, reason string) *DecodError

func (*DecodError) Error

func (de *DecodError) Error() string

type Format

type Format enumflag.Flag
const (
	PlainText Format = iota
	Proto
)

type PlaintextDecoder added in v0.2.0

type PlaintextDecoder struct{}

func NewPlaintextDecoder

func NewPlaintextDecoder() *PlaintextDecoder

func (*PlaintextDecoder) Decode added in v0.2.0

func (ptd *PlaintextDecoder) Decode(raw []byte) (string, error)

type ProtoDecoder added in v0.2.0

type ProtoDecoder struct {
	// contains filtered or unexported fields
}

func NewProtoDecoder

func NewProtoDecoder(protoFile, messageType string, includes []string) *ProtoDecoder

func (*ProtoDecoder) Decode added in v0.2.0

func (pd *ProtoDecoder) Decode(raw []byte) (string, error)

Jump to

Keyboard shortcuts

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