protobuf

package
v1.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Unmarshal = proto.Unmarshal

Functions

func DescriptorProtoFromStruct added in v1.7.1

func DescriptorProtoFromStruct(v any) (*descriptorpb.DescriptorProto, error)

DescriptorProtoFromStruct untest

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
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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