增加websocket支持
This commit is contained in:
28
vendor/google.golang.org/protobuf/encoding/protowire/wire.go
generated
vendored
28
vendor/google.golang.org/protobuf/encoding/protowire/wire.go
generated
vendored
@@ -6,7 +6,7 @@
|
||||
// See https://protobuf.dev/programming-guides/encoding.
|
||||
//
|
||||
// For marshaling and unmarshaling entire protobuf messages,
|
||||
// use the [google.golang.org/protobuf/proto] package instead.
|
||||
// use the "google.golang.org/protobuf/proto" package instead.
|
||||
package protowire
|
||||
|
||||
import (
|
||||
@@ -87,7 +87,7 @@ func ParseError(n int) error {
|
||||
|
||||
// ConsumeField parses an entire field record (both tag and value) and returns
|
||||
// the field number, the wire type, and the total length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
//
|
||||
// The total length includes the tag header and the end group marker (if the
|
||||
// field is a group).
|
||||
@@ -104,8 +104,8 @@ func ConsumeField(b []byte) (Number, Type, int) {
|
||||
}
|
||||
|
||||
// ConsumeFieldValue parses a field value and returns its length.
|
||||
// This assumes that the field [Number] and wire [Type] have already been parsed.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This assumes that the field Number and wire Type have already been parsed.
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
//
|
||||
// When parsing a group, the length includes the end group marker and
|
||||
// the end group is verified to match the starting field number.
|
||||
@@ -164,7 +164,7 @@ func AppendTag(b []byte, num Number, typ Type) []byte {
|
||||
}
|
||||
|
||||
// ConsumeTag parses b as a varint-encoded tag, reporting its length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeTag(b []byte) (Number, Type, int) {
|
||||
v, n := ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
@@ -263,7 +263,7 @@ func AppendVarint(b []byte, v uint64) []byte {
|
||||
}
|
||||
|
||||
// ConsumeVarint parses b as a varint-encoded uint64, reporting its length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeVarint(b []byte) (v uint64, n int) {
|
||||
var y uint64
|
||||
if len(b) <= 0 {
|
||||
@@ -384,7 +384,7 @@ func AppendFixed32(b []byte, v uint32) []byte {
|
||||
}
|
||||
|
||||
// ConsumeFixed32 parses b as a little-endian uint32, reporting its length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeFixed32(b []byte) (v uint32, n int) {
|
||||
if len(b) < 4 {
|
||||
return 0, errCodeTruncated
|
||||
@@ -412,7 +412,7 @@ func AppendFixed64(b []byte, v uint64) []byte {
|
||||
}
|
||||
|
||||
// ConsumeFixed64 parses b as a little-endian uint64, reporting its length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeFixed64(b []byte) (v uint64, n int) {
|
||||
if len(b) < 8 {
|
||||
return 0, errCodeTruncated
|
||||
@@ -432,7 +432,7 @@ func AppendBytes(b []byte, v []byte) []byte {
|
||||
}
|
||||
|
||||
// ConsumeBytes parses b as a length-prefixed bytes value, reporting its length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeBytes(b []byte) (v []byte, n int) {
|
||||
m, n := ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
@@ -456,7 +456,7 @@ func AppendString(b []byte, v string) []byte {
|
||||
}
|
||||
|
||||
// ConsumeString parses b as a length-prefixed bytes value, reporting its length.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeString(b []byte) (v string, n int) {
|
||||
bb, n := ConsumeBytes(b)
|
||||
return string(bb), n
|
||||
@@ -471,7 +471,7 @@ func AppendGroup(b []byte, num Number, v []byte) []byte {
|
||||
// ConsumeGroup parses b as a group value until the trailing end group marker,
|
||||
// and verifies that the end marker matches the provided num. The value v
|
||||
// does not contain the end marker, while the length does contain the end marker.
|
||||
// This returns a negative length upon an error (see [ParseError]).
|
||||
// This returns a negative length upon an error (see ParseError).
|
||||
func ConsumeGroup(num Number, b []byte) (v []byte, n int) {
|
||||
n = ConsumeFieldValue(num, StartGroupType, b)
|
||||
if n < 0 {
|
||||
@@ -495,8 +495,8 @@ func SizeGroup(num Number, n int) int {
|
||||
return n + SizeTag(num)
|
||||
}
|
||||
|
||||
// DecodeTag decodes the field [Number] and wire [Type] from its unified form.
|
||||
// The [Number] is -1 if the decoded field number overflows int32.
|
||||
// DecodeTag decodes the field Number and wire Type from its unified form.
|
||||
// The Number is -1 if the decoded field number overflows int32.
|
||||
// Other than overflow, this does not check for field number validity.
|
||||
func DecodeTag(x uint64) (Number, Type) {
|
||||
// NOTE: MessageSet allows for larger field numbers than normal.
|
||||
@@ -506,7 +506,7 @@ func DecodeTag(x uint64) (Number, Type) {
|
||||
return Number(x >> 3), Type(x & 7)
|
||||
}
|
||||
|
||||
// EncodeTag encodes the field [Number] and wire [Type] into its unified form.
|
||||
// EncodeTag encodes the field Number and wire Type into its unified form.
|
||||
func EncodeTag(num Number, typ Type) uint64 {
|
||||
return uint64(num)<<3 | uint64(typ&7)
|
||||
}
|
||||
|
||||
15
vendor/google.golang.org/protobuf/internal/errors/errors.go
generated
vendored
15
vendor/google.golang.org/protobuf/internal/errors/errors.go
generated
vendored
@@ -87,18 +87,3 @@ func InvalidUTF8(name string) error {
|
||||
func RequiredNotSet(name string) error {
|
||||
return New("required field %v not set", name)
|
||||
}
|
||||
|
||||
type SizeMismatchError struct {
|
||||
Calculated, Measured int
|
||||
}
|
||||
|
||||
func (e *SizeMismatchError) Error() string {
|
||||
return fmt.Sprintf("size mismatch (see https://github.com/golang/protobuf/issues/1609): calculated=%d, measured=%d", e.Calculated, e.Measured)
|
||||
}
|
||||
|
||||
func MismatchedSizeCalculation(calculated, measured int) error {
|
||||
return &SizeMismatchError{
|
||||
Calculated: calculated,
|
||||
Measured: measured,
|
||||
}
|
||||
}
|
||||
|
||||
410
vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
generated
vendored
410
vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
generated
vendored
@@ -12,28 +12,6 @@ import (
|
||||
|
||||
const File_google_protobuf_descriptor_proto = "google/protobuf/descriptor.proto"
|
||||
|
||||
// Full and short names for google.protobuf.Edition.
|
||||
const (
|
||||
Edition_enum_fullname = "google.protobuf.Edition"
|
||||
Edition_enum_name = "Edition"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.Edition.
|
||||
const (
|
||||
Edition_EDITION_UNKNOWN_enum_value = 0
|
||||
Edition_EDITION_LEGACY_enum_value = 900
|
||||
Edition_EDITION_PROTO2_enum_value = 998
|
||||
Edition_EDITION_PROTO3_enum_value = 999
|
||||
Edition_EDITION_2023_enum_value = 1000
|
||||
Edition_EDITION_2024_enum_value = 1001
|
||||
Edition_EDITION_1_TEST_ONLY_enum_value = 1
|
||||
Edition_EDITION_2_TEST_ONLY_enum_value = 2
|
||||
Edition_EDITION_99997_TEST_ONLY_enum_value = 99997
|
||||
Edition_EDITION_99998_TEST_ONLY_enum_value = 99998
|
||||
Edition_EDITION_99999_TEST_ONLY_enum_value = 99999
|
||||
Edition_EDITION_MAX_enum_value = 2147483647
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FileDescriptorSet.
|
||||
const (
|
||||
FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet"
|
||||
@@ -103,7 +81,7 @@ const (
|
||||
FileDescriptorProto_Options_field_number protoreflect.FieldNumber = 8
|
||||
FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumber = 9
|
||||
FileDescriptorProto_Syntax_field_number protoreflect.FieldNumber = 12
|
||||
FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 14
|
||||
FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 13
|
||||
)
|
||||
|
||||
// Names for google.protobuf.DescriptorProto.
|
||||
@@ -205,64 +183,13 @@ const (
|
||||
// Field names for google.protobuf.ExtensionRangeOptions.
|
||||
const (
|
||||
ExtensionRangeOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
ExtensionRangeOptions_Declaration_field_name protoreflect.Name = "declaration"
|
||||
ExtensionRangeOptions_Features_field_name protoreflect.Name = "features"
|
||||
ExtensionRangeOptions_Verification_field_name protoreflect.Name = "verification"
|
||||
|
||||
ExtensionRangeOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.uninterpreted_option"
|
||||
ExtensionRangeOptions_Declaration_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.declaration"
|
||||
ExtensionRangeOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.features"
|
||||
ExtensionRangeOptions_Verification_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.verification"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.ExtensionRangeOptions.
|
||||
const (
|
||||
ExtensionRangeOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
ExtensionRangeOptions_Declaration_field_number protoreflect.FieldNumber = 2
|
||||
ExtensionRangeOptions_Features_field_number protoreflect.FieldNumber = 50
|
||||
ExtensionRangeOptions_Verification_field_number protoreflect.FieldNumber = 3
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.ExtensionRangeOptions.VerificationState.
|
||||
const (
|
||||
ExtensionRangeOptions_VerificationState_enum_fullname = "google.protobuf.ExtensionRangeOptions.VerificationState"
|
||||
ExtensionRangeOptions_VerificationState_enum_name = "VerificationState"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.ExtensionRangeOptions.VerificationState.
|
||||
const (
|
||||
ExtensionRangeOptions_DECLARATION_enum_value = 0
|
||||
ExtensionRangeOptions_UNVERIFIED_enum_value = 1
|
||||
)
|
||||
|
||||
// Names for google.protobuf.ExtensionRangeOptions.Declaration.
|
||||
const (
|
||||
ExtensionRangeOptions_Declaration_message_name protoreflect.Name = "Declaration"
|
||||
ExtensionRangeOptions_Declaration_message_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.ExtensionRangeOptions.Declaration.
|
||||
const (
|
||||
ExtensionRangeOptions_Declaration_Number_field_name protoreflect.Name = "number"
|
||||
ExtensionRangeOptions_Declaration_FullName_field_name protoreflect.Name = "full_name"
|
||||
ExtensionRangeOptions_Declaration_Type_field_name protoreflect.Name = "type"
|
||||
ExtensionRangeOptions_Declaration_Reserved_field_name protoreflect.Name = "reserved"
|
||||
ExtensionRangeOptions_Declaration_Repeated_field_name protoreflect.Name = "repeated"
|
||||
|
||||
ExtensionRangeOptions_Declaration_Number_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.number"
|
||||
ExtensionRangeOptions_Declaration_FullName_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.full_name"
|
||||
ExtensionRangeOptions_Declaration_Type_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.type"
|
||||
ExtensionRangeOptions_Declaration_Reserved_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.reserved"
|
||||
ExtensionRangeOptions_Declaration_Repeated_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.repeated"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.ExtensionRangeOptions.Declaration.
|
||||
const (
|
||||
ExtensionRangeOptions_Declaration_Number_field_number protoreflect.FieldNumber = 1
|
||||
ExtensionRangeOptions_Declaration_FullName_field_number protoreflect.FieldNumber = 2
|
||||
ExtensionRangeOptions_Declaration_Type_field_number protoreflect.FieldNumber = 3
|
||||
ExtensionRangeOptions_Declaration_Reserved_field_number protoreflect.FieldNumber = 5
|
||||
ExtensionRangeOptions_Declaration_Repeated_field_number protoreflect.FieldNumber = 6
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FieldDescriptorProto.
|
||||
@@ -319,41 +246,12 @@ const (
|
||||
FieldDescriptorProto_Type_enum_name = "Type"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FieldDescriptorProto.Type.
|
||||
const (
|
||||
FieldDescriptorProto_TYPE_DOUBLE_enum_value = 1
|
||||
FieldDescriptorProto_TYPE_FLOAT_enum_value = 2
|
||||
FieldDescriptorProto_TYPE_INT64_enum_value = 3
|
||||
FieldDescriptorProto_TYPE_UINT64_enum_value = 4
|
||||
FieldDescriptorProto_TYPE_INT32_enum_value = 5
|
||||
FieldDescriptorProto_TYPE_FIXED64_enum_value = 6
|
||||
FieldDescriptorProto_TYPE_FIXED32_enum_value = 7
|
||||
FieldDescriptorProto_TYPE_BOOL_enum_value = 8
|
||||
FieldDescriptorProto_TYPE_STRING_enum_value = 9
|
||||
FieldDescriptorProto_TYPE_GROUP_enum_value = 10
|
||||
FieldDescriptorProto_TYPE_MESSAGE_enum_value = 11
|
||||
FieldDescriptorProto_TYPE_BYTES_enum_value = 12
|
||||
FieldDescriptorProto_TYPE_UINT32_enum_value = 13
|
||||
FieldDescriptorProto_TYPE_ENUM_enum_value = 14
|
||||
FieldDescriptorProto_TYPE_SFIXED32_enum_value = 15
|
||||
FieldDescriptorProto_TYPE_SFIXED64_enum_value = 16
|
||||
FieldDescriptorProto_TYPE_SINT32_enum_value = 17
|
||||
FieldDescriptorProto_TYPE_SINT64_enum_value = 18
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FieldDescriptorProto.Label.
|
||||
const (
|
||||
FieldDescriptorProto_Label_enum_fullname = "google.protobuf.FieldDescriptorProto.Label"
|
||||
FieldDescriptorProto_Label_enum_name = "Label"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FieldDescriptorProto.Label.
|
||||
const (
|
||||
FieldDescriptorProto_LABEL_OPTIONAL_enum_value = 1
|
||||
FieldDescriptorProto_LABEL_REPEATED_enum_value = 3
|
||||
FieldDescriptorProto_LABEL_REQUIRED_enum_value = 2
|
||||
)
|
||||
|
||||
// Names for google.protobuf.OneofDescriptorProto.
|
||||
const (
|
||||
OneofDescriptorProto_message_name protoreflect.Name = "OneofDescriptorProto"
|
||||
@@ -525,6 +423,7 @@ const (
|
||||
FileOptions_CcGenericServices_field_name protoreflect.Name = "cc_generic_services"
|
||||
FileOptions_JavaGenericServices_field_name protoreflect.Name = "java_generic_services"
|
||||
FileOptions_PyGenericServices_field_name protoreflect.Name = "py_generic_services"
|
||||
FileOptions_PhpGenericServices_field_name protoreflect.Name = "php_generic_services"
|
||||
FileOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
FileOptions_CcEnableArenas_field_name protoreflect.Name = "cc_enable_arenas"
|
||||
FileOptions_ObjcClassPrefix_field_name protoreflect.Name = "objc_class_prefix"
|
||||
@@ -534,7 +433,6 @@ const (
|
||||
FileOptions_PhpNamespace_field_name protoreflect.Name = "php_namespace"
|
||||
FileOptions_PhpMetadataNamespace_field_name protoreflect.Name = "php_metadata_namespace"
|
||||
FileOptions_RubyPackage_field_name protoreflect.Name = "ruby_package"
|
||||
FileOptions_Features_field_name protoreflect.Name = "features"
|
||||
FileOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
FileOptions_JavaPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_package"
|
||||
@@ -547,6 +445,7 @@ const (
|
||||
FileOptions_CcGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_generic_services"
|
||||
FileOptions_JavaGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_generic_services"
|
||||
FileOptions_PyGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.py_generic_services"
|
||||
FileOptions_PhpGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_generic_services"
|
||||
FileOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.deprecated"
|
||||
FileOptions_CcEnableArenas_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_enable_arenas"
|
||||
FileOptions_ObjcClassPrefix_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.objc_class_prefix"
|
||||
@@ -556,7 +455,6 @@ const (
|
||||
FileOptions_PhpNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_namespace"
|
||||
FileOptions_PhpMetadataNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_metadata_namespace"
|
||||
FileOptions_RubyPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.ruby_package"
|
||||
FileOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.features"
|
||||
FileOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
@@ -572,6 +470,7 @@ const (
|
||||
FileOptions_CcGenericServices_field_number protoreflect.FieldNumber = 16
|
||||
FileOptions_JavaGenericServices_field_number protoreflect.FieldNumber = 17
|
||||
FileOptions_PyGenericServices_field_number protoreflect.FieldNumber = 18
|
||||
FileOptions_PhpGenericServices_field_number protoreflect.FieldNumber = 42
|
||||
FileOptions_Deprecated_field_number protoreflect.FieldNumber = 23
|
||||
FileOptions_CcEnableArenas_field_number protoreflect.FieldNumber = 31
|
||||
FileOptions_ObjcClassPrefix_field_number protoreflect.FieldNumber = 36
|
||||
@@ -581,7 +480,6 @@ const (
|
||||
FileOptions_PhpNamespace_field_number protoreflect.FieldNumber = 41
|
||||
FileOptions_PhpMetadataNamespace_field_number protoreflect.FieldNumber = 44
|
||||
FileOptions_RubyPackage_field_number protoreflect.FieldNumber = 45
|
||||
FileOptions_Features_field_number protoreflect.FieldNumber = 50
|
||||
FileOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -591,13 +489,6 @@ const (
|
||||
FileOptions_OptimizeMode_enum_name = "OptimizeMode"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FileOptions.OptimizeMode.
|
||||
const (
|
||||
FileOptions_SPEED_enum_value = 1
|
||||
FileOptions_CODE_SIZE_enum_value = 2
|
||||
FileOptions_LITE_RUNTIME_enum_value = 3
|
||||
)
|
||||
|
||||
// Names for google.protobuf.MessageOptions.
|
||||
const (
|
||||
MessageOptions_message_name protoreflect.Name = "MessageOptions"
|
||||
@@ -611,7 +502,6 @@ const (
|
||||
MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry"
|
||||
MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts"
|
||||
MessageOptions_Features_field_name protoreflect.Name = "features"
|
||||
MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format"
|
||||
@@ -619,7 +509,6 @@ const (
|
||||
MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated"
|
||||
MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry"
|
||||
MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts"
|
||||
MessageOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.features"
|
||||
MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
@@ -630,7 +519,6 @@ const (
|
||||
MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3
|
||||
MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7
|
||||
MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11
|
||||
MessageOptions_Features_field_number protoreflect.FieldNumber = 12
|
||||
MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -651,10 +539,7 @@ const (
|
||||
FieldOptions_Weak_field_name protoreflect.Name = "weak"
|
||||
FieldOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
|
||||
FieldOptions_Retention_field_name protoreflect.Name = "retention"
|
||||
FieldOptions_Targets_field_name protoreflect.Name = "targets"
|
||||
FieldOptions_EditionDefaults_field_name protoreflect.Name = "edition_defaults"
|
||||
FieldOptions_Features_field_name protoreflect.Name = "features"
|
||||
FieldOptions_FeatureSupport_field_name protoreflect.Name = "feature_support"
|
||||
FieldOptions_Target_field_name protoreflect.Name = "target"
|
||||
FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype"
|
||||
@@ -666,10 +551,7 @@ const (
|
||||
FieldOptions_Weak_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.weak"
|
||||
FieldOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.debug_redact"
|
||||
FieldOptions_Retention_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.retention"
|
||||
FieldOptions_Targets_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.targets"
|
||||
FieldOptions_EditionDefaults_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.edition_defaults"
|
||||
FieldOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.features"
|
||||
FieldOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.feature_support"
|
||||
FieldOptions_Target_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.target"
|
||||
FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
@@ -684,10 +566,7 @@ const (
|
||||
FieldOptions_Weak_field_number protoreflect.FieldNumber = 10
|
||||
FieldOptions_DebugRedact_field_number protoreflect.FieldNumber = 16
|
||||
FieldOptions_Retention_field_number protoreflect.FieldNumber = 17
|
||||
FieldOptions_Targets_field_number protoreflect.FieldNumber = 19
|
||||
FieldOptions_EditionDefaults_field_number protoreflect.FieldNumber = 20
|
||||
FieldOptions_Features_field_number protoreflect.FieldNumber = 21
|
||||
FieldOptions_FeatureSupport_field_number protoreflect.FieldNumber = 22
|
||||
FieldOptions_Target_field_number protoreflect.FieldNumber = 18
|
||||
FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -697,107 +576,24 @@ const (
|
||||
FieldOptions_CType_enum_name = "CType"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FieldOptions.CType.
|
||||
const (
|
||||
FieldOptions_STRING_enum_value = 0
|
||||
FieldOptions_CORD_enum_value = 1
|
||||
FieldOptions_STRING_PIECE_enum_value = 2
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FieldOptions.JSType.
|
||||
const (
|
||||
FieldOptions_JSType_enum_fullname = "google.protobuf.FieldOptions.JSType"
|
||||
FieldOptions_JSType_enum_name = "JSType"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FieldOptions.JSType.
|
||||
const (
|
||||
FieldOptions_JS_NORMAL_enum_value = 0
|
||||
FieldOptions_JS_STRING_enum_value = 1
|
||||
FieldOptions_JS_NUMBER_enum_value = 2
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FieldOptions.OptionRetention.
|
||||
const (
|
||||
FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention"
|
||||
FieldOptions_OptionRetention_enum_name = "OptionRetention"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FieldOptions.OptionRetention.
|
||||
const (
|
||||
FieldOptions_RETENTION_UNKNOWN_enum_value = 0
|
||||
FieldOptions_RETENTION_RUNTIME_enum_value = 1
|
||||
FieldOptions_RETENTION_SOURCE_enum_value = 2
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FieldOptions.OptionTargetType.
|
||||
const (
|
||||
FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType"
|
||||
FieldOptions_OptionTargetType_enum_name = "OptionTargetType"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FieldOptions.OptionTargetType.
|
||||
const (
|
||||
FieldOptions_TARGET_TYPE_UNKNOWN_enum_value = 0
|
||||
FieldOptions_TARGET_TYPE_FILE_enum_value = 1
|
||||
FieldOptions_TARGET_TYPE_EXTENSION_RANGE_enum_value = 2
|
||||
FieldOptions_TARGET_TYPE_MESSAGE_enum_value = 3
|
||||
FieldOptions_TARGET_TYPE_FIELD_enum_value = 4
|
||||
FieldOptions_TARGET_TYPE_ONEOF_enum_value = 5
|
||||
FieldOptions_TARGET_TYPE_ENUM_enum_value = 6
|
||||
FieldOptions_TARGET_TYPE_ENUM_ENTRY_enum_value = 7
|
||||
FieldOptions_TARGET_TYPE_SERVICE_enum_value = 8
|
||||
FieldOptions_TARGET_TYPE_METHOD_enum_value = 9
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FieldOptions.EditionDefault.
|
||||
const (
|
||||
FieldOptions_EditionDefault_message_name protoreflect.Name = "EditionDefault"
|
||||
FieldOptions_EditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.FieldOptions.EditionDefault.
|
||||
const (
|
||||
FieldOptions_EditionDefault_Edition_field_name protoreflect.Name = "edition"
|
||||
FieldOptions_EditionDefault_Value_field_name protoreflect.Name = "value"
|
||||
|
||||
FieldOptions_EditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.edition"
|
||||
FieldOptions_EditionDefault_Value_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.value"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.FieldOptions.EditionDefault.
|
||||
const (
|
||||
FieldOptions_EditionDefault_Edition_field_number protoreflect.FieldNumber = 3
|
||||
FieldOptions_EditionDefault_Value_field_number protoreflect.FieldNumber = 2
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FieldOptions.FeatureSupport.
|
||||
const (
|
||||
FieldOptions_FeatureSupport_message_name protoreflect.Name = "FeatureSupport"
|
||||
FieldOptions_FeatureSupport_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.FieldOptions.FeatureSupport.
|
||||
const (
|
||||
FieldOptions_FeatureSupport_EditionIntroduced_field_name protoreflect.Name = "edition_introduced"
|
||||
FieldOptions_FeatureSupport_EditionDeprecated_field_name protoreflect.Name = "edition_deprecated"
|
||||
FieldOptions_FeatureSupport_DeprecationWarning_field_name protoreflect.Name = "deprecation_warning"
|
||||
FieldOptions_FeatureSupport_EditionRemoved_field_name protoreflect.Name = "edition_removed"
|
||||
|
||||
FieldOptions_FeatureSupport_EditionIntroduced_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_introduced"
|
||||
FieldOptions_FeatureSupport_EditionDeprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_deprecated"
|
||||
FieldOptions_FeatureSupport_DeprecationWarning_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning"
|
||||
FieldOptions_FeatureSupport_EditionRemoved_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_removed"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.FieldOptions.FeatureSupport.
|
||||
const (
|
||||
FieldOptions_FeatureSupport_EditionIntroduced_field_number protoreflect.FieldNumber = 1
|
||||
FieldOptions_FeatureSupport_EditionDeprecated_field_number protoreflect.FieldNumber = 2
|
||||
FieldOptions_FeatureSupport_DeprecationWarning_field_number protoreflect.FieldNumber = 3
|
||||
FieldOptions_FeatureSupport_EditionRemoved_field_number protoreflect.FieldNumber = 4
|
||||
)
|
||||
|
||||
// Names for google.protobuf.OneofOptions.
|
||||
const (
|
||||
OneofOptions_message_name protoreflect.Name = "OneofOptions"
|
||||
@@ -806,16 +602,13 @@ const (
|
||||
|
||||
// Field names for google.protobuf.OneofOptions.
|
||||
const (
|
||||
OneofOptions_Features_field_name protoreflect.Name = "features"
|
||||
OneofOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
OneofOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.features"
|
||||
OneofOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.OneofOptions.
|
||||
const (
|
||||
OneofOptions_Features_field_number protoreflect.FieldNumber = 1
|
||||
OneofOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -830,13 +623,11 @@ const (
|
||||
EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias"
|
||||
EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts"
|
||||
EnumOptions_Features_field_name protoreflect.Name = "features"
|
||||
EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias"
|
||||
EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated"
|
||||
EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts"
|
||||
EnumOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.features"
|
||||
EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
@@ -845,7 +636,6 @@ const (
|
||||
EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2
|
||||
EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3
|
||||
EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6
|
||||
EnumOptions_Features_field_number protoreflect.FieldNumber = 7
|
||||
EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -858,21 +648,15 @@ const (
|
||||
// Field names for google.protobuf.EnumValueOptions.
|
||||
const (
|
||||
EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
EnumValueOptions_Features_field_name protoreflect.Name = "features"
|
||||
EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
|
||||
EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated"
|
||||
EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features"
|
||||
EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact"
|
||||
EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.EnumValueOptions.
|
||||
const (
|
||||
EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1
|
||||
EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2
|
||||
EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3
|
||||
EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -884,18 +668,15 @@ const (
|
||||
|
||||
// Field names for google.protobuf.ServiceOptions.
|
||||
const (
|
||||
ServiceOptions_Features_field_name protoreflect.Name = "features"
|
||||
ServiceOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
ServiceOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
ServiceOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.features"
|
||||
ServiceOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.deprecated"
|
||||
ServiceOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.ServiceOptions.
|
||||
const (
|
||||
ServiceOptions_Features_field_number protoreflect.FieldNumber = 34
|
||||
ServiceOptions_Deprecated_field_number protoreflect.FieldNumber = 33
|
||||
ServiceOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
@@ -910,12 +691,10 @@ const (
|
||||
const (
|
||||
MethodOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
MethodOptions_IdempotencyLevel_field_name protoreflect.Name = "idempotency_level"
|
||||
MethodOptions_Features_field_name protoreflect.Name = "features"
|
||||
MethodOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
MethodOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.deprecated"
|
||||
MethodOptions_IdempotencyLevel_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.idempotency_level"
|
||||
MethodOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.features"
|
||||
MethodOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
@@ -923,7 +702,6 @@ const (
|
||||
const (
|
||||
MethodOptions_Deprecated_field_number protoreflect.FieldNumber = 33
|
||||
MethodOptions_IdempotencyLevel_field_number protoreflect.FieldNumber = 34
|
||||
MethodOptions_Features_field_number protoreflect.FieldNumber = 35
|
||||
MethodOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
@@ -933,13 +711,6 @@ const (
|
||||
MethodOptions_IdempotencyLevel_enum_name = "IdempotencyLevel"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.MethodOptions.IdempotencyLevel.
|
||||
const (
|
||||
MethodOptions_IDEMPOTENCY_UNKNOWN_enum_value = 0
|
||||
MethodOptions_NO_SIDE_EFFECTS_enum_value = 1
|
||||
MethodOptions_IDEMPOTENT_enum_value = 2
|
||||
)
|
||||
|
||||
// Names for google.protobuf.UninterpretedOption.
|
||||
const (
|
||||
UninterpretedOption_message_name protoreflect.Name = "UninterpretedOption"
|
||||
@@ -997,166 +768,6 @@ const (
|
||||
UninterpretedOption_NamePart_IsExtension_field_number protoreflect.FieldNumber = 2
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FeatureSet.
|
||||
const (
|
||||
FeatureSet_message_name protoreflect.Name = "FeatureSet"
|
||||
FeatureSet_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.FeatureSet.
|
||||
const (
|
||||
FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
|
||||
FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
|
||||
FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
|
||||
FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
|
||||
FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
|
||||
FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
|
||||
|
||||
FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
|
||||
FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
|
||||
FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
|
||||
FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
|
||||
FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
|
||||
FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.FeatureSet.
|
||||
const (
|
||||
FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
|
||||
FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
|
||||
FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
|
||||
FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
|
||||
FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
|
||||
FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FeatureSet.FieldPresence.
|
||||
const (
|
||||
FeatureSet_FieldPresence_enum_fullname = "google.protobuf.FeatureSet.FieldPresence"
|
||||
FeatureSet_FieldPresence_enum_name = "FieldPresence"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FeatureSet.FieldPresence.
|
||||
const (
|
||||
FeatureSet_FIELD_PRESENCE_UNKNOWN_enum_value = 0
|
||||
FeatureSet_EXPLICIT_enum_value = 1
|
||||
FeatureSet_IMPLICIT_enum_value = 2
|
||||
FeatureSet_LEGACY_REQUIRED_enum_value = 3
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FeatureSet.EnumType.
|
||||
const (
|
||||
FeatureSet_EnumType_enum_fullname = "google.protobuf.FeatureSet.EnumType"
|
||||
FeatureSet_EnumType_enum_name = "EnumType"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FeatureSet.EnumType.
|
||||
const (
|
||||
FeatureSet_ENUM_TYPE_UNKNOWN_enum_value = 0
|
||||
FeatureSet_OPEN_enum_value = 1
|
||||
FeatureSet_CLOSED_enum_value = 2
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FeatureSet.RepeatedFieldEncoding.
|
||||
const (
|
||||
FeatureSet_RepeatedFieldEncoding_enum_fullname = "google.protobuf.FeatureSet.RepeatedFieldEncoding"
|
||||
FeatureSet_RepeatedFieldEncoding_enum_name = "RepeatedFieldEncoding"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FeatureSet.RepeatedFieldEncoding.
|
||||
const (
|
||||
FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN_enum_value = 0
|
||||
FeatureSet_PACKED_enum_value = 1
|
||||
FeatureSet_EXPANDED_enum_value = 2
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FeatureSet.Utf8Validation.
|
||||
const (
|
||||
FeatureSet_Utf8Validation_enum_fullname = "google.protobuf.FeatureSet.Utf8Validation"
|
||||
FeatureSet_Utf8Validation_enum_name = "Utf8Validation"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FeatureSet.Utf8Validation.
|
||||
const (
|
||||
FeatureSet_UTF8_VALIDATION_UNKNOWN_enum_value = 0
|
||||
FeatureSet_VERIFY_enum_value = 2
|
||||
FeatureSet_NONE_enum_value = 3
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FeatureSet.MessageEncoding.
|
||||
const (
|
||||
FeatureSet_MessageEncoding_enum_fullname = "google.protobuf.FeatureSet.MessageEncoding"
|
||||
FeatureSet_MessageEncoding_enum_name = "MessageEncoding"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FeatureSet.MessageEncoding.
|
||||
const (
|
||||
FeatureSet_MESSAGE_ENCODING_UNKNOWN_enum_value = 0
|
||||
FeatureSet_LENGTH_PREFIXED_enum_value = 1
|
||||
FeatureSet_DELIMITED_enum_value = 2
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.FeatureSet.JsonFormat.
|
||||
const (
|
||||
FeatureSet_JsonFormat_enum_fullname = "google.protobuf.FeatureSet.JsonFormat"
|
||||
FeatureSet_JsonFormat_enum_name = "JsonFormat"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.FeatureSet.JsonFormat.
|
||||
const (
|
||||
FeatureSet_JSON_FORMAT_UNKNOWN_enum_value = 0
|
||||
FeatureSet_ALLOW_enum_value = 1
|
||||
FeatureSet_LEGACY_BEST_EFFORT_enum_value = 2
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FeatureSetDefaults.
|
||||
const (
|
||||
FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults"
|
||||
FeatureSetDefaults_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.FeatureSetDefaults.
|
||||
const (
|
||||
FeatureSetDefaults_Defaults_field_name protoreflect.Name = "defaults"
|
||||
FeatureSetDefaults_MinimumEdition_field_name protoreflect.Name = "minimum_edition"
|
||||
FeatureSetDefaults_MaximumEdition_field_name protoreflect.Name = "maximum_edition"
|
||||
|
||||
FeatureSetDefaults_Defaults_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.defaults"
|
||||
FeatureSetDefaults_MinimumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.minimum_edition"
|
||||
FeatureSetDefaults_MaximumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.maximum_edition"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.FeatureSetDefaults.
|
||||
const (
|
||||
FeatureSetDefaults_Defaults_field_number protoreflect.FieldNumber = 1
|
||||
FeatureSetDefaults_MinimumEdition_field_number protoreflect.FieldNumber = 4
|
||||
FeatureSetDefaults_MaximumEdition_field_number protoreflect.FieldNumber = 5
|
||||
)
|
||||
|
||||
// Names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.
|
||||
const (
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_message_name protoreflect.Name = "FeatureSetEditionDefault"
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.
|
||||
const (
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition"
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_name protoreflect.Name = "overridable_features"
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_name protoreflect.Name = "fixed_features"
|
||||
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition"
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features"
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.
|
||||
const (
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number protoreflect.FieldNumber = 4
|
||||
FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number protoreflect.FieldNumber = 5
|
||||
)
|
||||
|
||||
// Names for google.protobuf.SourceCodeInfo.
|
||||
const (
|
||||
SourceCodeInfo_message_name protoreflect.Name = "SourceCodeInfo"
|
||||
@@ -1258,10 +869,3 @@ const (
|
||||
GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic"
|
||||
GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.GeneratedCodeInfo.Annotation.Semantic.
|
||||
const (
|
||||
GeneratedCodeInfo_Annotation_NONE_enum_value = 0
|
||||
GeneratedCodeInfo_Annotation_SET_enum_value = 1
|
||||
GeneratedCodeInfo_Annotation_ALIAS_enum_value = 2
|
||||
)
|
||||
|
||||
5
vendor/google.golang.org/protobuf/internal/genid/struct_gen.go
generated
vendored
5
vendor/google.golang.org/protobuf/internal/genid/struct_gen.go
generated
vendored
@@ -18,11 +18,6 @@ const (
|
||||
NullValue_enum_name = "NullValue"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.NullValue.
|
||||
const (
|
||||
NullValue_NULL_VALUE_enum_value = 0
|
||||
)
|
||||
|
||||
// Names for google.protobuf.Struct.
|
||||
const (
|
||||
Struct_message_name protoreflect.Name = "Struct"
|
||||
|
||||
44
vendor/google.golang.org/protobuf/internal/genid/type_gen.go
generated
vendored
44
vendor/google.golang.org/protobuf/internal/genid/type_gen.go
generated
vendored
@@ -18,13 +18,6 @@ const (
|
||||
Syntax_enum_name = "Syntax"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.Syntax.
|
||||
const (
|
||||
Syntax_SYNTAX_PROTO2_enum_value = 0
|
||||
Syntax_SYNTAX_PROTO3_enum_value = 1
|
||||
Syntax_SYNTAX_EDITIONS_enum_value = 2
|
||||
)
|
||||
|
||||
// Names for google.protobuf.Type.
|
||||
const (
|
||||
Type_message_name protoreflect.Name = "Type"
|
||||
@@ -39,7 +32,6 @@ const (
|
||||
Type_Options_field_name protoreflect.Name = "options"
|
||||
Type_SourceContext_field_name protoreflect.Name = "source_context"
|
||||
Type_Syntax_field_name protoreflect.Name = "syntax"
|
||||
Type_Edition_field_name protoreflect.Name = "edition"
|
||||
|
||||
Type_Name_field_fullname protoreflect.FullName = "google.protobuf.Type.name"
|
||||
Type_Fields_field_fullname protoreflect.FullName = "google.protobuf.Type.fields"
|
||||
@@ -47,7 +39,6 @@ const (
|
||||
Type_Options_field_fullname protoreflect.FullName = "google.protobuf.Type.options"
|
||||
Type_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Type.source_context"
|
||||
Type_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Type.syntax"
|
||||
Type_Edition_field_fullname protoreflect.FullName = "google.protobuf.Type.edition"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.Type.
|
||||
@@ -58,7 +49,6 @@ const (
|
||||
Type_Options_field_number protoreflect.FieldNumber = 4
|
||||
Type_SourceContext_field_number protoreflect.FieldNumber = 5
|
||||
Type_Syntax_field_number protoreflect.FieldNumber = 6
|
||||
Type_Edition_field_number protoreflect.FieldNumber = 7
|
||||
)
|
||||
|
||||
// Names for google.protobuf.Field.
|
||||
@@ -112,43 +102,12 @@ const (
|
||||
Field_Kind_enum_name = "Kind"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.Field.Kind.
|
||||
const (
|
||||
Field_TYPE_UNKNOWN_enum_value = 0
|
||||
Field_TYPE_DOUBLE_enum_value = 1
|
||||
Field_TYPE_FLOAT_enum_value = 2
|
||||
Field_TYPE_INT64_enum_value = 3
|
||||
Field_TYPE_UINT64_enum_value = 4
|
||||
Field_TYPE_INT32_enum_value = 5
|
||||
Field_TYPE_FIXED64_enum_value = 6
|
||||
Field_TYPE_FIXED32_enum_value = 7
|
||||
Field_TYPE_BOOL_enum_value = 8
|
||||
Field_TYPE_STRING_enum_value = 9
|
||||
Field_TYPE_GROUP_enum_value = 10
|
||||
Field_TYPE_MESSAGE_enum_value = 11
|
||||
Field_TYPE_BYTES_enum_value = 12
|
||||
Field_TYPE_UINT32_enum_value = 13
|
||||
Field_TYPE_ENUM_enum_value = 14
|
||||
Field_TYPE_SFIXED32_enum_value = 15
|
||||
Field_TYPE_SFIXED64_enum_value = 16
|
||||
Field_TYPE_SINT32_enum_value = 17
|
||||
Field_TYPE_SINT64_enum_value = 18
|
||||
)
|
||||
|
||||
// Full and short names for google.protobuf.Field.Cardinality.
|
||||
const (
|
||||
Field_Cardinality_enum_fullname = "google.protobuf.Field.Cardinality"
|
||||
Field_Cardinality_enum_name = "Cardinality"
|
||||
)
|
||||
|
||||
// Enum values for google.protobuf.Field.Cardinality.
|
||||
const (
|
||||
Field_CARDINALITY_UNKNOWN_enum_value = 0
|
||||
Field_CARDINALITY_OPTIONAL_enum_value = 1
|
||||
Field_CARDINALITY_REQUIRED_enum_value = 2
|
||||
Field_CARDINALITY_REPEATED_enum_value = 3
|
||||
)
|
||||
|
||||
// Names for google.protobuf.Enum.
|
||||
const (
|
||||
Enum_message_name protoreflect.Name = "Enum"
|
||||
@@ -162,14 +121,12 @@ const (
|
||||
Enum_Options_field_name protoreflect.Name = "options"
|
||||
Enum_SourceContext_field_name protoreflect.Name = "source_context"
|
||||
Enum_Syntax_field_name protoreflect.Name = "syntax"
|
||||
Enum_Edition_field_name protoreflect.Name = "edition"
|
||||
|
||||
Enum_Name_field_fullname protoreflect.FullName = "google.protobuf.Enum.name"
|
||||
Enum_Enumvalue_field_fullname protoreflect.FullName = "google.protobuf.Enum.enumvalue"
|
||||
Enum_Options_field_fullname protoreflect.FullName = "google.protobuf.Enum.options"
|
||||
Enum_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Enum.source_context"
|
||||
Enum_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Enum.syntax"
|
||||
Enum_Edition_field_fullname protoreflect.FullName = "google.protobuf.Enum.edition"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.Enum.
|
||||
@@ -179,7 +136,6 @@ const (
|
||||
Enum_Options_field_number protoreflect.FieldNumber = 3
|
||||
Enum_SourceContext_field_number protoreflect.FieldNumber = 4
|
||||
Enum_Syntax_field_number protoreflect.FieldNumber = 5
|
||||
Enum_Edition_field_number protoreflect.FieldNumber = 6
|
||||
)
|
||||
|
||||
// Names for google.protobuf.EnumValue.
|
||||
|
||||
2
vendor/google.golang.org/protobuf/internal/order/order.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/order/order.go
generated
vendored
@@ -33,7 +33,7 @@ var (
|
||||
return !inOneof(ox) && inOneof(oy)
|
||||
}
|
||||
// Fields in disjoint oneof sets are sorted by declaration index.
|
||||
if inOneof(ox) && inOneof(oy) && ox != oy {
|
||||
if ox != nil && oy != nil && ox != oy {
|
||||
return ox.Index() < oy.Index()
|
||||
}
|
||||
// Fields sorted by field number.
|
||||
|
||||
2
vendor/google.golang.org/protobuf/internal/strs/strings.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/strs/strings.go
generated
vendored
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
// EnforceUTF8 reports whether to enforce strict UTF-8 validation.
|
||||
func EnforceUTF8(fd protoreflect.FieldDescriptor) bool {
|
||||
if flags.ProtoLegacy || fd.Syntax() == protoreflect.Editions {
|
||||
if flags.ProtoLegacy {
|
||||
if fd, ok := fd.(interface{ EnforceUTF8() bool }); ok {
|
||||
return fd.EnforceUTF8()
|
||||
}
|
||||
|
||||
4
vendor/google.golang.org/protobuf/proto/decode.go
generated
vendored
4
vendor/google.golang.org/protobuf/proto/decode.go
generated
vendored
@@ -51,8 +51,6 @@ type UnmarshalOptions struct {
|
||||
|
||||
// Unmarshal parses the wire-format message in b and places the result in m.
|
||||
// The provided message must be mutable (e.g., a non-nil pointer to a message).
|
||||
//
|
||||
// See the [UnmarshalOptions] type if you need more control.
|
||||
func Unmarshal(b []byte, m Message) error {
|
||||
_, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect())
|
||||
return err
|
||||
@@ -71,7 +69,7 @@ func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
|
||||
// UnmarshalState parses a wire-format message and places the result in m.
|
||||
//
|
||||
// This method permits fine-grained control over the unmarshaler.
|
||||
// Most users should use [Unmarshal] instead.
|
||||
// Most users should use Unmarshal instead.
|
||||
func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||
if o.RecursionLimit == 0 {
|
||||
o.RecursionLimit = protowire.DefaultRecursionLimit
|
||||
|
||||
58
vendor/google.golang.org/protobuf/proto/doc.go
generated
vendored
58
vendor/google.golang.org/protobuf/proto/doc.go
generated
vendored
@@ -18,27 +18,27 @@
|
||||
// This package contains functions to convert to and from the wire format,
|
||||
// an efficient binary serialization of protocol buffers.
|
||||
//
|
||||
// - [Size] reports the size of a message in the wire format.
|
||||
// • Size reports the size of a message in the wire format.
|
||||
//
|
||||
// - [Marshal] converts a message to the wire format.
|
||||
// The [MarshalOptions] type provides more control over wire marshaling.
|
||||
// • Marshal converts a message to the wire format.
|
||||
// The MarshalOptions type provides more control over wire marshaling.
|
||||
//
|
||||
// - [Unmarshal] converts a message from the wire format.
|
||||
// The [UnmarshalOptions] type provides more control over wire unmarshaling.
|
||||
// • Unmarshal converts a message from the wire format.
|
||||
// The UnmarshalOptions type provides more control over wire unmarshaling.
|
||||
//
|
||||
// # Basic message operations
|
||||
//
|
||||
// - [Clone] makes a deep copy of a message.
|
||||
// • Clone makes a deep copy of a message.
|
||||
//
|
||||
// - [Merge] merges the content of a message into another.
|
||||
// • Merge merges the content of a message into another.
|
||||
//
|
||||
// - [Equal] compares two messages. For more control over comparisons
|
||||
// and detailed reporting of differences, see package
|
||||
// [google.golang.org/protobuf/testing/protocmp].
|
||||
// • Equal compares two messages. For more control over comparisons
|
||||
// and detailed reporting of differences, see package
|
||||
// "google.golang.org/protobuf/testing/protocmp".
|
||||
//
|
||||
// - [Reset] clears the content of a message.
|
||||
// • Reset clears the content of a message.
|
||||
//
|
||||
// - [CheckInitialized] reports whether all required fields in a message are set.
|
||||
// • CheckInitialized reports whether all required fields in a message are set.
|
||||
//
|
||||
// # Optional scalar constructors
|
||||
//
|
||||
@@ -46,9 +46,9 @@
|
||||
// as pointers to a value. For example, an optional string field has the
|
||||
// Go type *string.
|
||||
//
|
||||
// - [Bool], [Int32], [Int64], [Uint32], [Uint64], [Float32], [Float64], and [String]
|
||||
// take a value and return a pointer to a new instance of it,
|
||||
// to simplify construction of optional field values.
|
||||
// • Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, and String
|
||||
// take a value and return a pointer to a new instance of it,
|
||||
// to simplify construction of optional field values.
|
||||
//
|
||||
// Generated enum types usually have an Enum method which performs the
|
||||
// same operation.
|
||||
@@ -57,29 +57,29 @@
|
||||
//
|
||||
// # Extension accessors
|
||||
//
|
||||
// - [HasExtension], [GetExtension], [SetExtension], and [ClearExtension]
|
||||
// access extension field values in a protocol buffer message.
|
||||
// • HasExtension, GetExtension, SetExtension, and ClearExtension
|
||||
// access extension field values in a protocol buffer message.
|
||||
//
|
||||
// Extension fields are only supported in proto2.
|
||||
//
|
||||
// # Related packages
|
||||
//
|
||||
// - Package [google.golang.org/protobuf/encoding/protojson] converts messages to
|
||||
// and from JSON.
|
||||
// • Package "google.golang.org/protobuf/encoding/protojson" converts messages to
|
||||
// and from JSON.
|
||||
//
|
||||
// - Package [google.golang.org/protobuf/encoding/prototext] converts messages to
|
||||
// and from the text format.
|
||||
// • Package "google.golang.org/protobuf/encoding/prototext" converts messages to
|
||||
// and from the text format.
|
||||
//
|
||||
// - Package [google.golang.org/protobuf/reflect/protoreflect] provides a
|
||||
// reflection interface for protocol buffer data types.
|
||||
// • Package "google.golang.org/protobuf/reflect/protoreflect" provides a
|
||||
// reflection interface for protocol buffer data types.
|
||||
//
|
||||
// - Package [google.golang.org/protobuf/testing/protocmp] provides features
|
||||
// to compare protocol buffer messages with the [github.com/google/go-cmp/cmp]
|
||||
// package.
|
||||
// • Package "google.golang.org/protobuf/testing/protocmp" provides features
|
||||
// to compare protocol buffer messages with the "github.com/google/go-cmp/cmp"
|
||||
// package.
|
||||
//
|
||||
// - Package [google.golang.org/protobuf/types/dynamicpb] provides a dynamic
|
||||
// message type, suitable for working with messages where the protocol buffer
|
||||
// type is only known at runtime.
|
||||
// • Package "google.golang.org/protobuf/types/dynamicpb" provides a dynamic
|
||||
// message type, suitable for working with messages where the protocol buffer
|
||||
// type is only known at runtime.
|
||||
//
|
||||
// This module contains additional packages for more specialized use cases.
|
||||
// Consult the individual package documentation for details.
|
||||
|
||||
46
vendor/google.golang.org/protobuf/proto/encode.go
generated
vendored
46
vendor/google.golang.org/protobuf/proto/encode.go
generated
vendored
@@ -5,17 +5,12 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
"google.golang.org/protobuf/internal/encoding/messageset"
|
||||
"google.golang.org/protobuf/internal/order"
|
||||
"google.golang.org/protobuf/internal/pragma"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
|
||||
protoerrors "google.golang.org/protobuf/internal/errors"
|
||||
)
|
||||
|
||||
// MarshalOptions configures the marshaler.
|
||||
@@ -75,32 +70,7 @@ type MarshalOptions struct {
|
||||
UseCachedSize bool
|
||||
}
|
||||
|
||||
// flags turns the specified MarshalOptions (user-facing) into
|
||||
// protoiface.MarshalInputFlags (used internally by the marshaler).
|
||||
//
|
||||
// See impl.marshalOptions.Options for the inverse operation.
|
||||
func (o MarshalOptions) flags() protoiface.MarshalInputFlags {
|
||||
var flags protoiface.MarshalInputFlags
|
||||
|
||||
// Note: o.AllowPartial is always forced to true by MarshalOptions.marshal,
|
||||
// which is why it is not a part of MarshalInputFlags.
|
||||
|
||||
if o.Deterministic {
|
||||
flags |= protoiface.MarshalDeterministic
|
||||
}
|
||||
|
||||
if o.UseCachedSize {
|
||||
flags |= protoiface.MarshalUseCachedSize
|
||||
}
|
||||
|
||||
return flags
|
||||
}
|
||||
|
||||
// Marshal returns the wire-format encoding of m.
|
||||
//
|
||||
// This is the most common entry point for encoding a Protobuf message.
|
||||
//
|
||||
// See the [MarshalOptions] type if you need more control.
|
||||
func Marshal(m Message) ([]byte, error) {
|
||||
// Treat nil message interface as an empty message; nothing to output.
|
||||
if m == nil {
|
||||
@@ -146,9 +116,6 @@ func emptyBytesForMessage(m Message) []byte {
|
||||
|
||||
// MarshalAppend appends the wire-format encoding of m to b,
|
||||
// returning the result.
|
||||
//
|
||||
// This is a less common entry point than [Marshal], which is only needed if you
|
||||
// need to supply your own buffers for performance reasons.
|
||||
func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) {
|
||||
// Treat nil message interface as an empty message; nothing to append.
|
||||
if m == nil {
|
||||
@@ -162,7 +129,7 @@ func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) {
|
||||
// MarshalState returns the wire-format encoding of a message.
|
||||
//
|
||||
// This method permits fine-grained control over the marshaler.
|
||||
// Most users should use [Marshal] instead.
|
||||
// Most users should use Marshal instead.
|
||||
func (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||
return o.marshal(in.Buf, in.Message)
|
||||
}
|
||||
@@ -178,7 +145,12 @@ func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoifac
|
||||
in := protoiface.MarshalInput{
|
||||
Message: m,
|
||||
Buf: b,
|
||||
Flags: o.flags(),
|
||||
}
|
||||
if o.Deterministic {
|
||||
in.Flags |= protoiface.MarshalDeterministic
|
||||
}
|
||||
if o.UseCachedSize {
|
||||
in.Flags |= protoiface.MarshalUseCachedSize
|
||||
}
|
||||
if methods.Size != nil {
|
||||
sout := methods.Size(protoiface.SizeInput{
|
||||
@@ -196,10 +168,6 @@ func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoifac
|
||||
out.Buf, err = o.marshalMessageSlow(b, m)
|
||||
}
|
||||
if err != nil {
|
||||
var mismatch *protoerrors.SizeMismatchError
|
||||
if errors.As(err, &mismatch) {
|
||||
return out, fmt.Errorf("marshaling %s: %v", string(m.Descriptor().FullName()), err)
|
||||
}
|
||||
return out, err
|
||||
}
|
||||
if allowPartial {
|
||||
|
||||
13
vendor/google.golang.org/protobuf/proto/extension.go
generated
vendored
13
vendor/google.golang.org/protobuf/proto/extension.go
generated
vendored
@@ -11,25 +11,22 @@ import (
|
||||
// HasExtension reports whether an extension field is populated.
|
||||
// It returns false if m is invalid or if xt does not extend m.
|
||||
func HasExtension(m Message, xt protoreflect.ExtensionType) bool {
|
||||
// Treat nil message interface or descriptor as an empty message; no populated
|
||||
// fields.
|
||||
if m == nil || xt == nil {
|
||||
// Treat nil message interface as an empty message; no populated fields.
|
||||
if m == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
// As a special-case, we reports invalid or mismatching descriptors
|
||||
// as always not being populated (since they aren't).
|
||||
mr := m.ProtoReflect()
|
||||
xd := xt.TypeDescriptor()
|
||||
if mr.Descriptor() != xd.ContainingMessage() {
|
||||
if xt == nil || m.ProtoReflect().Descriptor() != xt.TypeDescriptor().ContainingMessage() {
|
||||
return false
|
||||
}
|
||||
|
||||
return mr.Has(xd)
|
||||
return m.ProtoReflect().Has(xt.TypeDescriptor())
|
||||
}
|
||||
|
||||
// ClearExtension clears an extension field such that subsequent
|
||||
// [HasExtension] calls return false.
|
||||
// HasExtension calls return false.
|
||||
// It panics if m is invalid or if xt does not extend m.
|
||||
func ClearExtension(m Message, xt protoreflect.ExtensionType) {
|
||||
m.ProtoReflect().Clear(xt.TypeDescriptor())
|
||||
|
||||
2
vendor/google.golang.org/protobuf/proto/merge.go
generated
vendored
2
vendor/google.golang.org/protobuf/proto/merge.go
generated
vendored
@@ -21,7 +21,7 @@ import (
|
||||
// The unknown fields of src are appended to the unknown fields of dst.
|
||||
//
|
||||
// It is semantically equivalent to unmarshaling the encoded form of src
|
||||
// into dst with the [UnmarshalOptions.Merge] option specified.
|
||||
// into dst with the UnmarshalOptions.Merge option specified.
|
||||
func Merge(dst, src Message) {
|
||||
// TODO: Should nil src be treated as semantically equivalent to a
|
||||
// untyped, read-only, empty message? What about a nil dst?
|
||||
|
||||
7
vendor/google.golang.org/protobuf/proto/messageset.go
generated
vendored
7
vendor/google.golang.org/protobuf/proto/messageset.go
generated
vendored
@@ -47,16 +47,11 @@ func (o MarshalOptions) marshalMessageSet(b []byte, m protoreflect.Message) ([]b
|
||||
func (o MarshalOptions) marshalMessageSetField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) {
|
||||
b = messageset.AppendFieldStart(b, fd.Number())
|
||||
b = protowire.AppendTag(b, messageset.FieldMessage, protowire.BytesType)
|
||||
calculatedSize := o.Size(value.Message().Interface())
|
||||
b = protowire.AppendVarint(b, uint64(calculatedSize))
|
||||
before := len(b)
|
||||
b = protowire.AppendVarint(b, uint64(o.Size(value.Message().Interface())))
|
||||
b, err := o.marshalMessage(b, value.Message())
|
||||
if err != nil {
|
||||
return b, err
|
||||
}
|
||||
if measuredSize := len(b) - before; calculatedSize != measuredSize {
|
||||
return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize)
|
||||
}
|
||||
b = messageset.AppendFieldEnd(b)
|
||||
return b, nil
|
||||
}
|
||||
|
||||
18
vendor/google.golang.org/protobuf/proto/proto.go
generated
vendored
18
vendor/google.golang.org/protobuf/proto/proto.go
generated
vendored
@@ -15,20 +15,18 @@ import (
|
||||
// protobuf module that accept a Message, except where otherwise specified.
|
||||
//
|
||||
// This is the v2 interface definition for protobuf messages.
|
||||
// The v1 interface definition is [github.com/golang/protobuf/proto.Message].
|
||||
// The v1 interface definition is "github.com/golang/protobuf/proto".Message.
|
||||
//
|
||||
// - To convert a v1 message to a v2 message,
|
||||
// use [google.golang.org/protobuf/protoadapt.MessageV2Of].
|
||||
// - To convert a v2 message to a v1 message,
|
||||
// use [google.golang.org/protobuf/protoadapt.MessageV1Of].
|
||||
// To convert a v1 message to a v2 message,
|
||||
// use "github.com/golang/protobuf/proto".MessageV2.
|
||||
// To convert a v2 message to a v1 message,
|
||||
// use "github.com/golang/protobuf/proto".MessageV1.
|
||||
type Message = protoreflect.ProtoMessage
|
||||
|
||||
// Error matches all errors produced by packages in the protobuf module
|
||||
// according to [errors.Is].
|
||||
// Error matches all errors produced by packages in the protobuf module.
|
||||
//
|
||||
// Example usage:
|
||||
//
|
||||
// if errors.Is(err, proto.Error) { ... }
|
||||
// That is, errors.Is(err, Error) reports whether an error is produced
|
||||
// by this module.
|
||||
var Error error
|
||||
|
||||
func init() {
|
||||
|
||||
12
vendor/google.golang.org/protobuf/proto/size.go
generated
vendored
12
vendor/google.golang.org/protobuf/proto/size.go
generated
vendored
@@ -34,7 +34,6 @@ func (o MarshalOptions) size(m protoreflect.Message) (size int) {
|
||||
if methods != nil && methods.Size != nil {
|
||||
out := methods.Size(protoiface.SizeInput{
|
||||
Message: m,
|
||||
Flags: o.flags(),
|
||||
})
|
||||
return out.Size
|
||||
}
|
||||
@@ -43,7 +42,6 @@ func (o MarshalOptions) size(m protoreflect.Message) (size int) {
|
||||
// This case is mainly used for legacy types with a Marshal method.
|
||||
out, _ := methods.Marshal(protoiface.MarshalInput{
|
||||
Message: m,
|
||||
Flags: o.flags(),
|
||||
})
|
||||
return len(out.Buf)
|
||||
}
|
||||
@@ -75,27 +73,23 @@ func (o MarshalOptions) sizeField(fd protoreflect.FieldDescriptor, value protore
|
||||
}
|
||||
|
||||
func (o MarshalOptions) sizeList(num protowire.Number, fd protoreflect.FieldDescriptor, list protoreflect.List) (size int) {
|
||||
sizeTag := protowire.SizeTag(num)
|
||||
|
||||
if fd.IsPacked() && list.Len() > 0 {
|
||||
content := 0
|
||||
for i, llen := 0, list.Len(); i < llen; i++ {
|
||||
content += o.sizeSingular(num, fd.Kind(), list.Get(i))
|
||||
}
|
||||
return sizeTag + protowire.SizeBytes(content)
|
||||
return protowire.SizeTag(num) + protowire.SizeBytes(content)
|
||||
}
|
||||
|
||||
for i, llen := 0, list.Len(); i < llen; i++ {
|
||||
size += sizeTag + o.sizeSingular(num, fd.Kind(), list.Get(i))
|
||||
size += protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), list.Get(i))
|
||||
}
|
||||
return size
|
||||
}
|
||||
|
||||
func (o MarshalOptions) sizeMap(num protowire.Number, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) (size int) {
|
||||
sizeTag := protowire.SizeTag(num)
|
||||
|
||||
mapv.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool {
|
||||
size += sizeTag
|
||||
size += protowire.SizeTag(num)
|
||||
size += protowire.SizeBytes(o.sizeField(fd.MapKey(), key.Value()) + o.sizeField(fd.MapValue(), value))
|
||||
return true
|
||||
})
|
||||
|
||||
87
vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
generated
vendored
87
vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
generated
vendored
@@ -10,46 +10,46 @@
|
||||
//
|
||||
// # Protocol Buffer Descriptors
|
||||
//
|
||||
// Protobuf descriptors (e.g., [EnumDescriptor] or [MessageDescriptor])
|
||||
// Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor)
|
||||
// are immutable objects that represent protobuf type information.
|
||||
// They are wrappers around the messages declared in descriptor.proto.
|
||||
// Protobuf descriptors alone lack any information regarding Go types.
|
||||
//
|
||||
// Enums and messages generated by this module implement [Enum] and [ProtoMessage],
|
||||
// Enums and messages generated by this module implement Enum and ProtoMessage,
|
||||
// where the Descriptor and ProtoReflect.Descriptor accessors respectively
|
||||
// return the protobuf descriptor for the values.
|
||||
//
|
||||
// The protobuf descriptor interfaces are not meant to be implemented by
|
||||
// user code since they might need to be extended in the future to support
|
||||
// additions to the protobuf language.
|
||||
// The [google.golang.org/protobuf/reflect/protodesc] package converts between
|
||||
// The "google.golang.org/protobuf/reflect/protodesc" package converts between
|
||||
// google.protobuf.DescriptorProto messages and protobuf descriptors.
|
||||
//
|
||||
// # Go Type Descriptors
|
||||
//
|
||||
// A type descriptor (e.g., [EnumType] or [MessageType]) is a constructor for
|
||||
// A type descriptor (e.g., EnumType or MessageType) is a constructor for
|
||||
// a concrete Go type that represents the associated protobuf descriptor.
|
||||
// There is commonly a one-to-one relationship between protobuf descriptors and
|
||||
// Go type descriptors, but it can potentially be a one-to-many relationship.
|
||||
//
|
||||
// Enums and messages generated by this module implement [Enum] and [ProtoMessage],
|
||||
// Enums and messages generated by this module implement Enum and ProtoMessage,
|
||||
// where the Type and ProtoReflect.Type accessors respectively
|
||||
// return the protobuf descriptor for the values.
|
||||
//
|
||||
// The [google.golang.org/protobuf/types/dynamicpb] package can be used to
|
||||
// The "google.golang.org/protobuf/types/dynamicpb" package can be used to
|
||||
// create Go type descriptors from protobuf descriptors.
|
||||
//
|
||||
// # Value Interfaces
|
||||
//
|
||||
// The [Enum] and [Message] interfaces provide a reflective view over an
|
||||
// The Enum and Message interfaces provide a reflective view over an
|
||||
// enum or message instance. For enums, it provides the ability to retrieve
|
||||
// the enum value number for any concrete enum type. For messages, it provides
|
||||
// the ability to access or manipulate fields of the message.
|
||||
//
|
||||
// To convert a [google.golang.org/protobuf/proto.Message] to a [protoreflect.Message], use the
|
||||
// To convert a proto.Message to a protoreflect.Message, use the
|
||||
// former's ProtoReflect method. Since the ProtoReflect method is new to the
|
||||
// v2 message interface, it may not be present on older message implementations.
|
||||
// The [github.com/golang/protobuf/proto.MessageReflect] function can be used
|
||||
// The "github.com/golang/protobuf/proto".MessageReflect function can be used
|
||||
// to obtain a reflective view on older messages.
|
||||
//
|
||||
// # Relationships
|
||||
@@ -71,12 +71,12 @@
|
||||
// │ │
|
||||
// └────────────────── Type() ───────┘
|
||||
//
|
||||
// • An [EnumType] describes a concrete Go enum type.
|
||||
// • An EnumType describes a concrete Go enum type.
|
||||
// It has an EnumDescriptor and can construct an Enum instance.
|
||||
//
|
||||
// • An [EnumDescriptor] describes an abstract protobuf enum type.
|
||||
// • An EnumDescriptor describes an abstract protobuf enum type.
|
||||
//
|
||||
// • An [Enum] is a concrete enum instance. Generated enums implement Enum.
|
||||
// • An Enum is a concrete enum instance. Generated enums implement Enum.
|
||||
//
|
||||
// ┌──────────────── New() ─────────────────┐
|
||||
// │ │
|
||||
@@ -90,26 +90,24 @@
|
||||
// │ │
|
||||
// └─────────────────── Type() ─────────┘
|
||||
//
|
||||
// • A [MessageType] describes a concrete Go message type.
|
||||
// It has a [MessageDescriptor] and can construct a [Message] instance.
|
||||
// Just as how Go's [reflect.Type] is a reflective description of a Go type,
|
||||
// a [MessageType] is a reflective description of a Go type for a protobuf message.
|
||||
// • A MessageType describes a concrete Go message type.
|
||||
// It has a MessageDescriptor and can construct a Message instance.
|
||||
// Just as how Go's reflect.Type is a reflective description of a Go type,
|
||||
// a MessageType is a reflective description of a Go type for a protobuf message.
|
||||
//
|
||||
// • A [MessageDescriptor] describes an abstract protobuf message type.
|
||||
// It has no understanding of Go types. In order to construct a [MessageType]
|
||||
// from just a [MessageDescriptor], you can consider looking up the message type
|
||||
// in the global registry using the FindMessageByName method on
|
||||
// [google.golang.org/protobuf/reflect/protoregistry.GlobalTypes]
|
||||
// or constructing a dynamic [MessageType] using
|
||||
// [google.golang.org/protobuf/types/dynamicpb.NewMessageType].
|
||||
// • A MessageDescriptor describes an abstract protobuf message type.
|
||||
// It has no understanding of Go types. In order to construct a MessageType
|
||||
// from just a MessageDescriptor, you can consider looking up the message type
|
||||
// in the global registry using protoregistry.GlobalTypes.FindMessageByName
|
||||
// or constructing a dynamic MessageType using dynamicpb.NewMessageType.
|
||||
//
|
||||
// • A [Message] is a reflective view over a concrete message instance.
|
||||
// Generated messages implement [ProtoMessage], which can convert to a [Message].
|
||||
// Just as how Go's [reflect.Value] is a reflective view over a Go value,
|
||||
// a [Message] is a reflective view over a concrete protobuf message instance.
|
||||
// Using Go reflection as an analogy, the [ProtoMessage.ProtoReflect] method is similar to
|
||||
// calling [reflect.ValueOf], and the [Message.Interface] method is similar to
|
||||
// calling [reflect.Value.Interface].
|
||||
// • A Message is a reflective view over a concrete message instance.
|
||||
// Generated messages implement ProtoMessage, which can convert to a Message.
|
||||
// Just as how Go's reflect.Value is a reflective view over a Go value,
|
||||
// a Message is a reflective view over a concrete protobuf message instance.
|
||||
// Using Go reflection as an analogy, the ProtoReflect method is similar to
|
||||
// calling reflect.ValueOf, and the Message.Interface method is similar to
|
||||
// calling reflect.Value.Interface.
|
||||
//
|
||||
// ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐
|
||||
// │ V │ V
|
||||
@@ -121,15 +119,15 @@
|
||||
// │ │
|
||||
// └────── implements ────────┘
|
||||
//
|
||||
// • An [ExtensionType] describes a concrete Go implementation of an extension.
|
||||
// It has an [ExtensionTypeDescriptor] and can convert to/from
|
||||
// an abstract [Value] and a Go value.
|
||||
// • An ExtensionType describes a concrete Go implementation of an extension.
|
||||
// It has an ExtensionTypeDescriptor and can convert to/from
|
||||
// abstract Values and Go values.
|
||||
//
|
||||
// • An [ExtensionTypeDescriptor] is an [ExtensionDescriptor]
|
||||
// which also has an [ExtensionType].
|
||||
// • An ExtensionTypeDescriptor is an ExtensionDescriptor
|
||||
// which also has an ExtensionType.
|
||||
//
|
||||
// • An [ExtensionDescriptor] describes an abstract protobuf extension field and
|
||||
// may not always be an [ExtensionTypeDescriptor].
|
||||
// • An ExtensionDescriptor describes an abstract protobuf extension field and
|
||||
// may not always be an ExtensionTypeDescriptor.
|
||||
package protoreflect
|
||||
|
||||
import (
|
||||
@@ -144,7 +142,7 @@ type doNotImplement pragma.DoNotImplement
|
||||
|
||||
// ProtoMessage is the top-level interface that all proto messages implement.
|
||||
// This is declared in the protoreflect package to avoid a cyclic dependency;
|
||||
// use the [google.golang.org/protobuf/proto.Message] type instead, which aliases this type.
|
||||
// use the proto.Message type instead, which aliases this type.
|
||||
type ProtoMessage interface{ ProtoReflect() Message }
|
||||
|
||||
// Syntax is the language version of the proto file.
|
||||
@@ -153,15 +151,14 @@ type Syntax syntax
|
||||
type syntax int8 // keep exact type opaque as the int type may change
|
||||
|
||||
const (
|
||||
Proto2 Syntax = 2
|
||||
Proto3 Syntax = 3
|
||||
Editions Syntax = 4
|
||||
Proto2 Syntax = 2
|
||||
Proto3 Syntax = 3
|
||||
)
|
||||
|
||||
// IsValid reports whether the syntax is valid.
|
||||
func (s Syntax) IsValid() bool {
|
||||
switch s {
|
||||
case Proto2, Proto3, Editions:
|
||||
case Proto2, Proto3:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
@@ -175,8 +172,6 @@ func (s Syntax) String() string {
|
||||
return "proto2"
|
||||
case Proto3:
|
||||
return "proto3"
|
||||
case Editions:
|
||||
return "editions"
|
||||
default:
|
||||
return fmt.Sprintf("<unknown:%d>", s)
|
||||
}
|
||||
@@ -441,7 +436,7 @@ type Names interface {
|
||||
// FullName is a qualified name that uniquely identifies a proto declaration.
|
||||
// A qualified name is the concatenation of the proto package along with the
|
||||
// fully-declared name (i.e., name of parent preceding the name of the child),
|
||||
// with a '.' delimiter placed between each [Name].
|
||||
// with a '.' delimiter placed between each Name.
|
||||
//
|
||||
// This should not have any leading or trailing dots.
|
||||
type FullName string // e.g., "google.protobuf.Field.Kind"
|
||||
@@ -485,7 +480,7 @@ func isLetterDigit(c byte) bool {
|
||||
}
|
||||
|
||||
// Name returns the short name, which is the last identifier segment.
|
||||
// A single segment FullName is the [Name] itself.
|
||||
// A single segment FullName is the Name itself.
|
||||
func (n FullName) Name() Name {
|
||||
if i := strings.LastIndexByte(string(n), '.'); i >= 0 {
|
||||
return Name(n[i+1:])
|
||||
|
||||
106
vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
generated
vendored
106
vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
generated
vendored
@@ -35,7 +35,7 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo)
|
||||
case 12:
|
||||
b = p.appendSingularField(b, "syntax", nil)
|
||||
case 14:
|
||||
case 13:
|
||||
b = p.appendSingularField(b, "edition", nil)
|
||||
}
|
||||
return b
|
||||
@@ -160,6 +160,8 @@ func (p *SourcePath) appendFileOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "java_generic_services", nil)
|
||||
case 18:
|
||||
b = p.appendSingularField(b, "py_generic_services", nil)
|
||||
case 42:
|
||||
b = p.appendSingularField(b, "php_generic_services", nil)
|
||||
case 23:
|
||||
b = p.appendSingularField(b, "deprecated", nil)
|
||||
case 31:
|
||||
@@ -178,8 +180,6 @@ func (p *SourcePath) appendFileOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "php_metadata_namespace", nil)
|
||||
case 45:
|
||||
b = p.appendSingularField(b, "ruby_package", nil)
|
||||
case 50:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
@@ -240,8 +240,6 @@ func (p *SourcePath) appendMessageOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "map_entry", nil)
|
||||
case 11:
|
||||
b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil)
|
||||
case 12:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
@@ -287,8 +285,6 @@ func (p *SourcePath) appendEnumOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "deprecated", nil)
|
||||
case 6:
|
||||
b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil)
|
||||
case 7:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
@@ -334,8 +330,6 @@ func (p *SourcePath) appendServiceOptions(b []byte) []byte {
|
||||
return b
|
||||
}
|
||||
switch (*p)[0] {
|
||||
case 34:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 33:
|
||||
b = p.appendSingularField(b, "deprecated", nil)
|
||||
case 999:
|
||||
@@ -367,41 +361,14 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "debug_redact", nil)
|
||||
case 17:
|
||||
b = p.appendSingularField(b, "retention", nil)
|
||||
case 19:
|
||||
b = p.appendRepeatedField(b, "targets", nil)
|
||||
case 20:
|
||||
b = p.appendRepeatedField(b, "edition_defaults", (*SourcePath).appendFieldOptions_EditionDefault)
|
||||
case 21:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 22:
|
||||
b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport)
|
||||
case 18:
|
||||
b = p.appendSingularField(b, "target", nil)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (p *SourcePath) appendFeatureSet(b []byte) []byte {
|
||||
if len(*p) == 0 {
|
||||
return b
|
||||
}
|
||||
switch (*p)[0] {
|
||||
case 1:
|
||||
b = p.appendSingularField(b, "field_presence", nil)
|
||||
case 2:
|
||||
b = p.appendSingularField(b, "enum_type", nil)
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "repeated_field_encoding", nil)
|
||||
case 4:
|
||||
b = p.appendSingularField(b, "utf8_validation", nil)
|
||||
case 5:
|
||||
b = p.appendSingularField(b, "message_encoding", nil)
|
||||
case 6:
|
||||
b = p.appendSingularField(b, "json_format", nil)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (p *SourcePath) appendUninterpretedOption(b []byte) []byte {
|
||||
if len(*p) == 0 {
|
||||
return b
|
||||
@@ -451,12 +418,6 @@ func (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte {
|
||||
switch (*p)[0] {
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
case 2:
|
||||
b = p.appendRepeatedField(b, "declaration", (*SourcePath).appendExtensionRangeOptions_Declaration)
|
||||
case 50:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "verification", nil)
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -466,8 +427,6 @@ func (p *SourcePath) appendOneofOptions(b []byte) []byte {
|
||||
return b
|
||||
}
|
||||
switch (*p)[0] {
|
||||
case 1:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
@@ -481,10 +440,6 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte {
|
||||
switch (*p)[0] {
|
||||
case 1:
|
||||
b = p.appendSingularField(b, "deprecated", nil)
|
||||
case 2:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "debug_redact", nil)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
@@ -500,44 +455,12 @@ func (p *SourcePath) appendMethodOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "deprecated", nil)
|
||||
case 34:
|
||||
b = p.appendSingularField(b, "idempotency_level", nil)
|
||||
case 35:
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte {
|
||||
if len(*p) == 0 {
|
||||
return b
|
||||
}
|
||||
switch (*p)[0] {
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "edition", nil)
|
||||
case 2:
|
||||
b = p.appendSingularField(b, "value", nil)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (p *SourcePath) appendFieldOptions_FeatureSupport(b []byte) []byte {
|
||||
if len(*p) == 0 {
|
||||
return b
|
||||
}
|
||||
switch (*p)[0] {
|
||||
case 1:
|
||||
b = p.appendSingularField(b, "edition_introduced", nil)
|
||||
case 2:
|
||||
b = p.appendSingularField(b, "edition_deprecated", nil)
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "deprecation_warning", nil)
|
||||
case 4:
|
||||
b = p.appendSingularField(b, "edition_removed", nil)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte {
|
||||
if len(*p) == 0 {
|
||||
return b
|
||||
@@ -550,22 +473,3 @@ func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte {
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (p *SourcePath) appendExtensionRangeOptions_Declaration(b []byte) []byte {
|
||||
if len(*p) == 0 {
|
||||
return b
|
||||
}
|
||||
switch (*p)[0] {
|
||||
case 1:
|
||||
b = p.appendSingularField(b, "number", nil)
|
||||
case 2:
|
||||
b = p.appendSingularField(b, "full_name", nil)
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "type", nil)
|
||||
case 5:
|
||||
b = p.appendSingularField(b, "reserved", nil)
|
||||
case 6:
|
||||
b = p.appendSingularField(b, "repeated", nil)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
50
vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
generated
vendored
50
vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
generated
vendored
@@ -12,7 +12,7 @@ package protoreflect
|
||||
// exactly identical. However, it is possible for the same semantically
|
||||
// identical proto type to be represented by multiple type descriptors.
|
||||
//
|
||||
// For example, suppose we have t1 and t2 which are both an [MessageDescriptor].
|
||||
// For example, suppose we have t1 and t2 which are both MessageDescriptors.
|
||||
// If t1 == t2, then the types are definitely equal and all accessors return
|
||||
// the same information. However, if t1 != t2, then it is still possible that
|
||||
// they still represent the same proto type (e.g., t1.FullName == t2.FullName).
|
||||
@@ -115,7 +115,7 @@ type Descriptor interface {
|
||||
// corresponds with the google.protobuf.FileDescriptorProto message.
|
||||
//
|
||||
// Top-level declarations:
|
||||
// [EnumDescriptor], [MessageDescriptor], [FieldDescriptor], and/or [ServiceDescriptor].
|
||||
// EnumDescriptor, MessageDescriptor, FieldDescriptor, and/or ServiceDescriptor.
|
||||
type FileDescriptor interface {
|
||||
Descriptor // Descriptor.FullName is identical to Package
|
||||
|
||||
@@ -180,8 +180,8 @@ type FileImport struct {
|
||||
// corresponds with the google.protobuf.DescriptorProto message.
|
||||
//
|
||||
// Nested declarations:
|
||||
// [FieldDescriptor], [OneofDescriptor], [FieldDescriptor], [EnumDescriptor],
|
||||
// and/or [MessageDescriptor].
|
||||
// FieldDescriptor, OneofDescriptor, FieldDescriptor, EnumDescriptor,
|
||||
// and/or MessageDescriptor.
|
||||
type MessageDescriptor interface {
|
||||
Descriptor
|
||||
|
||||
@@ -214,7 +214,7 @@ type MessageDescriptor interface {
|
||||
ExtensionRanges() FieldRanges
|
||||
// ExtensionRangeOptions returns the ith extension range options.
|
||||
//
|
||||
// To avoid a dependency cycle, this method returns a proto.Message] value,
|
||||
// To avoid a dependency cycle, this method returns a proto.Message value,
|
||||
// which always contains a google.protobuf.ExtensionRangeOptions message.
|
||||
// This method returns a typed nil-pointer if no options are present.
|
||||
// The caller must import the descriptorpb package to use this.
|
||||
@@ -231,9 +231,9 @@ type MessageDescriptor interface {
|
||||
}
|
||||
type isMessageDescriptor interface{ ProtoType(MessageDescriptor) }
|
||||
|
||||
// MessageType encapsulates a [MessageDescriptor] with a concrete Go implementation.
|
||||
// MessageType encapsulates a MessageDescriptor with a concrete Go implementation.
|
||||
// It is recommended that implementations of this interface also implement the
|
||||
// [MessageFieldTypes] interface.
|
||||
// MessageFieldTypes interface.
|
||||
type MessageType interface {
|
||||
// New returns a newly allocated empty message.
|
||||
// It may return nil for synthetic messages representing a map entry.
|
||||
@@ -249,19 +249,19 @@ type MessageType interface {
|
||||
Descriptor() MessageDescriptor
|
||||
}
|
||||
|
||||
// MessageFieldTypes extends a [MessageType] by providing type information
|
||||
// MessageFieldTypes extends a MessageType by providing type information
|
||||
// regarding enums and messages referenced by the message fields.
|
||||
type MessageFieldTypes interface {
|
||||
MessageType
|
||||
|
||||
// Enum returns the EnumType for the ith field in MessageDescriptor.Fields.
|
||||
// Enum returns the EnumType for the ith field in Descriptor.Fields.
|
||||
// It returns nil if the ith field is not an enum kind.
|
||||
// It panics if out of bounds.
|
||||
//
|
||||
// Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum()
|
||||
Enum(i int) EnumType
|
||||
|
||||
// Message returns the MessageType for the ith field in MessageDescriptor.Fields.
|
||||
// Message returns the MessageType for the ith field in Descriptor.Fields.
|
||||
// It returns nil if the ith field is not a message or group kind.
|
||||
// It panics if out of bounds.
|
||||
//
|
||||
@@ -286,8 +286,8 @@ type MessageDescriptors interface {
|
||||
// corresponds with the google.protobuf.FieldDescriptorProto message.
|
||||
//
|
||||
// It is used for both normal fields defined within the parent message
|
||||
// (e.g., [MessageDescriptor.Fields]) and fields that extend some remote message
|
||||
// (e.g., [FileDescriptor.Extensions] or [MessageDescriptor.Extensions]).
|
||||
// (e.g., MessageDescriptor.Fields) and fields that extend some remote message
|
||||
// (e.g., FileDescriptor.Extensions or MessageDescriptor.Extensions).
|
||||
type FieldDescriptor interface {
|
||||
Descriptor
|
||||
|
||||
@@ -344,7 +344,7 @@ type FieldDescriptor interface {
|
||||
// IsMap reports whether this field represents a map,
|
||||
// where the value type for the associated field is a Map.
|
||||
// It is equivalent to checking whether Cardinality is Repeated,
|
||||
// that the Kind is MessageKind, and that MessageDescriptor.IsMapEntry reports true.
|
||||
// that the Kind is MessageKind, and that Message.IsMapEntry reports true.
|
||||
IsMap() bool
|
||||
|
||||
// MapKey returns the field descriptor for the key in the map entry.
|
||||
@@ -419,7 +419,7 @@ type OneofDescriptor interface {
|
||||
|
||||
// IsSynthetic reports whether this is a synthetic oneof created to support
|
||||
// proto3 optional semantics. If true, Fields contains exactly one field
|
||||
// with FieldDescriptor.HasOptionalKeyword specified.
|
||||
// with HasOptionalKeyword specified.
|
||||
IsSynthetic() bool
|
||||
|
||||
// Fields is a list of fields belonging to this oneof.
|
||||
@@ -442,10 +442,10 @@ type OneofDescriptors interface {
|
||||
doNotImplement
|
||||
}
|
||||
|
||||
// ExtensionDescriptor is an alias of [FieldDescriptor] for documentation.
|
||||
// ExtensionDescriptor is an alias of FieldDescriptor for documentation.
|
||||
type ExtensionDescriptor = FieldDescriptor
|
||||
|
||||
// ExtensionTypeDescriptor is an [ExtensionDescriptor] with an associated [ExtensionType].
|
||||
// ExtensionTypeDescriptor is an ExtensionDescriptor with an associated ExtensionType.
|
||||
type ExtensionTypeDescriptor interface {
|
||||
ExtensionDescriptor
|
||||
|
||||
@@ -470,12 +470,12 @@ type ExtensionDescriptors interface {
|
||||
doNotImplement
|
||||
}
|
||||
|
||||
// ExtensionType encapsulates an [ExtensionDescriptor] with a concrete
|
||||
// ExtensionType encapsulates an ExtensionDescriptor with a concrete
|
||||
// Go implementation. The nested field descriptor must be for a extension field.
|
||||
//
|
||||
// While a normal field is a member of the parent message that it is declared
|
||||
// within (see [Descriptor.Parent]), an extension field is a member of some other
|
||||
// target message (see [FieldDescriptor.ContainingMessage]) and may have no
|
||||
// within (see Descriptor.Parent), an extension field is a member of some other
|
||||
// target message (see ExtensionDescriptor.Extendee) and may have no
|
||||
// relationship with the parent. However, the full name of an extension field is
|
||||
// relative to the parent that it is declared within.
|
||||
//
|
||||
@@ -532,7 +532,7 @@ type ExtensionType interface {
|
||||
// corresponds with the google.protobuf.EnumDescriptorProto message.
|
||||
//
|
||||
// Nested declarations:
|
||||
// [EnumValueDescriptor].
|
||||
// EnumValueDescriptor.
|
||||
type EnumDescriptor interface {
|
||||
Descriptor
|
||||
|
||||
@@ -544,17 +544,11 @@ type EnumDescriptor interface {
|
||||
// ReservedRanges is a list of reserved ranges of enum numbers.
|
||||
ReservedRanges() EnumRanges
|
||||
|
||||
// IsClosed reports whether this enum uses closed semantics.
|
||||
// See https://protobuf.dev/programming-guides/enum/#definitions.
|
||||
// Note: the Go protobuf implementation is not spec compliant and treats
|
||||
// all enums as open enums.
|
||||
IsClosed() bool
|
||||
|
||||
isEnumDescriptor
|
||||
}
|
||||
type isEnumDescriptor interface{ ProtoType(EnumDescriptor) }
|
||||
|
||||
// EnumType encapsulates an [EnumDescriptor] with a concrete Go implementation.
|
||||
// EnumType encapsulates an EnumDescriptor with a concrete Go implementation.
|
||||
type EnumType interface {
|
||||
// New returns an instance of this enum type with its value set to n.
|
||||
New(n EnumNumber) Enum
|
||||
@@ -616,7 +610,7 @@ type EnumValueDescriptors interface {
|
||||
// ServiceDescriptor describes a service and
|
||||
// corresponds with the google.protobuf.ServiceDescriptorProto message.
|
||||
//
|
||||
// Nested declarations: [MethodDescriptor].
|
||||
// Nested declarations: MethodDescriptor.
|
||||
type ServiceDescriptor interface {
|
||||
Descriptor
|
||||
|
||||
|
||||
24
vendor/google.golang.org/protobuf/reflect/protoreflect/value.go
generated
vendored
24
vendor/google.golang.org/protobuf/reflect/protoreflect/value.go
generated
vendored
@@ -27,16 +27,16 @@ type Enum interface {
|
||||
// Message is a reflective interface for a concrete message value,
|
||||
// encapsulating both type and value information for the message.
|
||||
//
|
||||
// Accessor/mutators for individual fields are keyed by [FieldDescriptor].
|
||||
// Accessor/mutators for individual fields are keyed by FieldDescriptor.
|
||||
// For non-extension fields, the descriptor must exactly match the
|
||||
// field known by the parent message.
|
||||
// For extension fields, the descriptor must implement [ExtensionTypeDescriptor],
|
||||
// extend the parent message (i.e., have the same message [FullName]), and
|
||||
// For extension fields, the descriptor must implement ExtensionTypeDescriptor,
|
||||
// extend the parent message (i.e., have the same message FullName), and
|
||||
// be within the parent's extension range.
|
||||
//
|
||||
// Each field [Value] can be a scalar or a composite type ([Message], [List], or [Map]).
|
||||
// See [Value] for the Go types associated with a [FieldDescriptor].
|
||||
// Providing a [Value] that is invalid or of an incorrect type panics.
|
||||
// Each field Value can be a scalar or a composite type (Message, List, or Map).
|
||||
// See Value for the Go types associated with a FieldDescriptor.
|
||||
// Providing a Value that is invalid or of an incorrect type panics.
|
||||
type Message interface {
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
@@ -152,7 +152,7 @@ type Message interface {
|
||||
// This method may return nil.
|
||||
//
|
||||
// The returned methods type is identical to
|
||||
// google.golang.org/protobuf/runtime/protoiface.Methods.
|
||||
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
||||
// Consult the protoiface package documentation for details.
|
||||
ProtoMethods() *methods
|
||||
}
|
||||
@@ -175,8 +175,8 @@ func (b RawFields) IsValid() bool {
|
||||
}
|
||||
|
||||
// List is a zero-indexed, ordered list.
|
||||
// The element [Value] type is determined by [FieldDescriptor.Kind].
|
||||
// Providing a [Value] that is invalid or of an incorrect type panics.
|
||||
// The element Value type is determined by FieldDescriptor.Kind.
|
||||
// Providing a Value that is invalid or of an incorrect type panics.
|
||||
type List interface {
|
||||
// Len reports the number of entries in the List.
|
||||
// Get, Set, and Truncate panic with out of bound indexes.
|
||||
@@ -226,9 +226,9 @@ type List interface {
|
||||
}
|
||||
|
||||
// Map is an unordered, associative map.
|
||||
// The entry [MapKey] type is determined by [FieldDescriptor.MapKey].Kind.
|
||||
// The entry [Value] type is determined by [FieldDescriptor.MapValue].Kind.
|
||||
// Providing a [MapKey] or [Value] that is invalid or of an incorrect type panics.
|
||||
// The entry MapKey type is determined by FieldDescriptor.MapKey.Kind.
|
||||
// The entry Value type is determined by FieldDescriptor.MapValue.Kind.
|
||||
// Providing a MapKey or Value that is invalid or of an incorrect type panics.
|
||||
type Map interface {
|
||||
// Len reports the number of elements in the map.
|
||||
Len() int
|
||||
|
||||
8
vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go
generated
vendored
8
vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go
generated
vendored
@@ -24,19 +24,19 @@ import (
|
||||
// Unlike the == operator, a NaN is equal to another NaN.
|
||||
//
|
||||
// - Enums are equal if they contain the same number.
|
||||
// Since [Value] does not contain an enum descriptor,
|
||||
// Since Value does not contain an enum descriptor,
|
||||
// enum values do not consider the type of the enum.
|
||||
//
|
||||
// - Other scalar values are equal if they contain the same value.
|
||||
//
|
||||
// - [Message] values are equal if they belong to the same message descriptor,
|
||||
// - Message values are equal if they belong to the same message descriptor,
|
||||
// have the same set of populated known and extension field values,
|
||||
// and the same set of unknown fields values.
|
||||
//
|
||||
// - [List] values are equal if they are the same length and
|
||||
// - Lists are equal if they are the same length and
|
||||
// each corresponding element is equal.
|
||||
//
|
||||
// - [Map] values are equal if they have the same set of keys and
|
||||
// - Maps are equal if they have the same set of keys and
|
||||
// the corresponding value for each key is equal.
|
||||
func (v1 Value) Equal(v2 Value) bool {
|
||||
return equalValue(v1, v2)
|
||||
|
||||
44
vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
generated
vendored
44
vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
generated
vendored
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
// Value is a union where only one Go type may be set at a time.
|
||||
// The Value is used to represent all possible values a field may take.
|
||||
// The following shows which Go type is used to represent each proto [Kind]:
|
||||
// The following shows which Go type is used to represent each proto Kind:
|
||||
//
|
||||
// ╔════════════╤═════════════════════════════════════╗
|
||||
// ║ Go type │ Protobuf kind ║
|
||||
@@ -31,22 +31,22 @@ import (
|
||||
//
|
||||
// Multiple protobuf Kinds may be represented by a single Go type if the type
|
||||
// can losslessly represent the information for the proto kind. For example,
|
||||
// [Int64Kind], [Sint64Kind], and [Sfixed64Kind] are all represented by int64,
|
||||
// Int64Kind, Sint64Kind, and Sfixed64Kind are all represented by int64,
|
||||
// but use different integer encoding methods.
|
||||
//
|
||||
// The [List] or [Map] types are used if the field cardinality is repeated.
|
||||
// A field is a [List] if [FieldDescriptor.IsList] reports true.
|
||||
// A field is a [Map] if [FieldDescriptor.IsMap] reports true.
|
||||
// The List or Map types are used if the field cardinality is repeated.
|
||||
// A field is a List if FieldDescriptor.IsList reports true.
|
||||
// A field is a Map if FieldDescriptor.IsMap reports true.
|
||||
//
|
||||
// Converting to/from a Value and a concrete Go value panics on type mismatch.
|
||||
// For example, [ValueOf]("hello").Int() panics because this attempts to
|
||||
// For example, ValueOf("hello").Int() panics because this attempts to
|
||||
// retrieve an int64 from a string.
|
||||
//
|
||||
// [List], [Map], and [Message] Values are called "composite" values.
|
||||
// List, Map, and Message Values are called "composite" values.
|
||||
//
|
||||
// A composite Value may alias (reference) memory at some location,
|
||||
// such that changes to the Value updates the that location.
|
||||
// A composite value acquired with a Mutable method, such as [Message.Mutable],
|
||||
// A composite value acquired with a Mutable method, such as Message.Mutable,
|
||||
// always references the source object.
|
||||
//
|
||||
// For example:
|
||||
@@ -65,7 +65,7 @@ import (
|
||||
// // appending to the List here may or may not modify the message.
|
||||
// list.Append(protoreflect.ValueOfInt32(0))
|
||||
//
|
||||
// Some operations, such as [Message.Get], may return an "empty, read-only"
|
||||
// Some operations, such as Message.Get, may return an "empty, read-only"
|
||||
// composite Value. Modifying an empty, read-only value panics.
|
||||
type Value value
|
||||
|
||||
@@ -306,7 +306,7 @@ func (v Value) Float() float64 {
|
||||
}
|
||||
}
|
||||
|
||||
// String returns v as a string. Since this method implements [fmt.Stringer],
|
||||
// String returns v as a string. Since this method implements fmt.Stringer,
|
||||
// this returns the formatted string value for any non-string type.
|
||||
func (v Value) String() string {
|
||||
switch v.typ {
|
||||
@@ -327,7 +327,7 @@ func (v Value) Bytes() []byte {
|
||||
}
|
||||
}
|
||||
|
||||
// Enum returns v as a [EnumNumber] and panics if the type is not a [EnumNumber].
|
||||
// Enum returns v as a EnumNumber and panics if the type is not a EnumNumber.
|
||||
func (v Value) Enum() EnumNumber {
|
||||
switch v.typ {
|
||||
case enumType:
|
||||
@@ -337,7 +337,7 @@ func (v Value) Enum() EnumNumber {
|
||||
}
|
||||
}
|
||||
|
||||
// Message returns v as a [Message] and panics if the type is not a [Message].
|
||||
// Message returns v as a Message and panics if the type is not a Message.
|
||||
func (v Value) Message() Message {
|
||||
switch vi := v.getIface().(type) {
|
||||
case Message:
|
||||
@@ -347,7 +347,7 @@ func (v Value) Message() Message {
|
||||
}
|
||||
}
|
||||
|
||||
// List returns v as a [List] and panics if the type is not a [List].
|
||||
// List returns v as a List and panics if the type is not a List.
|
||||
func (v Value) List() List {
|
||||
switch vi := v.getIface().(type) {
|
||||
case List:
|
||||
@@ -357,7 +357,7 @@ func (v Value) List() List {
|
||||
}
|
||||
}
|
||||
|
||||
// Map returns v as a [Map] and panics if the type is not a [Map].
|
||||
// Map returns v as a Map and panics if the type is not a Map.
|
||||
func (v Value) Map() Map {
|
||||
switch vi := v.getIface().(type) {
|
||||
case Map:
|
||||
@@ -367,7 +367,7 @@ func (v Value) Map() Map {
|
||||
}
|
||||
}
|
||||
|
||||
// MapKey returns v as a [MapKey] and panics for invalid [MapKey] types.
|
||||
// MapKey returns v as a MapKey and panics for invalid MapKey types.
|
||||
func (v Value) MapKey() MapKey {
|
||||
switch v.typ {
|
||||
case boolType, int32Type, int64Type, uint32Type, uint64Type, stringType:
|
||||
@@ -378,8 +378,8 @@ func (v Value) MapKey() MapKey {
|
||||
}
|
||||
|
||||
// MapKey is used to index maps, where the Go type of the MapKey must match
|
||||
// the specified key [Kind] (see [MessageDescriptor.IsMapEntry]).
|
||||
// The following shows what Go type is used to represent each proto [Kind]:
|
||||
// the specified key Kind (see MessageDescriptor.IsMapEntry).
|
||||
// The following shows what Go type is used to represent each proto Kind:
|
||||
//
|
||||
// ╔═════════╤═════════════════════════════════════╗
|
||||
// ║ Go type │ Protobuf kind ║
|
||||
@@ -392,13 +392,13 @@ func (v Value) MapKey() MapKey {
|
||||
// ║ string │ StringKind ║
|
||||
// ╚═════════╧═════════════════════════════════════╝
|
||||
//
|
||||
// A MapKey is constructed and accessed through a [Value]:
|
||||
// A MapKey is constructed and accessed through a Value:
|
||||
//
|
||||
// k := ValueOf("hash").MapKey() // convert string to MapKey
|
||||
// s := k.String() // convert MapKey to string
|
||||
//
|
||||
// The MapKey is a strict subset of valid types used in [Value];
|
||||
// converting a [Value] to a MapKey with an invalid type panics.
|
||||
// The MapKey is a strict subset of valid types used in Value;
|
||||
// converting a Value to a MapKey with an invalid type panics.
|
||||
type MapKey value
|
||||
|
||||
// IsValid reports whether k is populated with a value.
|
||||
@@ -426,13 +426,13 @@ func (k MapKey) Uint() uint64 {
|
||||
return Value(k).Uint()
|
||||
}
|
||||
|
||||
// String returns k as a string. Since this method implements [fmt.Stringer],
|
||||
// String returns k as a string. Since this method implements fmt.Stringer,
|
||||
// this returns the formatted string value for any non-string type.
|
||||
func (k MapKey) String() string {
|
||||
return Value(k).String()
|
||||
}
|
||||
|
||||
// Value returns k as a [Value].
|
||||
// Value returns k as a Value.
|
||||
func (k MapKey) Value() Value {
|
||||
return Value(k)
|
||||
}
|
||||
|
||||
24
vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
generated
vendored
24
vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
generated
vendored
@@ -5,12 +5,12 @@
|
||||
// Package protoregistry provides data structures to register and lookup
|
||||
// protobuf descriptor types.
|
||||
//
|
||||
// The [Files] registry contains file descriptors and provides the ability
|
||||
// The Files registry contains file descriptors and provides the ability
|
||||
// to iterate over the files or lookup a specific descriptor within the files.
|
||||
// [Files] only contains protobuf descriptors and has no understanding of Go
|
||||
// Files only contains protobuf descriptors and has no understanding of Go
|
||||
// type information that may be associated with each descriptor.
|
||||
//
|
||||
// The [Types] registry contains descriptor types for which there is a known
|
||||
// The Types registry contains descriptor types for which there is a known
|
||||
// Go type associated with that descriptor. It provides the ability to iterate
|
||||
// over the registered types or lookup a type by name.
|
||||
package protoregistry
|
||||
@@ -218,7 +218,7 @@ func (r *Files) checkGenProtoConflict(path string) {
|
||||
|
||||
// FindDescriptorByName looks up a descriptor by the full name.
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
func (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -310,7 +310,7 @@ func (s *nameSuffix) Pop() (name protoreflect.Name) {
|
||||
|
||||
// FindFileByPath looks up a file by the path.
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns an error if multiple files have the same path.
|
||||
func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {
|
||||
if r == nil {
|
||||
@@ -431,7 +431,7 @@ func rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflec
|
||||
// A compliant implementation must deterministically return the same type
|
||||
// if no error is encountered.
|
||||
//
|
||||
// The [Types] type implements this interface.
|
||||
// The Types type implements this interface.
|
||||
type MessageTypeResolver interface {
|
||||
// FindMessageByName looks up a message by its full name.
|
||||
// E.g., "google.protobuf.Any"
|
||||
@@ -451,7 +451,7 @@ type MessageTypeResolver interface {
|
||||
// A compliant implementation must deterministically return the same type
|
||||
// if no error is encountered.
|
||||
//
|
||||
// The [Types] type implements this interface.
|
||||
// The Types type implements this interface.
|
||||
type ExtensionTypeResolver interface {
|
||||
// FindExtensionByName looks up a extension field by the field's full name.
|
||||
// Note that this is the full name of the field as determined by
|
||||
@@ -590,7 +590,7 @@ func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interfac
|
||||
// FindEnumByName looks up an enum by its full name.
|
||||
// E.g., "google.protobuf.Field.Kind".
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -611,7 +611,7 @@ func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumTyp
|
||||
// FindMessageByName looks up a message by its full name,
|
||||
// e.g. "google.protobuf.Any".
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -632,7 +632,7 @@ func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.M
|
||||
// FindMessageByURL looks up a message by a URL identifier.
|
||||
// See documentation on google.protobuf.Any.type_url for the URL format.
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {
|
||||
// This function is similar to FindMessageByName but
|
||||
// truncates anything before and including '/' in the URL.
|
||||
@@ -662,7 +662,7 @@ func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {
|
||||
// where the extension is declared and is unrelated to the full name of the
|
||||
// message being extended.
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -703,7 +703,7 @@ func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.E
|
||||
// FindExtensionByNumber looks up a extension field by the field number
|
||||
// within some parent message, identified by full name.
|
||||
//
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
// This returns (nil, NotFound) if not found.
|
||||
func (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
|
||||
Reference in New Issue
Block a user