xproto

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBoolValue pref.Value
View Source
var DefaultBytesValue pref.Value
View Source
var DefaultDurationValue pref.Value
View Source
var DefaultEnumValue pref.Value
View Source
var DefaultFloat32Value pref.Value
View Source
var DefaultFloat64Value pref.Value
View Source
var DefaultInt32Value pref.Value
View Source
var DefaultInt64Value pref.Value
View Source
var DefaultStringValue pref.Value
View Source
var DefaultTimestampValue pref.Value
View Source
var DefaultUint32Value pref.Value
View Source
var DefaultUint64Value pref.Value
View Source
var WellKnownMessages = map[string]int{
	"google.protobuf.Timestamp": 1,
	"google.protobuf.Duration":  1,
}

Functions

func EqualMessage added in v0.9.17

func EqualMessage(v1, v2 pref.Value) bool

EqualMessage reports whether two messages are equal.

func EqualValue added in v0.9.17

func EqualValue(fd pref.FieldDescriptor, v1, v2 pref.Value) bool

EqualValue compares two singular values. NOTE(wenchy): borrowed from https://github.com/protocolbuffers/protobuf-go/blob/v1.27.1/proto/equal.go#L113

func GetAllTypeInfo added in v0.9.17

func GetAllTypeInfo(fileDescs []*desc.FileDescriptor) map[string]*TypeInfo

func NewFiles added in v0.9.14

func NewFiles(importPaths []string, filenames ...string) (*protoregistry.Files, error)

NewFiles creates a new protoregistry.Files from the import paths and proto filenames.

func ParseFieldValue added in v0.9.17

func ParseFieldValue(fd pref.FieldDescriptor, rawValue string, locationName string) (v pref.Value, present bool, err error)

func ParseProtos

func ParseProtos(importPaths []string, filenames ...string) ([]*desc.FileDescriptor, error)

ParseProtos parses the import paths and proto Glob filenames to desc.FileDescriptor slices.

Types

type TypeInfo added in v0.9.17

type TypeInfo struct {
	Fullname       string
	ParentFilename string
}

Jump to

Keyboard shortcuts

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