protobuf

package
v0.0.0-...-7b461c4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Number Number
	Value  interface{}
}

func (Message) String

func (m Message) String() string

type Number

type Number int32

Number represents the field number.

type ProtoDescriptor

type ProtoDescriptor struct {
	MainObjectConstructorFn func() interface{}
	MessageProcessorFns     map[Number]func(interface{}, Message)
}

type ProtobufReader

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

func NewProtobufReader

func NewProtobufReader(fileReader io.ReadCloser, protoDescriptor ProtoDescriptor) *ProtobufReader

func (*ProtobufReader) Unmarshal

func (pbr *ProtobufReader) Unmarshal() (mainObject interface{}, err error)

type Type

type Type int8

Type represents the wire type.

const (
	VarintType     Type = 0
	Fixed32Type    Type = 5
	Fixed64Type    Type = 1
	BytesType      Type = 2
	StartGroupType Type = 3
	EndGroupType   Type = 4
)

Jump to

Keyboard shortcuts

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