Documentation ¶
Index ¶
- Variables
- func EqualMessage(v1, v2 pref.Value) bool
- func EqualValue(fd pref.FieldDescriptor, v1, v2 pref.Value) bool
- func GetAllTypeInfo(fileDescs []*desc.FileDescriptor) map[string]*TypeInfo
- func NewFiles(protoPaths []string, protoFiles []string, excludeProtoFiles ...string) (*protoregistry.Files, error)
- func ParseFieldValue(fd pref.FieldDescriptor, rawValue string, locationName string) (v pref.Value, present bool, err error)
- func ParseProtos(protoPaths []string, protoFiles ...string) ([]*desc.FileDescriptor, error)
- type TypeInfo
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
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(protoPaths []string, protoFiles []string, excludeProtoFiles ...string) (*protoregistry.Files, error)
NewFiles creates a new protoregistry.Files from the proto paths and proto Gob filenames.
func ParseFieldValue ¶ added in v0.9.17
func ParseProtos ¶
func ParseProtos(protoPaths []string, protoFiles ...string) ([]*desc.FileDescriptor, error)
ParseProtos parses the proto paths and proto files to desc.FileDescriptor slices.
Types ¶
Click to show internal directories.
Click to hide internal directories.