protobuf

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when the requested message type is not found in the protobuf files.

Functions

This section is empty.

Types

type ProtoBuf

type ProtoBuf struct {
	Files       []string `json:"files"`
	ImportPaths []string `json:"import_paths"`
	MessageType string   `json:"message_type"`
	// contains filtered or unexported fields
}

ProtoBuf provides facilities for dynamically marshaling/unmarshalling protobuf messages.

func (*ProtoBuf) Init

func (pb *ProtoBuf) Init() error

Init initialises the protobuf parser. Only first invocation is processed.

func (*ProtoBuf) Unmarshal

func (pb *ProtoBuf) Unmarshal(d []byte) (*dynamic.Message, error)

Unmarshal reads and parses the protobuf serialised data into an instance of protobuf message.

Jump to

Keyboard shortcuts

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