protobuf

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Unmarshal = proto.Unmarshal

Functions

func FieldsToMap added in v1.7.1

func FieldsToMap(fields []Field) map[protowire.Number]any

Types

type Field added in v1.7.1

type Field struct {
	Number protowire.Number
	Wire   protowire.Type
	Kind   Kind
	Value  any
}

func DecodeMessage added in v1.7.1

func DecodeMessage(b []byte) ([]Field, error)

type Kind added in v1.7.1

type Kind int
const (
	KindVarint Kind = iota
	KindFixed32
	KindFixed64
	KindBytes
	KindString
	KindMessage
	KindPackedVarint
	KindPackedFixed32
	KindPackedFixed64
	KindGroup
)

type Marshaler added in v1.7.4

type Marshaler interface {
	MarshalProto() ([]byte, error)
}

type Unmarshaler added in v1.7.4

type Unmarshaler interface {
	UnmarshalProto([]byte) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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