package protoreflect

Import Path
	google.golang.org/protobuf/reflect/protoreflect (on go.dev)

Dependency Relation
	imports 7 packages, and imported by 27 packages

Involved Source Files methods.go Package protoreflect provides interfaces to dynamically manipulate messages. This package includes type descriptors which describe the structure of types defined in proto source files and value interfaces which provide the ability to examine and manipulate the contents of messages. Protocol Buffer Descriptors 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, 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 google.protobuf.DescriptorProto messages and protobuf descriptors. Go Type Descriptors 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, 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 create Go type descriptors from protobuf descriptors. Value Interfaces 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 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 to obtain a reflective view on older messages. Relationships The following diagrams demonstrate the relationships between various types declared in this package. ┌───────────────────────────────────┐ V │ ┌────────────── New(n) ─────────────┐ │ │ │ │ │ ┌──── Descriptor() ──┐ │ ┌── Number() ──┐ │ │ │ V V │ V │ ╔════════════╗ ╔════════════════╗ ╔════════╗ ╔════════════╗ ║ EnumType ║ ║ EnumDescriptor ║ ║ Enum ║ ║ EnumNumber ║ ╚════════════╝ ╚════════════════╝ ╚════════╝ ╚════════════╝ Λ Λ │ │ │ └─── Descriptor() ──┘ │ │ │ └────────────────── 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 Enum is a concrete enum instance. Generated enums implement Enum. ┌──────────────── New() ─────────────────┐ │ │ │ ┌─── Descriptor() ─────┐ │ ┌── Interface() ───┐ │ │ V V │ V ╔═════════════╗ ╔═══════════════════╗ ╔═════════╗ ╔══════════════╗ ║ MessageType ║ ║ MessageDescriptor ║ ║ Message ║ ║ ProtoMessage ║ ╚═════════════╝ ╚═══════════════════╝ ╚═════════╝ ╚══════════════╝ Λ Λ │ │ Λ │ │ └──── Descriptor() ────┘ │ └─ ProtoReflect() ─┘ │ │ └─────────────────── Type() ─────────┘ • A MessageType describes a concrete Go message type. It has a MessageDescriptor and can construct a Message instance. • A MessageDescriptor describes an abstract protobuf message type. • A Message is a concrete message instance. Generated messages implement ProtoMessage, which can convert to/from a Message. ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐ │ V │ V ╔═══════════════╗ ╔═════════════════════════╗ ╔═════════════════════╗ ║ ExtensionType ║ ║ ExtensionTypeDescriptor ║ ║ ExtensionDescriptor ║ ╚═══════════════╝ ╚═════════════════════════╝ ╚═════════════════════╝ Λ │ │ Λ │ Λ └─────── Type() ───────┘ │ └─── may implement ────┘ │ │ │ └────── implements ────────┘ • 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 ExtensionDescriptor describes an abstract protobuf extension field and may not always be an ExtensionTypeDescriptor. source.go source_gen.go type.go value.go value_union.go value_unsafe.go
Package-Level Type Names (total 76, in which 47 are exported)
/* sort exporteds by: | */
Cardinality determines whether a field is optional, required, or repeated. GoString returns c as a Go source identifier (e.g., "Optional"). IsValid reports whether the cardinality is valid. String returns c as a proto source identifier (e.g., "optional"). T : fmt.GoStringer T : fmt.Stringer func ExtensionDescriptor.Cardinality() Cardinality func ExtensionTypeDescriptor.Cardinality() Cardinality func FieldDescriptor.Cardinality() Cardinality func google.golang.org/protobuf/internal/filedesc.(*Extension).Cardinality() Cardinality func google.golang.org/protobuf/internal/filedesc.(*Field).Cardinality() Cardinality const Optional const Repeated const Required
Descriptor provides a set of accessors that are common to every descriptor. Each descriptor type wraps the equivalent google.protobuf.XXXDescriptorProto, but provides efficient lookup and immutability. Each descriptor is comparable. Equality implies that the two types are 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 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). This can occur if a descriptor type is created dynamically, or multiple versions of the same proto type are accidentally linked into the Go binary. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 EnumDescriptor (interface) EnumValueDescriptor (interface) ExtensionTypeDescriptor (interface) FieldDescriptor (interface) FileDescriptor (interface) FileImport MessageDescriptor (interface) MethodDescriptor (interface) OneofDescriptor (interface) ServiceDescriptor (interface) *google.golang.org/protobuf/internal/filedesc.Enum *google.golang.org/protobuf/internal/filedesc.EnumValue *google.golang.org/protobuf/internal/filedesc.Extension *google.golang.org/protobuf/internal/filedesc.Field *google.golang.org/protobuf/internal/filedesc.File *google.golang.org/protobuf/internal/filedesc.Message *google.golang.org/protobuf/internal/filedesc.Method *google.golang.org/protobuf/internal/filedesc.Oneof google.golang.org/protobuf/internal/filedesc.PlaceholderEnum google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue google.golang.org/protobuf/internal/filedesc.PlaceholderFile google.golang.org/protobuf/internal/filedesc.PlaceholderMessage *google.golang.org/protobuf/internal/filedesc.Service T : google.golang.org/protobuf/internal/pragma.DoNotImplement func Descriptor.Parent() Descriptor func EnumDescriptor.Parent() Descriptor func EnumValueDescriptor.Parent() Descriptor func ExtensionDescriptor.Parent() Descriptor func ExtensionTypeDescriptor.Parent() Descriptor func FieldDescriptor.Parent() Descriptor func FileDescriptor.Parent() Descriptor func MessageDescriptor.Parent() Descriptor func MethodDescriptor.Parent() Descriptor func OneofDescriptor.Parent() Descriptor func ServiceDescriptor.Parent() Descriptor func google.golang.org/protobuf/reflect/protodesc.Resolver.FindDescriptorByName(FullName) (Descriptor, error) func google.golang.org/protobuf/reflect/protoregistry.(*Files).FindDescriptorByName(name FullName) (Descriptor, error) func google.golang.org/protobuf/internal/filedesc.(*Base).Parent() Descriptor func google.golang.org/protobuf/internal/filedesc.(*File).Parent() Descriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.Parent() Descriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.Parent() Descriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Parent() Descriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Parent() Descriptor func SourceLocations.ByDescriptor(desc Descriptor) SourceLocation func google.golang.org/protobuf/internal/descfmt.FormatDesc(s fmt.State, r rune, t Descriptor) func google.golang.org/protobuf/internal/filedesc.(*SourceLocations).ByDescriptor(desc Descriptor) SourceLocation
Enum is a reflection interface for a concrete enum value, which provides type information and a getter for the enum number. Enum does not provide a mutable API since enums are commonly backed by Go constants, which are not addressable. Descriptor returns enum descriptor, which contains only the protobuf type information for the enum. Number returns the enum value as an integer. Type returns the enum type, which encapsulates both Go and protobuf type information. If the Go type information is not needed, it is recommended that the enum descriptor be used instead. google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Label google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Type google.golang.org/protobuf/types/descriptorpb.FieldOptions_CType google.golang.org/protobuf/types/descriptorpb.FieldOptions_JSType google.golang.org/protobuf/types/descriptorpb.FileOptions_OptimizeMode google.golang.org/protobuf/types/descriptorpb.MethodOptions_IdempotencyLevel google.golang.org/genproto/googleapis/api/annotations.FieldBehavior google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_History google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_Style google.golang.org/genproto/googleapis/logging/type.LogSeverity func EnumType.New(n EnumNumber) Enum func google.golang.org/protobuf/internal/impl.(*EnumInfo).New(n EnumNumber) Enum func google.golang.org/protobuf/internal/impl.Export.EnumOf(e impl.enum) Enum
EnumDescriptor describes an enum and corresponds with the google.protobuf.EnumDescriptorProto message. Nested declarations: EnumValueDescriptor. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(EnumDescriptor) ReservedNames is a list of reserved enum names. ReservedRanges is a list of reserved ranges of enum numbers. Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 Values is a list of nested enum value declarations. *google.golang.org/protobuf/internal/filedesc.Enum google.golang.org/protobuf/internal/filedesc.PlaceholderEnum T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func Enum.Descriptor() EnumDescriptor func EnumDescriptors.ByName(s Name) EnumDescriptor func EnumDescriptors.Get(i int) EnumDescriptor func EnumType.Descriptor() EnumDescriptor func ExtensionDescriptor.Enum() EnumDescriptor func ExtensionTypeDescriptor.Enum() EnumDescriptor func FieldDescriptor.Enum() EnumDescriptor func google.golang.org/protobuf/internal/filedesc.(*Enums).ByName(s Name) EnumDescriptor func google.golang.org/protobuf/internal/filedesc.(*Enums).Get(i int) EnumDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).Enum() EnumDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).Enum() EnumDescriptor func google.golang.org/protobuf/internal/impl.LegacyLoadEnumDesc(t reflect.Type) EnumDescriptor func google.golang.org/protobuf/internal/impl.(*EnumInfo).Descriptor() EnumDescriptor func google.golang.org/protobuf/internal/impl.Export.EnumDescriptorOf(e impl.enum) EnumDescriptor func google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Label.Descriptor() EnumDescriptor func google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Type.Descriptor() EnumDescriptor func google.golang.org/protobuf/types/descriptorpb.FieldOptions_CType.Descriptor() EnumDescriptor func google.golang.org/protobuf/types/descriptorpb.FieldOptions_JSType.Descriptor() EnumDescriptor func google.golang.org/protobuf/types/descriptorpb.FileOptions_OptimizeMode.Descriptor() EnumDescriptor func google.golang.org/protobuf/types/descriptorpb.MethodOptions_IdempotencyLevel.Descriptor() EnumDescriptor func google.golang.org/genproto/googleapis/api/annotations.FieldBehavior.Descriptor() EnumDescriptor func google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_History.Descriptor() EnumDescriptor func google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_Style.Descriptor() EnumDescriptor func google.golang.org/genproto/googleapis/logging/type.LogSeverity.Descriptor() EnumDescriptor func EnumDescriptor.ProtoType(EnumDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToEnumDescriptorProto(enum EnumDescriptor) *descriptorpb.EnumDescriptorProto func google.golang.org/protobuf/internal/filedesc.(*Enum).ProtoType(EnumDescriptor) func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.ProtoType(EnumDescriptor) func google.golang.org/protobuf/internal/impl.Export.EnumStringOf(ed EnumDescriptor, n EnumNumber) string func google.golang.org/protobuf/internal/impl.Export.LegacyEnumName(ed EnumDescriptor) string func google.golang.org/protobuf/internal/impl.Export.UnmarshalJSONEnum(ed EnumDescriptor, b []byte) (EnumNumber, error)
EnumDescriptors is a list of enum declarations. ByName returns the EnumDescriptor for an enum named s. It returns nil if not found. Get returns the ith EnumDescriptor. It panics if out of bounds. Len reports the number of enum types. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Enums T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileDescriptor.Enums() EnumDescriptors func MessageDescriptor.Enums() EnumDescriptors func google.golang.org/protobuf/internal/filedesc.(*File).Enums() EnumDescriptors func google.golang.org/protobuf/internal/filedesc.(*Message).Enums() EnumDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Enums() EnumDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Enums() EnumDescriptors
EnumNumber is the numeric value for an enum. func Enum.Number() EnumNumber func EnumRanges.Get(i int) [2]EnumNumber func EnumValueDescriptor.Number() EnumNumber func Value.Enum() EnumNumber func google.golang.org/protobuf/internal/filedesc.(*EnumRanges).Get(i int) [2]EnumNumber func google.golang.org/protobuf/internal/filedesc.(*EnumValue).Number() EnumNumber func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.Number() EnumNumber func google.golang.org/protobuf/internal/impl.Export.UnmarshalJSONEnum(ed EnumDescriptor, b []byte) (EnumNumber, error) func google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Label.Number() EnumNumber func google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Type.Number() EnumNumber func google.golang.org/protobuf/types/descriptorpb.FieldOptions_CType.Number() EnumNumber func google.golang.org/protobuf/types/descriptorpb.FieldOptions_JSType.Number() EnumNumber func google.golang.org/protobuf/types/descriptorpb.FileOptions_OptimizeMode.Number() EnumNumber func google.golang.org/protobuf/types/descriptorpb.MethodOptions_IdempotencyLevel.Number() EnumNumber func google.golang.org/genproto/googleapis/api/annotations.FieldBehavior.Number() EnumNumber func google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_History.Number() EnumNumber func google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_Style.Number() EnumNumber func google.golang.org/genproto/googleapis/logging/type.LogSeverity.Number() EnumNumber func ValueOfEnum(v EnumNumber) Value func EnumRanges.Has(n EnumNumber) bool func EnumType.New(n EnumNumber) Enum func EnumValueDescriptors.ByNumber(n EnumNumber) EnumValueDescriptor func google.golang.org/protobuf/internal/filedesc.(*EnumRanges).Has(n EnumNumber) bool func google.golang.org/protobuf/internal/filedesc.(*EnumValues).ByNumber(n EnumNumber) EnumValueDescriptor func google.golang.org/protobuf/internal/impl.(*EnumInfo).New(n EnumNumber) Enum func google.golang.org/protobuf/internal/impl.Export.EnumStringOf(ed EnumDescriptor, n EnumNumber) string
EnumRanges represent a list of enum number ranges. Get returns the ith range. It panics if out of bounds. // start inclusive; end inclusive Has reports whether n is within any of the ranges. Len reports the number of ranges in the list. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.EnumRanges T : google.golang.org/protobuf/internal/pragma.DoNotImplement func EnumDescriptor.ReservedRanges() EnumRanges func google.golang.org/protobuf/internal/filedesc.(*Enum).ReservedRanges() EnumRanges func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.ReservedRanges() EnumRanges
EnumType encapsulates an EnumDescriptor with a concrete Go implementation. Descriptor returns the enum descriptor. Invariant: t.Descriptor() == t.New(0).Descriptor() New returns an instance of this enum type with its value set to n. *google.golang.org/protobuf/internal/impl.EnumInfo func Enum.Type() EnumType func MessageFieldTypes.Enum(i int) EnumType func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindEnumByName(enum FullName) (EnumType, error) func google.golang.org/protobuf/internal/impl.Export.EnumTypeOf(e impl.enum) EnumType func google.golang.org/protobuf/internal/impl.(*MessageInfo).Enum(i int) EnumType func google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Label.Type() EnumType func google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto_Type.Type() EnumType func google.golang.org/protobuf/types/descriptorpb.FieldOptions_CType.Type() EnumType func google.golang.org/protobuf/types/descriptorpb.FieldOptions_JSType.Type() EnumType func google.golang.org/protobuf/types/descriptorpb.FileOptions_OptimizeMode.Type() EnumType func google.golang.org/protobuf/types/descriptorpb.MethodOptions_IdempotencyLevel.Type() EnumType func google.golang.org/genproto/googleapis/api/annotations.FieldBehavior.Type() EnumType func google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_History.Type() EnumType func google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor_Style.Type() EnumType func google.golang.org/genproto/googleapis/logging/type.LogSeverity.Type() EnumType func google.golang.org/protobuf/reflect/protoregistry.(*Types).RegisterEnum(et EnumType) error
EnumValueDescriptor describes an enum value and corresponds with the google.protobuf.EnumValueDescriptorProto message. All other proto declarations are in the namespace of the parent. However, enum values do not follow this rule and are within the namespace of the parent's parent (i.e., they are a sibling of the containing enum). Thus, a value named "FOO_VALUE" declared within an enum uniquely identified as "proto.package.MyEnum" has a full name of "proto.package.FOO_VALUE". FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Number returns the enum value as an integer. Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(EnumValueDescriptor) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 *google.golang.org/protobuf/internal/filedesc.EnumValue google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func EnumValueDescriptors.ByName(s Name) EnumValueDescriptor func EnumValueDescriptors.ByNumber(n EnumNumber) EnumValueDescriptor func EnumValueDescriptors.Get(i int) EnumValueDescriptor func ExtensionDescriptor.DefaultEnumValue() EnumValueDescriptor func ExtensionTypeDescriptor.DefaultEnumValue() EnumValueDescriptor func FieldDescriptor.DefaultEnumValue() EnumValueDescriptor func google.golang.org/protobuf/internal/encoding/defval.Unmarshal(s string, k Kind, evs EnumValueDescriptors, f defval.Format) (Value, EnumValueDescriptor, error) func google.golang.org/protobuf/internal/filedesc.(*EnumValues).ByName(s Name) EnumValueDescriptor func google.golang.org/protobuf/internal/filedesc.(*EnumValues).ByNumber(n EnumNumber) EnumValueDescriptor func google.golang.org/protobuf/internal/filedesc.(*EnumValues).Get(i int) EnumValueDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).DefaultEnumValue() EnumValueDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).DefaultEnumValue() EnumValueDescriptor func EnumValueDescriptor.ProtoType(EnumValueDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToEnumValueDescriptorProto(value EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto func google.golang.org/protobuf/internal/encoding/defval.Marshal(v Value, ev EnumValueDescriptor, k Kind, f defval.Format) (string, error) func google.golang.org/protobuf/internal/filedesc.DefaultValue(v Value, ev EnumValueDescriptor) filedesc.defaultValue func google.golang.org/protobuf/internal/filedesc.(*EnumValue).ProtoType(EnumValueDescriptor) func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.ProtoType(EnumValueDescriptor)
EnumValueDescriptors is a list of enum value declarations. ByName returns the EnumValueDescriptor for the enum value named s. It returns nil if not found. ByNumber returns the EnumValueDescriptor for the enum value numbered n. If multiple have the same number, the first one defined is returned It returns nil if not found. Get returns the ith EnumValueDescriptor. It panics if out of bounds. Len reports the number of enum values. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.EnumValues T : google.golang.org/protobuf/internal/pragma.DoNotImplement func EnumDescriptor.Values() EnumValueDescriptors func google.golang.org/protobuf/internal/filedesc.(*Enum).Values() EnumValueDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.Values() EnumValueDescriptors func google.golang.org/protobuf/internal/encoding/defval.Unmarshal(s string, k Kind, evs EnumValueDescriptors, f defval.Format) (Value, EnumValueDescriptor, error) func google.golang.org/protobuf/internal/encoding/tag.Unmarshal(tag string, goType reflect.Type, evs EnumValueDescriptors) FieldDescriptor
ExtensionDescriptor is an alias of FieldDescriptor for documentation.
ExtensionDescriptors is a list of field declarations. ByName returns the ExtensionDescriptor for a field named s. It returns nil if not found. Get returns the ith ExtensionDescriptor. It panics if out of bounds. Len reports the number of fields. ( T) ProtoInternal(pragma.DoNotImplement) FieldDescriptors (interface) *google.golang.org/protobuf/internal/filedesc.Extensions *google.golang.org/protobuf/internal/filedesc.Fields *google.golang.org/protobuf/internal/filedesc.OneofFields T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileDescriptor.Extensions() ExtensionDescriptors func MessageDescriptor.Extensions() ExtensionDescriptors func google.golang.org/protobuf/internal/filedesc.(*File).Extensions() ExtensionDescriptors func google.golang.org/protobuf/internal/filedesc.(*Message).Extensions() ExtensionDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Extensions() ExtensionDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Extensions() ExtensionDescriptors
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 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. For example: syntax = "proto2"; package example; message FooMessage { extensions 100 to max; } message BarMessage { extends FooMessage { optional BarMessage bar_field = 100; } } Field "bar_field" is an extension of FooMessage, but its full name is "example.BarMessage.bar_field" instead of "example.FooMessage.bar_field". InterfaceOf completely unwraps the Value to the underlying Go type. InterfaceOf panics if the input is nil or does not represent the appropriate underlying Go type. For composite types, it panics if the value is not mutable. InterfaceOf is able to unwrap the Value further than Value.Interface as it has more type information available. IsValidInterface reports whether the input is valid to assign to the field. IsValidValue reports whether the Value is valid to assign to the field. New returns a new value for the field. For scalars, this returns the default value in native Go form. TypeDescriptor returns the extension type descriptor. ValueOf wraps the input and returns it as a Value. ValueOf panics if the input value is invalid or not the appropriate type. ValueOf is more extensive than protoreflect.ValueOf for a given field's value as it has more type information available. Zero returns a new value for the field. For scalars, this returns the default value in native Go form. For composite types, this returns an empty, read-only message, list, or map. *google.golang.org/protobuf/internal/impl.ExtensionInfo func ExtensionTypeDescriptor.Type() ExtensionType func google.golang.org/protobuf/reflect/protoregistry.ExtensionTypeResolver.FindExtensionByName(field FullName) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.ExtensionTypeResolver.FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindExtensionByName(field FullName) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) func google.golang.org/protobuf/internal/impl.ExtensionField.Type() ExtensionType func google.golang.org/protobuf/reflect/protoregistry.(*Types).RegisterExtension(xt ExtensionType) error func google.golang.org/protobuf/internal/impl.(*ExtensionField).Set(t ExtensionType, v Value) func google.golang.org/protobuf/internal/impl.(*ExtensionField).SetLazy(t ExtensionType, fn func() Value) func google.golang.org/protobuf/proto.ClearExtension(m proto.Message, xt ExtensionType) func google.golang.org/protobuf/proto.GetExtension(m proto.Message, xt ExtensionType) interface{} func google.golang.org/protobuf/proto.HasExtension(m proto.Message, xt ExtensionType) bool func google.golang.org/protobuf/proto.SetExtension(m proto.Message, xt ExtensionType, v interface{})
ExtensionTypeDescriptor is an ExtensionDescriptor with an associated ExtensionType. Cardinality reports the cardinality for this field. ContainingMessage is the containing message that this field belongs to. For extension fields, this may not necessarily be the parent message that the field is declared within. ContainingOneof is the containing oneof that this field belongs to, and is nil if this field is not part of a oneof. Default returns the default value for scalar fields. For proto2, it is the default value as specified in the proto file, or the zero value if unspecified. For proto3, it is always the zero value of the scalar. The Value type is determined by the Kind. DefaultEnumValue returns the enum value descriptor for the default value of an enum field, and is nil for any other kind of field. Descriptor returns the plain ExtensionDescriptor without the associated ExtensionType. Enum is the enum descriptor if Kind is EnumKind. It returns nil for any other Kind. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" HasDefault reports whether this field has a default value. HasJSONName reports whether this field has an explicitly set JSON name. HasOptionalKeyword reports whether the "optional" keyword was explicitly specified in the source .proto file. HasPresence reports whether the field distinguishes between unpopulated and default values. Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsExtension reports whether this is an extension field. If false, then Parent and ContainingMessage refer to the same message. Otherwise, ContainingMessage and Parent likely differ. IsList reports whether this field represents a list, where the value type for the associated field is a List. It is equivalent to checking whether Cardinality is Repeated and that IsMap reports false. 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 Message.IsMapEntry reports true. IsPacked reports whether repeated primitive numeric kinds should be serialized using a packed encoding. If true, then it implies Cardinality is Repeated. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. IsWeak reports whether this is a weak field, which does not impose a direct dependency on the target type. If true, then Message returns a placeholder type. JSONName reports the name used for JSON serialization. It is usually the camel-cased form of the field name. Extension fields are represented by the full name surrounded by brackets. Kind reports the basic kind for this field. MapKey returns the field descriptor for the key in the map entry. It returns nil if IsMap reports false. MapValue returns the field descriptor for the value in the map entry. It returns nil if IsMap reports false. Message is the message descriptor if Kind is MessageKind or GroupKind. It returns nil for any other Kind. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Number reports the unique number for this field. Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(FieldDescriptor) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 TextName reports the name used for text serialization. It is usually the name of the field, except that groups use the name of the inlined message, and extension fields are represented by the full name surrounded by brackets. Type returns the associated ExtensionType. T : Descriptor T : FieldDescriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func ExtensionType.TypeDescriptor() ExtensionTypeDescriptor func google.golang.org/protobuf/internal/impl.(*ExtensionInfo).TypeDescriptor() ExtensionTypeDescriptor
FieldDescriptor describes a field within a message and 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). Cardinality reports the cardinality for this field. ContainingMessage is the containing message that this field belongs to. For extension fields, this may not necessarily be the parent message that the field is declared within. ContainingOneof is the containing oneof that this field belongs to, and is nil if this field is not part of a oneof. Default returns the default value for scalar fields. For proto2, it is the default value as specified in the proto file, or the zero value if unspecified. For proto3, it is always the zero value of the scalar. The Value type is determined by the Kind. DefaultEnumValue returns the enum value descriptor for the default value of an enum field, and is nil for any other kind of field. Enum is the enum descriptor if Kind is EnumKind. It returns nil for any other Kind. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" HasDefault reports whether this field has a default value. HasJSONName reports whether this field has an explicitly set JSON name. HasOptionalKeyword reports whether the "optional" keyword was explicitly specified in the source .proto file. HasPresence reports whether the field distinguishes between unpopulated and default values. Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsExtension reports whether this is an extension field. If false, then Parent and ContainingMessage refer to the same message. Otherwise, ContainingMessage and Parent likely differ. IsList reports whether this field represents a list, where the value type for the associated field is a List. It is equivalent to checking whether Cardinality is Repeated and that IsMap reports false. 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 Message.IsMapEntry reports true. IsPacked reports whether repeated primitive numeric kinds should be serialized using a packed encoding. If true, then it implies Cardinality is Repeated. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. IsWeak reports whether this is a weak field, which does not impose a direct dependency on the target type. If true, then Message returns a placeholder type. JSONName reports the name used for JSON serialization. It is usually the camel-cased form of the field name. Extension fields are represented by the full name surrounded by brackets. Kind reports the basic kind for this field. MapKey returns the field descriptor for the key in the map entry. It returns nil if IsMap reports false. MapValue returns the field descriptor for the value in the map entry. It returns nil if IsMap reports false. Message is the message descriptor if Kind is MessageKind or GroupKind. It returns nil for any other Kind. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Number reports the unique number for this field. Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(FieldDescriptor) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 TextName reports the name used for text serialization. It is usually the name of the field, except that groups use the name of the inlined message, and extension fields are represented by the full name surrounded by brackets. ExtensionTypeDescriptor (interface) *google.golang.org/protobuf/internal/filedesc.Extension *google.golang.org/protobuf/internal/filedesc.Field T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func ExtensionDescriptor.MapKey() FieldDescriptor func ExtensionDescriptor.MapValue() FieldDescriptor func ExtensionDescriptors.ByName(s Name) ExtensionDescriptor func ExtensionDescriptors.Get(i int) ExtensionDescriptor func ExtensionTypeDescriptor.Descriptor() ExtensionDescriptor func ExtensionTypeDescriptor.MapKey() FieldDescriptor func ExtensionTypeDescriptor.MapValue() FieldDescriptor func FieldDescriptor.MapKey() FieldDescriptor func FieldDescriptor.MapValue() FieldDescriptor func FieldDescriptors.ByJSONName(s string) FieldDescriptor func FieldDescriptors.ByName(s Name) FieldDescriptor func FieldDescriptors.ByNumber(n FieldNumber) FieldDescriptor func FieldDescriptors.ByTextName(s string) FieldDescriptor func FieldDescriptors.Get(i int) FieldDescriptor func Message.WhichOneof(OneofDescriptor) FieldDescriptor func google.golang.org/protobuf/internal/encoding/tag.Unmarshal(tag string, goType reflect.Type, evs EnumValueDescriptors) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).MapKey() FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).MapValue() FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extensions).ByName(s Name) ExtensionDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extensions).Get(i int) ExtensionDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).MapKey() FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).MapValue() FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Fields).ByJSONName(s string) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Fields).ByName(s Name) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Fields).ByNumber(n FieldNumber) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Fields).ByTextName(s string) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Fields).Get(i int) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*OneofFields).ByJSONName(s string) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*OneofFields).ByName(s Name) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*OneofFields).ByNumber(n FieldNumber) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*OneofFields).ByTextName(s string) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*OneofFields).Get(i int) FieldDescriptor func ExtensionDescriptor.ProtoType(FieldDescriptor) func ExtensionTypeDescriptor.ProtoType(FieldDescriptor) func FieldDescriptor.ProtoType(FieldDescriptor) func Message.Clear(FieldDescriptor) func Message.Get(FieldDescriptor) Value func Message.Has(FieldDescriptor) bool func Message.Mutable(FieldDescriptor) Value func Message.NewField(FieldDescriptor) Value func Message.Set(FieldDescriptor, Value) func google.golang.org/protobuf/reflect/protodesc.ToFieldDescriptorProto(field FieldDescriptor) *descriptorpb.FieldDescriptorProto func google.golang.org/protobuf/internal/encoding/messageset.IsMessageSetExtension(fd FieldDescriptor) bool func google.golang.org/protobuf/internal/encoding/tag.Marshal(fd FieldDescriptor, enumName string) string func google.golang.org/protobuf/internal/filedesc.(*Extension).ProtoType(FieldDescriptor) func google.golang.org/protobuf/internal/filedesc.(*Field).ProtoType(FieldDescriptor) func google.golang.org/protobuf/internal/impl.InitExtensionInfo(xi *impl.ExtensionInfo, xd ExtensionDescriptor, goType reflect.Type) func google.golang.org/protobuf/internal/impl.IsLazy(m Message, fd FieldDescriptor) bool func google.golang.org/protobuf/internal/impl.NewConverter(t reflect.Type, fd FieldDescriptor) impl.Converter func google.golang.org/protobuf/internal/strs.EnforceUTF8(fd FieldDescriptor) bool
FieldDescriptors is a list of field declarations. ByJSONName returns the FieldDescriptor for a field with s as the JSON name. It returns nil if not found. ByName returns the FieldDescriptor for a field named s. It returns nil if not found. ByNumber returns the FieldDescriptor for a field numbered n. It returns nil if not found. ByTextName returns the FieldDescriptor for a field with s as the text name. It returns nil if not found. Get returns the ith FieldDescriptor. It panics if out of bounds. Len reports the number of fields. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Fields *google.golang.org/protobuf/internal/filedesc.OneofFields T : ExtensionDescriptors T : google.golang.org/protobuf/internal/pragma.DoNotImplement func MessageDescriptor.Fields() FieldDescriptors func OneofDescriptor.Fields() FieldDescriptors func google.golang.org/protobuf/internal/filedesc.(*Message).Fields() FieldDescriptors func google.golang.org/protobuf/internal/filedesc.(*Oneof).Fields() FieldDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Fields() FieldDescriptors
FieldNumber is the field number in a message.
FieldNumbers represent a list of field numbers. Get returns the ith field number. It panics if out of bounds. Has reports whether n is within the list of fields. Len reports the number of fields in the list. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.FieldNumbers T : google.golang.org/protobuf/internal/pragma.DoNotImplement func MessageDescriptor.RequiredNumbers() FieldNumbers func google.golang.org/protobuf/internal/filedesc.(*Message).RequiredNumbers() FieldNumbers func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.RequiredNumbers() FieldNumbers
FieldRanges represent a list of field number ranges. Get returns the ith range. It panics if out of bounds. // start inclusive; end exclusive Has reports whether n is within any of the ranges. Len reports the number of ranges in the list. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.FieldRanges T : google.golang.org/protobuf/internal/pragma.DoNotImplement func MessageDescriptor.ExtensionRanges() FieldRanges func MessageDescriptor.ReservedRanges() FieldRanges func google.golang.org/protobuf/internal/filedesc.(*Message).ExtensionRanges() FieldRanges func google.golang.org/protobuf/internal/filedesc.(*Message).ReservedRanges() FieldRanges func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.ExtensionRanges() FieldRanges func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.ReservedRanges() FieldRanges
FileDescriptor describes the types in a complete proto file and corresponds with the google.protobuf.FileDescriptorProto message. Top-level declarations: EnumDescriptor, MessageDescriptor, FieldDescriptor, and/or ServiceDescriptor. Enums is a list of the top-level enum declarations. Extensions is a list of the top-level extension declarations. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Imports is a list of imported proto files. Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Messages is a list of the top-level message declarations. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Package returns the protobuf package namespace. // e.g., "google.protobuf" Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. Path returns the file name, relative to the source tree root. // e.g., "path/to/file.proto" ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(FileDescriptor) Services is a list of the top-level service declarations. SourceLocations is a list of source locations. Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 FileImport *google.golang.org/protobuf/internal/filedesc.File google.golang.org/protobuf/internal/filedesc.PlaceholderFile T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func Descriptor.ParentFile() FileDescriptor func EnumDescriptor.ParentFile() FileDescriptor func EnumValueDescriptor.ParentFile() FileDescriptor func ExtensionDescriptor.ParentFile() FileDescriptor func ExtensionTypeDescriptor.ParentFile() FileDescriptor func FieldDescriptor.ParentFile() FileDescriptor func FileDescriptor.ParentFile() FileDescriptor func MessageDescriptor.ParentFile() FileDescriptor func MethodDescriptor.ParentFile() FileDescriptor func OneofDescriptor.ParentFile() FileDescriptor func ServiceDescriptor.ParentFile() FileDescriptor func google.golang.org/protobuf/reflect/protodesc.NewFile(fd *descriptorpb.FileDescriptorProto, r protodesc.Resolver) (FileDescriptor, error) func google.golang.org/protobuf/reflect/protodesc.FileOptions.New(fd *descriptorpb.FileDescriptorProto, r protodesc.Resolver) (FileDescriptor, error) func google.golang.org/protobuf/reflect/protodesc.Resolver.FindFileByPath(string) (FileDescriptor, error) func google.golang.org/protobuf/reflect/protoregistry.(*Files).FindFileByPath(path string) (FileDescriptor, error) func google.golang.org/protobuf/internal/filedesc.(*Base).ParentFile() FileDescriptor func google.golang.org/protobuf/internal/filedesc.(*File).ParentFile() FileDescriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.ParentFile() FileDescriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.ParentFile() FileDescriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.ParentFile() FileDescriptor func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.ParentFile() FileDescriptor func FileDescriptor.ProtoType(FileDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToFileDescriptorProto(file FileDescriptor) *descriptorpb.FileDescriptorProto func google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(file FileDescriptor) error func google.golang.org/protobuf/internal/filedesc.(*File).ProtoType(FileDescriptor) func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.ProtoType(FileDescriptor) var google.golang.org/protobuf/types/descriptorpb.File_google_protobuf_descriptor_proto var google.golang.org/protobuf/types/known/anypb.File_google_protobuf_any_proto var google.golang.org/protobuf/types/known/durationpb.File_google_protobuf_duration_proto var google.golang.org/protobuf/types/known/timestamppb.File_google_protobuf_timestamp_proto var google.golang.org/genproto/googleapis/api/annotations.File_google_api_annotations_proto var google.golang.org/genproto/googleapis/api/annotations.File_google_api_client_proto var google.golang.org/genproto/googleapis/api/annotations.File_google_api_field_behavior_proto var google.golang.org/genproto/googleapis/api/annotations.File_google_api_http_proto var google.golang.org/genproto/googleapis/api/annotations.File_google_api_resource_proto var google.golang.org/genproto/googleapis/logging/type.File_google_logging_type_http_request_proto var google.golang.org/genproto/googleapis/logging/type.File_google_logging_type_log_severity_proto var github.com/golang/protobuf/ptypes/any.File_github_com_golang_protobuf_ptypes_any_any_proto var github.com/golang/protobuf/ptypes/duration.File_github_com_golang_protobuf_ptypes_duration_duration_proto var github.com/golang/protobuf/ptypes/timestamp.File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto
FileImport is the declaration for a proto file import. FileDescriptor is the file type for the given import. It is a placeholder descriptor if IsWeak is set or if a dependency has not been regenerated to implement the new reflection APIs. IsPublic reports whether this is a public import, which causes this file to alias declarations within the imported file. The intended use cases for this feature is the ability to move proto files without breaking existing dependencies. The current file and the imported file must be within proto package. IsWeak reports whether this is a weak import, which does not impose a direct dependency on the target file. Weak imports are a legacy proto1 feature. Equivalent behavior is achieved using proto2 extension fields or proto3 Any messages. Enums is a list of the top-level enum declarations. Extensions is a list of the top-level extension declarations. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Imports is a list of imported proto files. Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Messages is a list of the top-level message declarations. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Package returns the protobuf package namespace. // e.g., "google.protobuf" Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. Path returns the file name, relative to the source tree root. // e.g., "path/to/file.proto" ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(FileDescriptor) Services is a list of the top-level service declarations. SourceLocations is a list of source locations. Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 T : Descriptor T : FileDescriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileImports.Get(i int) FileImport func google.golang.org/protobuf/internal/filedesc.(*FileImports).Get(i int) FileImport
FileImports is a list of file imports. Get returns the ith FileImport. It panics if out of bounds. Len reports the number of files imported by this proto file. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.FileImports T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileDescriptor.Imports() FileImports func google.golang.org/protobuf/internal/filedesc.(*File).Imports() FileImports func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Imports() FileImports
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. This should not have any leading or trailing dots. Append returns the qualified name appended with the provided short name. Invariant: n == n.Parent().Append(n.Name()) // assuming n is valid IsValid reports whether s is a syntactically valid full name. An empty full name is invalid. Name returns the short name, which is the last identifier segment. A single segment FullName is the Name itself. Parent returns the full name with the trailing identifier removed. A single segment FullName has no parent. func Descriptor.FullName() FullName func EnumDescriptor.FullName() FullName func EnumValueDescriptor.FullName() FullName func ExtensionDescriptor.FullName() FullName func ExtensionTypeDescriptor.FullName() FullName func FieldDescriptor.FullName() FullName func FileDescriptor.FullName() FullName func FileDescriptor.Package() FullName func FullName.Append(s Name) FullName func FullName.Parent() FullName func MessageDescriptor.FullName() FullName func MethodDescriptor.FullName() FullName func OneofDescriptor.FullName() FullName func ServiceDescriptor.FullName() FullName func google.golang.org/protobuf/internal/filedesc.(*Base).FullName() FullName func google.golang.org/protobuf/internal/filedesc.(*File).FullName() FullName func google.golang.org/protobuf/internal/filedesc.(*File).Package() FullName func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.FullName() FullName func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.FullName() FullName func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.FullName() FullName func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Package() FullName func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.FullName() FullName func google.golang.org/protobuf/internal/impl.AberrantDeriveFullName(t reflect.Type) FullName func google.golang.org/protobuf/internal/strs.(*Builder).AppendFullName(prefix FullName, name Name) FullName func google.golang.org/protobuf/proto.MessageName(m proto.Message) FullName func google.golang.org/protobuf/types/known/anypb.(*Any).MessageName() FullName func google.golang.org/protobuf/reflect/protodesc.Resolver.FindDescriptorByName(FullName) (Descriptor, error) func google.golang.org/protobuf/reflect/protoregistry.ExtensionTypeResolver.FindExtensionByName(field FullName) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.ExtensionTypeResolver.FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Files).FindDescriptorByName(name FullName) (Descriptor, error) func google.golang.org/protobuf/reflect/protoregistry.(*Files).NumFilesByPackage(name FullName) int func google.golang.org/protobuf/reflect/protoregistry.(*Files).RangeFilesByPackage(name FullName, f func(FileDescriptor) bool) func google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver.FindMessageByName(message FullName) (MessageType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindEnumByName(enum FullName) (EnumType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindExtensionByName(field FullName) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindMessageByName(message FullName) (MessageType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).NumExtensionsByMessage(message FullName) int func google.golang.org/protobuf/reflect/protoregistry.(*Types).RangeExtensionsByMessage(message FullName, f func(ExtensionType) bool) func google.golang.org/protobuf/internal/impl.Export.GetWeak(w impl.WeakFields, num FieldNumber, name FullName) ProtoMessage func google.golang.org/protobuf/internal/impl.Export.LegacyMessageTypeOf(m piface.MessageV1, name FullName) MessageType func google.golang.org/protobuf/internal/impl.Export.SetWeak(w *impl.WeakFields, num FieldNumber, name FullName, m ProtoMessage) func google.golang.org/protobuf/internal/strs.(*Builder).AppendFullName(prefix FullName, name Name) FullName const google.golang.org/protobuf/internal/genid.Any_message_fullname const google.golang.org/protobuf/internal/genid.Any_TypeUrl_field_fullname const google.golang.org/protobuf/internal/genid.Any_Value_field_fullname const google.golang.org/protobuf/internal/genid.Api_message_fullname const google.golang.org/protobuf/internal/genid.Api_Methods_field_fullname const google.golang.org/protobuf/internal/genid.Api_Mixins_field_fullname const google.golang.org/protobuf/internal/genid.Api_Name_field_fullname const google.golang.org/protobuf/internal/genid.Api_Options_field_fullname const google.golang.org/protobuf/internal/genid.Api_SourceContext_field_fullname const google.golang.org/protobuf/internal/genid.Api_Syntax_field_fullname const google.golang.org/protobuf/internal/genid.Api_Version_field_fullname const google.golang.org/protobuf/internal/genid.BoolValue_message_fullname const google.golang.org/protobuf/internal/genid.BoolValue_Value_field_fullname const google.golang.org/protobuf/internal/genid.BytesValue_message_fullname const google.golang.org/protobuf/internal/genid.BytesValue_Value_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_EnumType_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_Extension_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_End_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_message_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_Options_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_Start_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_Field_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_NestedType_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_OneofDecl_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedName_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_End_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_field_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_message_fullname const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_Start_field_fullname const google.golang.org/protobuf/internal/genid.DoubleValue_message_fullname const google.golang.org/protobuf/internal/genid.DoubleValue_Value_field_fullname const google.golang.org/protobuf/internal/genid.Duration_message_fullname const google.golang.org/protobuf/internal/genid.Duration_Nanos_field_fullname const google.golang.org/protobuf/internal/genid.Duration_Seconds_field_fullname const google.golang.org/protobuf/internal/genid.Empty_message_fullname const google.golang.org/protobuf/internal/genid.Enum_Enumvalue_field_fullname const google.golang.org/protobuf/internal/genid.Enum_message_fullname const google.golang.org/protobuf/internal/genid.Enum_Name_field_fullname const google.golang.org/protobuf/internal/genid.Enum_Options_field_fullname const google.golang.org/protobuf/internal/genid.Enum_SourceContext_field_fullname const google.golang.org/protobuf/internal/genid.Enum_Syntax_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_EnumReservedRange_End_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_EnumReservedRange_message_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_EnumReservedRange_Start_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_ReservedName_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_ReservedRange_field_fullname const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_Value_field_fullname const google.golang.org/protobuf/internal/genid.EnumOptions_AllowAlias_field_fullname const google.golang.org/protobuf/internal/genid.EnumOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.EnumOptions_message_fullname const google.golang.org/protobuf/internal/genid.EnumOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.EnumValue_message_fullname const google.golang.org/protobuf/internal/genid.EnumValue_Name_field_fullname const google.golang.org/protobuf/internal/genid.EnumValue_Number_field_fullname const google.golang.org/protobuf/internal/genid.EnumValue_Options_field_fullname const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_Number_field_fullname const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.EnumValueOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.EnumValueOptions_message_fullname const google.golang.org/protobuf/internal/genid.EnumValueOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.ExtensionRangeOptions_message_fullname const google.golang.org/protobuf/internal/genid.ExtensionRangeOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.Field_Cardinality_field_fullname const google.golang.org/protobuf/internal/genid.Field_DefaultValue_field_fullname const google.golang.org/protobuf/internal/genid.Field_JsonName_field_fullname const google.golang.org/protobuf/internal/genid.Field_Kind_field_fullname const google.golang.org/protobuf/internal/genid.Field_message_fullname const google.golang.org/protobuf/internal/genid.Field_Name_field_fullname const google.golang.org/protobuf/internal/genid.Field_Number_field_fullname const google.golang.org/protobuf/internal/genid.Field_OneofIndex_field_fullname const google.golang.org/protobuf/internal/genid.Field_Options_field_fullname const google.golang.org/protobuf/internal/genid.Field_Packed_field_fullname const google.golang.org/protobuf/internal/genid.Field_TypeUrl_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_DefaultValue_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Extendee_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_JsonName_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Label_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Number_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_OneofIndex_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Proto3Optional_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Type_field_fullname const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_TypeName_field_fullname const google.golang.org/protobuf/internal/genid.FieldMask_message_fullname const google.golang.org/protobuf/internal/genid.FieldMask_Paths_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_Ctype_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_Jstype_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_Lazy_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_message_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_Packed_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.FieldOptions_Weak_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Dependency_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_EnumType_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Extension_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_MessageType_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Package_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_PublicDependency_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Service_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_SourceCodeInfo_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Syntax_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorProto_WeakDependency_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorSet_File_field_fullname const google.golang.org/protobuf/internal/genid.FileDescriptorSet_message_fullname const google.golang.org/protobuf/internal/genid.FileOptions_CcEnableArenas_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_CcGenericServices_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_CsharpNamespace_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_GoPackage_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_JavaGenerateEqualsAndHash_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_JavaGenericServices_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_JavaMultipleFiles_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_JavaOuterClassname_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_JavaPackage_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_JavaStringCheckUtf8_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_message_fullname const google.golang.org/protobuf/internal/genid.FileOptions_ObjcClassPrefix_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_OptimizeFor_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_PhpClassPrefix_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_PhpGenericServices_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_PhpMetadataNamespace_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_PhpNamespace_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_PyGenericServices_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_RubyPackage_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_SwiftPrefix_field_fullname const google.golang.org/protobuf/internal/genid.FileOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.FloatValue_message_fullname const google.golang.org/protobuf/internal/genid.FloatValue_Value_field_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_Begin_field_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_End_field_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_field_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_message_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_Path_field_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_SourceFile_field_fullname const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_message_fullname const google.golang.org/protobuf/internal/genid.GoogleProtobuf_package const google.golang.org/protobuf/internal/genid.Int32Value_message_fullname const google.golang.org/protobuf/internal/genid.Int32Value_Value_field_fullname const google.golang.org/protobuf/internal/genid.Int64Value_message_fullname const google.golang.org/protobuf/internal/genid.Int64Value_Value_field_fullname const google.golang.org/protobuf/internal/genid.ListValue_message_fullname const google.golang.org/protobuf/internal/genid.ListValue_Values_field_fullname const google.golang.org/protobuf/internal/genid.MessageOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.MessageOptions_MapEntry_field_fullname const google.golang.org/protobuf/internal/genid.MessageOptions_message_fullname const google.golang.org/protobuf/internal/genid.MessageOptions_MessageSetWireFormat_field_fullname const google.golang.org/protobuf/internal/genid.MessageOptions_NoStandardDescriptorAccessor_field_fullname const google.golang.org/protobuf/internal/genid.MessageOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.Method_message_fullname const google.golang.org/protobuf/internal/genid.Method_Name_field_fullname const google.golang.org/protobuf/internal/genid.Method_Options_field_fullname const google.golang.org/protobuf/internal/genid.Method_RequestStreaming_field_fullname const google.golang.org/protobuf/internal/genid.Method_RequestTypeUrl_field_fullname const google.golang.org/protobuf/internal/genid.Method_ResponseStreaming_field_fullname const google.golang.org/protobuf/internal/genid.Method_ResponseTypeUrl_field_fullname const google.golang.org/protobuf/internal/genid.Method_Syntax_field_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_ClientStreaming_field_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_InputType_field_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_OutputType_field_fullname const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_ServerStreaming_field_fullname const google.golang.org/protobuf/internal/genid.MethodOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.MethodOptions_IdempotencyLevel_field_fullname const google.golang.org/protobuf/internal/genid.MethodOptions_message_fullname const google.golang.org/protobuf/internal/genid.MethodOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.Mixin_message_fullname const google.golang.org/protobuf/internal/genid.Mixin_Name_field_fullname const google.golang.org/protobuf/internal/genid.Mixin_Root_field_fullname const google.golang.org/protobuf/internal/genid.OneofDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.OneofDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.OneofDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.OneofOptions_message_fullname const google.golang.org/protobuf/internal/genid.OneofOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.Option_message_fullname const google.golang.org/protobuf/internal/genid.Option_Name_field_fullname const google.golang.org/protobuf/internal/genid.Option_Value_field_fullname const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_message_fullname const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_Method_field_fullname const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_Name_field_fullname const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_Options_field_fullname const google.golang.org/protobuf/internal/genid.ServiceOptions_Deprecated_field_fullname const google.golang.org/protobuf/internal/genid.ServiceOptions_message_fullname const google.golang.org/protobuf/internal/genid.ServiceOptions_UninterpretedOption_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_LeadingComments_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_LeadingDetachedComments_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_message_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_Path_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_Span_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_TrailingComments_field_fullname const google.golang.org/protobuf/internal/genid.SourceCodeInfo_message_fullname const google.golang.org/protobuf/internal/genid.SourceContext_FileName_field_fullname const google.golang.org/protobuf/internal/genid.SourceContext_message_fullname const google.golang.org/protobuf/internal/genid.StringValue_message_fullname const google.golang.org/protobuf/internal/genid.StringValue_Value_field_fullname const google.golang.org/protobuf/internal/genid.Struct_Fields_field_fullname const google.golang.org/protobuf/internal/genid.Struct_FieldsEntry_Key_field_fullname const google.golang.org/protobuf/internal/genid.Struct_FieldsEntry_message_fullname const google.golang.org/protobuf/internal/genid.Struct_FieldsEntry_Value_field_fullname const google.golang.org/protobuf/internal/genid.Struct_message_fullname const google.golang.org/protobuf/internal/genid.Timestamp_message_fullname const google.golang.org/protobuf/internal/genid.Timestamp_Nanos_field_fullname const google.golang.org/protobuf/internal/genid.Timestamp_Seconds_field_fullname const google.golang.org/protobuf/internal/genid.Type_Fields_field_fullname const google.golang.org/protobuf/internal/genid.Type_message_fullname const google.golang.org/protobuf/internal/genid.Type_Name_field_fullname const google.golang.org/protobuf/internal/genid.Type_Oneofs_field_fullname const google.golang.org/protobuf/internal/genid.Type_Options_field_fullname const google.golang.org/protobuf/internal/genid.Type_SourceContext_field_fullname const google.golang.org/protobuf/internal/genid.Type_Syntax_field_fullname const google.golang.org/protobuf/internal/genid.UInt32Value_message_fullname const google.golang.org/protobuf/internal/genid.UInt32Value_Value_field_fullname const google.golang.org/protobuf/internal/genid.UInt64Value_message_fullname const google.golang.org/protobuf/internal/genid.UInt64Value_Value_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_AggregateValue_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_DoubleValue_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_IdentifierValue_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_message_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_Name_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_NamePart_IsExtension_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_NamePart_message_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_NamePart_NamePart_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_NegativeIntValue_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_PositiveIntValue_field_fullname const google.golang.org/protobuf/internal/genid.UninterpretedOption_StringValue_field_fullname const google.golang.org/protobuf/internal/genid.Value_BoolValue_field_fullname const google.golang.org/protobuf/internal/genid.Value_Kind_oneof_fullname const google.golang.org/protobuf/internal/genid.Value_ListValue_field_fullname const google.golang.org/protobuf/internal/genid.Value_message_fullname const google.golang.org/protobuf/internal/genid.Value_NullValue_field_fullname const google.golang.org/protobuf/internal/genid.Value_NumberValue_field_fullname const google.golang.org/protobuf/internal/genid.Value_StringValue_field_fullname const google.golang.org/protobuf/internal/genid.Value_StructValue_field_fullname
Kind indicates the basic proto kind of a field. GoString returns k as a Go source identifier (e.g., "BoolKind"). IsValid reports whether the kind is valid. String returns k as a proto source identifier (e.g., "bool"). T : fmt.GoStringer T : fmt.Stringer func ExtensionDescriptor.Kind() Kind func ExtensionTypeDescriptor.Kind() Kind func FieldDescriptor.Kind() Kind func google.golang.org/protobuf/internal/filedesc.(*Extension).Kind() Kind func google.golang.org/protobuf/internal/filedesc.(*Field).Kind() Kind func google.golang.org/protobuf/internal/encoding/defval.Marshal(v Value, ev EnumValueDescriptor, k Kind, f defval.Format) (string, error) func google.golang.org/protobuf/internal/encoding/defval.Unmarshal(s string, k Kind, evs EnumValueDescriptors, f defval.Format) (Value, EnumValueDescriptor, error) const BoolKind const BytesKind const DoubleKind const EnumKind const Fixed32Kind const Fixed64Kind const FloatKind const GroupKind const Int32Kind const Int64Kind const MessageKind const Sfixed32Kind const Sfixed64Kind const Sint32Kind const Sint64Kind const StringKind const Uint32Kind const Uint64Kind
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. Append appends the provided value to the end of the list. When appending a composite type, it is unspecified whether the appended value aliases the source's memory in any way. Append is a mutating operation and unsafe for concurrent use. AppendMutable appends a new, empty, mutable message value to the end of the list and returns it. It panics if the list does not contain a message type. Get retrieves the value at the given index. It never returns an invalid value. IsValid reports whether the list is valid. An invalid list is an empty, read-only value. Validity is not part of the protobuf data model, and may not be preserved in marshaling or other operations. Len reports the number of entries in the List. Get, Set, and Truncate panic with out of bound indexes. NewElement returns a new value for a list element. For enums, this returns the first enum value. For other scalars, this returns the zero value. For messages, this returns a new, empty, mutable value. Set stores a value for the given index. When setting a composite type, it is unspecified whether the set value aliases the source's memory in any way. Set is a mutating operation and unsafe for concurrent use. Truncate truncates the list to a smaller length. Truncate is a mutating operation and unsafe for concurrent use. func Value.List() List func ValueOfList(v List) Value
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. Clear clears the entry associated with they given key. The operation does nothing if there is no entry associated with the key. Clear is a mutating operation and unsafe for concurrent use. Get retrieves the value for an entry with the given key. It returns an invalid value for non-existent entries. Has reports whether an entry with the given key is in the map. IsValid reports whether the map is valid. An invalid map is an empty, read-only value. An invalid message often corresponds to a nil Go map value, but the details are implementation dependent. Validity is not part of the protobuf data model, and may not be preserved in marshaling or other operations. Len reports the number of elements in the map. Mutable retrieves a mutable reference to the entry for the given key. If no entry exists for the key, it creates a new, empty, mutable value and stores it as the entry for the key. It panics if the map value is not a message. NewValue returns a new value assignable as a map value. For enums, this returns the first enum value. For other scalars, this returns the zero value. For messages, this returns a new, empty, mutable value. Range iterates over every map entry in an undefined order, calling f for each key and value encountered. Range calls f Len times unless f returns false, which stops iteration. While iterating, mutating operations may only be performed on the current map key. Set stores the value for an entry with the given key. It panics when given a key or value that is invalid or the wrong type. When setting a composite type, it is unspecified whether the set value aliases the source's memory in any way. Set is a mutating operation and unsafe for concurrent use. T : google.golang.org/protobuf/internal/order.EntryRanger func Value.Map() Map func ValueOfMap(v Map) Value
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: ╔═════════╤═════════════════════════════════════╗ ║ Go type │ Protobuf kind ║ ╠═════════╪═════════════════════════════════════╣ ║ bool │ BoolKind ║ ║ int32 │ Int32Kind, Sint32Kind, Sfixed32Kind ║ ║ int64 │ Int64Kind, Sint64Kind, Sfixed64Kind ║ ║ uint32 │ Uint32Kind, Fixed32Kind ║ ║ uint64 │ Uint64Kind, Fixed64Kind ║ ║ string │ StringKind ║ ╚═════════╧═════════════════════════════════════╝ 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. // 0B Bool returns k as a bool and panics if the type is not a bool. Int returns k as a int64 and panics if the type is not a int32 or int64. Interface returns k as an interface{}. IsValid reports whether k is populated with a value. String returns k as a string. Since this method implements fmt.Stringer, this returns the formatted string value for any non-string type. Uint returns k as a uint64 and panics if the type is not a uint32 or uint64. Value returns k as a Value. T : fmt.Stringer func Value.MapKey() MapKey func Map.Clear(MapKey) func Map.Get(MapKey) Value func Map.Has(MapKey) bool func Map.Mutable(MapKey) Value func Map.Set(MapKey, Value)
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. 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 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. Clear clears the field such that a subsequent Has call reports false. Clearing an extension field clears both the extension type and value associated with the given field number. Clear is a mutating operation and unsafe for concurrent use. Descriptor returns message descriptor, which contains only the protobuf type information for the message. Get retrieves the value for a field. For unpopulated scalars, it returns the default value, where the default value of a bytes scalar is guaranteed to be a copy. For unpopulated composite types, it returns an empty, read-only view of the value; to obtain a mutable reference, use Mutable. GetUnknown retrieves the entire list of unknown fields. The caller may only mutate the contents of the RawFields if the mutated bytes are stored back into the message with SetUnknown. Has reports whether a field is populated. Some fields have the property of nullability where it is possible to distinguish between the default value of a field and whether the field was explicitly populated with the default value. Singular message fields, member fields of a oneof, and proto2 scalar fields are nullable. Such fields are populated only if explicitly set. In other cases (aside from the nullable cases above), a proto3 scalar field is populated if it contains a non-zero value, and a repeated field is populated if it is non-empty. Interface unwraps the message reflection interface and returns the underlying ProtoMessage interface. IsValid reports whether the message is valid. An invalid message is an empty, read-only value. An invalid message often corresponds to a nil pointer of the concrete message type, but the details are implementation dependent. Validity is not part of the protobuf data model, and may not be preserved in marshaling or other operations. Mutable returns a mutable reference to a composite type. If the field is unpopulated, it may allocate a composite value. For a field belonging to a oneof, it implicitly clears any other field that may be currently set within the same oneof. For extension fields, it implicitly stores the provided ExtensionType if not already stored. It panics if the field does not contain a composite type. Mutable is a mutating operation and unsafe for concurrent use. New returns a newly allocated and mutable empty message. NewField returns a new value that is assignable to the field for the given descriptor. For scalars, this returns the default value. For lists, maps, and messages, this returns a new, empty, mutable value. ProtoMethods returns optional fast-path implementions of various operations. This method may return nil. The returned methods type is identical to "google.golang.org/protobuf/runtime/protoiface".Methods. Consult the protoiface package documentation for details. Range iterates over every populated field in an undefined order, calling f for each field descriptor and value encountered. Range returns immediately if f returns false. While iterating, mutating operations may only be performed on the current field descriptor. Set stores the value for a field. For a field belonging to a oneof, it implicitly clears any other field that may be currently set within the same oneof. For extension fields, it implicitly stores the provided ExtensionType. When setting a composite type, it is unspecified whether the stored value aliases the source's memory in any way. If the composite value is an empty, read-only value, then it panics. Set is a mutating operation and unsafe for concurrent use. SetUnknown stores an entire list of unknown fields. The raw fields must be syntactically valid according to the wire format. An implementation may panic if this is not the case. Once stored, the caller must not mutate the content of the RawFields. An empty RawFields may be passed to clear the fields. SetUnknown is a mutating operation and unsafe for concurrent use. Type returns the message type, which encapsulates both Go and protobuf type information. If the Go type information is not needed, it is recommended that the message descriptor be used instead. WhichOneof reports which field within the oneof is populated, returning nil if none are populated. It panics if the oneof descriptor does not belong to this message. T : google.golang.org/protobuf/internal/order.FieldRanger func Message.New() Message func MessageFieldTypes.New() Message func MessageFieldTypes.Zero() Message func MessageType.New() Message func MessageType.Zero() Message func ProtoMessage.ProtoReflect() Message func Value.Message() Message func google.golang.org/protobuf/internal/impl.Export.MessageOf(m impl.message) Message func google.golang.org/protobuf/internal/impl.(*MessageInfo).MessageOf(m interface{}) Message func google.golang.org/protobuf/internal/impl.(*MessageInfo).New() Message func google.golang.org/protobuf/internal/impl.(*MessageInfo).Zero() Message func google.golang.org/protobuf/proto.Message.ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*DescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*DescriptorProto_ExtensionRange).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*DescriptorProto_ReservedRange).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*EnumDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*EnumDescriptorProto_EnumReservedRange).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*EnumOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*EnumValueDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*EnumValueOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*ExtensionRangeOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*FieldDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*FieldOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*FileDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*FileDescriptorSet).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*FileOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*GeneratedCodeInfo).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*GeneratedCodeInfo_Annotation).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*MessageOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*MethodDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*MethodOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*OneofDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*OneofOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*ServiceDescriptorProto).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*ServiceOptions).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*SourceCodeInfo).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*SourceCodeInfo_Location).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*UninterpretedOption).ProtoReflect() Message func google.golang.org/protobuf/types/descriptorpb.(*UninterpretedOption_NamePart).ProtoReflect() Message func google.golang.org/protobuf/types/known/anypb.(*Any).ProtoReflect() Message func google.golang.org/protobuf/types/known/durationpb.(*Duration).ProtoReflect() Message func google.golang.org/protobuf/types/known/timestamppb.(*Timestamp).ProtoReflect() Message func google.golang.org/genproto/googleapis/api/annotations.(*CustomHttpPattern).ProtoReflect() Message func google.golang.org/genproto/googleapis/api/annotations.(*Http).ProtoReflect() Message func google.golang.org/genproto/googleapis/api/annotations.(*HttpRule).ProtoReflect() Message func google.golang.org/genproto/googleapis/api/annotations.(*ResourceDescriptor).ProtoReflect() Message func google.golang.org/genproto/googleapis/api/annotations.(*ResourceReference).ProtoReflect() Message func google.golang.org/genproto/googleapis/logging/type.(*HttpRequest).ProtoReflect() Message func github.com/golang/protobuf/proto.MessageReflect(m proto.Message) Message func github.com/golang/protobuf/ptypes.DynamicAny.ProtoReflect() Message func ValueOfMessage(v Message) Value func google.golang.org/protobuf/internal/impl.IsLazy(m Message, fd FieldDescriptor) bool
MessageDescriptor describes a message and corresponds with the google.protobuf.DescriptorProto message. Nested declarations: FieldDescriptor, OneofDescriptor, FieldDescriptor, EnumDescriptor, and/or MessageDescriptor. Enums is a list of nested enum declarations. ExtensionRangeOptions returns the ith extension range options. 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. ExtensionRanges is the field ranges used for extension fields. In Proto3, it is always an empty ranges. Extensions is a list of nested extension declarations. Fields is a list of nested field declarations. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsMapEntry indicates that this is an auto-generated message type to represent the entry type for a map field. Map entry messages have only two fields: • a "key" field with a field number of 1 • a "value" field with a field number of 2 The key and value types are determined by these two fields. If IsMapEntry is true, it implies that FieldDescriptor.IsMap is true for some field with this message type. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Messages is a list of nested message declarations. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Oneofs is a list of nested oneof declarations. Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(MessageDescriptor) RequiredNumbers is a list of required field numbers. In Proto3, it is always an empty list. ReservedNames is a list of reserved field names. ReservedRanges is a list of reserved ranges of field numbers. Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 *google.golang.org/protobuf/internal/filedesc.Message google.golang.org/protobuf/internal/filedesc.PlaceholderMessage T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func ExtensionDescriptor.ContainingMessage() MessageDescriptor func ExtensionDescriptor.Message() MessageDescriptor func ExtensionTypeDescriptor.ContainingMessage() MessageDescriptor func ExtensionTypeDescriptor.Message() MessageDescriptor func FieldDescriptor.ContainingMessage() MessageDescriptor func FieldDescriptor.Message() MessageDescriptor func Message.Descriptor() MessageDescriptor func MessageDescriptors.ByName(s Name) MessageDescriptor func MessageDescriptors.Get(i int) MessageDescriptor func MessageFieldTypes.Descriptor() MessageDescriptor func MessageType.Descriptor() MessageDescriptor func MethodDescriptor.Input() MessageDescriptor func MethodDescriptor.Output() MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).ContainingMessage() MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).Message() MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).ContainingMessage() MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).Message() MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Messages).ByName(s Name) MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Messages).Get(i int) MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Method).Input() MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Method).Output() MessageDescriptor func google.golang.org/protobuf/internal/impl.LegacyLoadMessageDesc(t reflect.Type) MessageDescriptor func google.golang.org/protobuf/internal/impl.Export.MessageDescriptorOf(m impl.message) MessageDescriptor func google.golang.org/protobuf/internal/impl.(*MessageInfo).Descriptor() MessageDescriptor func MessageDescriptor.ProtoType(MessageDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToDescriptorProto(message MessageDescriptor) *descriptorpb.DescriptorProto func google.golang.org/protobuf/internal/encoding/messageset.IsMessageSet(md MessageDescriptor) bool func google.golang.org/protobuf/internal/filedesc.(*Message).ProtoType(MessageDescriptor) func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.ProtoType(MessageDescriptor)
MessageDescriptors is a list of message declarations. ByName returns the MessageDescriptor for a message named s. It returns nil if not found. Get returns the ith MessageDescriptor. It panics if out of bounds. Len reports the number of messages. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Messages T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileDescriptor.Messages() MessageDescriptors func MessageDescriptor.Messages() MessageDescriptors func google.golang.org/protobuf/internal/filedesc.(*File).Messages() MessageDescriptors func google.golang.org/protobuf/internal/filedesc.(*Message).Messages() MessageDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Messages() MessageDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Messages() MessageDescriptors
MessageFieldTypes extends a MessageType by providing type information regarding enums and messages referenced by the message fields. Descriptor returns the message descriptor. Invariant: t.Descriptor() == t.New().Descriptor() 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() 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. Invariant: mt.Message(i).Descriptor() == mt.Descriptor().Fields(i).Message() New returns a newly allocated empty message. It may return nil for synthetic messages representing a map entry. Zero returns an empty, read-only message. It may return nil for synthetic messages representing a map entry. *google.golang.org/protobuf/internal/impl.MessageInfo T : MessageType
MessageType encapsulates a MessageDescriptor with a concrete Go implementation. It is recommended that implementations of this interface also implement the MessageFieldTypes interface. Descriptor returns the message descriptor. Invariant: t.Descriptor() == t.New().Descriptor() New returns a newly allocated empty message. It may return nil for synthetic messages representing a map entry. Zero returns an empty, read-only message. It may return nil for synthetic messages representing a map entry. MessageFieldTypes (interface) *google.golang.org/protobuf/internal/impl.MessageInfo func Message.Type() MessageType func MessageFieldTypes.Message(i int) MessageType func google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver.FindMessageByName(message FullName) (MessageType, error) func google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver.FindMessageByURL(url string) (MessageType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindMessageByName(message FullName) (MessageType, error) func google.golang.org/protobuf/reflect/protoregistry.(*Types).FindMessageByURL(url string) (MessageType, error) func google.golang.org/protobuf/internal/impl.Export.LegacyMessageTypeOf(m piface.MessageV1, name FullName) MessageType func google.golang.org/protobuf/internal/impl.Export.MessageTypeOf(m impl.message) MessageType func google.golang.org/protobuf/internal/impl.(*MessageInfo).Message(i int) MessageType func google.golang.org/protobuf/reflect/protoregistry.(*Types).RegisterMessage(mt MessageType) error func google.golang.org/protobuf/internal/impl.Validate(mt MessageType, in piface.UnmarshalInput) (out piface.UnmarshalOutput, _ impl.ValidationStatus)
MethodDescriptor describes a method and corresponds with the google.protobuf.MethodDescriptorProto message. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. Input is the input message descriptor. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. IsStreamingClient reports whether the client streams multiple messages. IsStreamingServer reports whether the server streams multiple messages. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Output is the output message descriptor. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(MethodDescriptor) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 *google.golang.org/protobuf/internal/filedesc.Method T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func MethodDescriptors.ByName(s Name) MethodDescriptor func MethodDescriptors.Get(i int) MethodDescriptor func google.golang.org/protobuf/internal/filedesc.(*Methods).ByName(s Name) MethodDescriptor func google.golang.org/protobuf/internal/filedesc.(*Methods).Get(i int) MethodDescriptor func MethodDescriptor.ProtoType(MethodDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToMethodDescriptorProto(method MethodDescriptor) *descriptorpb.MethodDescriptorProto func google.golang.org/protobuf/internal/filedesc.(*Method).ProtoType(MethodDescriptor)
MethodDescriptors is a list of method declarations. ByName returns the MethodDescriptor for a service method named s. It returns nil if not found. Get returns the ith MethodDescriptor. It panics if out of bounds. Len reports the number of methods. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Methods T : google.golang.org/protobuf/internal/pragma.DoNotImplement func ServiceDescriptor.Methods() MethodDescriptors func google.golang.org/protobuf/internal/filedesc.(*Service).Methods() MethodDescriptors
Name is the short name for a proto declaration. This is not the name as used in Go source code, which might not be identical to the proto name. IsValid reports whether s is a syntactically valid name. An empty name is invalid. func Descriptor.Name() Name func EnumDescriptor.Name() Name func EnumValueDescriptor.Name() Name func ExtensionDescriptor.Name() Name func ExtensionTypeDescriptor.Name() Name func FieldDescriptor.Name() Name func FileDescriptor.Name() Name func FullName.Name() Name func MessageDescriptor.Name() Name func MethodDescriptor.Name() Name func Names.Get(i int) Name func OneofDescriptor.Name() Name func ServiceDescriptor.Name() Name func google.golang.org/protobuf/internal/filedesc.(*Base).Name() Name func google.golang.org/protobuf/internal/filedesc.(*File).Name() Name func google.golang.org/protobuf/internal/filedesc.(*Names).Get(i int) Name func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.Name() Name func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.Name() Name func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Name() Name func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Name() Name func EnumDescriptors.ByName(s Name) EnumDescriptor func EnumValueDescriptors.ByName(s Name) EnumValueDescriptor func ExtensionDescriptors.ByName(s Name) ExtensionDescriptor func FieldDescriptors.ByName(s Name) FieldDescriptor func FullName.Append(s Name) FullName func MessageDescriptors.ByName(s Name) MessageDescriptor func MethodDescriptors.ByName(s Name) MethodDescriptor func Names.Has(s Name) bool func OneofDescriptors.ByName(s Name) OneofDescriptor func ServiceDescriptors.ByName(s Name) ServiceDescriptor func google.golang.org/protobuf/internal/filedesc.(*Enums).ByName(s Name) EnumDescriptor func google.golang.org/protobuf/internal/filedesc.(*EnumValues).ByName(s Name) EnumValueDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extensions).ByName(s Name) ExtensionDescriptor func google.golang.org/protobuf/internal/filedesc.(*Fields).ByName(s Name) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Messages).ByName(s Name) MessageDescriptor func google.golang.org/protobuf/internal/filedesc.(*Methods).ByName(s Name) MethodDescriptor func google.golang.org/protobuf/internal/filedesc.(*Names).Has(s Name) bool func google.golang.org/protobuf/internal/filedesc.(*OneofFields).ByName(s Name) FieldDescriptor func google.golang.org/protobuf/internal/filedesc.(*Oneofs).ByName(s Name) OneofDescriptor func google.golang.org/protobuf/internal/filedesc.(*Services).ByName(s Name) ServiceDescriptor func google.golang.org/protobuf/internal/strs.(*Builder).AppendFullName(prefix FullName, name Name) FullName const google.golang.org/protobuf/internal/genid.Any_message_name const google.golang.org/protobuf/internal/genid.Any_TypeUrl_field_name const google.golang.org/protobuf/internal/genid.Any_Value_field_name const google.golang.org/protobuf/internal/genid.Api_message_name const google.golang.org/protobuf/internal/genid.Api_Methods_field_name const google.golang.org/protobuf/internal/genid.Api_Mixins_field_name const google.golang.org/protobuf/internal/genid.Api_Name_field_name const google.golang.org/protobuf/internal/genid.Api_Options_field_name const google.golang.org/protobuf/internal/genid.Api_SourceContext_field_name const google.golang.org/protobuf/internal/genid.Api_Syntax_field_name const google.golang.org/protobuf/internal/genid.Api_Version_field_name const google.golang.org/protobuf/internal/genid.BoolValue_message_name const google.golang.org/protobuf/internal/genid.BoolValue_Value_field_name const google.golang.org/protobuf/internal/genid.BytesValue_message_name const google.golang.org/protobuf/internal/genid.BytesValue_Value_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_EnumType_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_Extension_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_End_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_message_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_Options_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ExtensionRange_Start_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_Field_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_message_name const google.golang.org/protobuf/internal/genid.DescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_NestedType_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_OneofDecl_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedName_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_End_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_field_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_message_name const google.golang.org/protobuf/internal/genid.DescriptorProto_ReservedRange_Start_field_name const google.golang.org/protobuf/internal/genid.DoubleValue_message_name const google.golang.org/protobuf/internal/genid.DoubleValue_Value_field_name const google.golang.org/protobuf/internal/genid.Duration_message_name const google.golang.org/protobuf/internal/genid.Duration_Nanos_field_name const google.golang.org/protobuf/internal/genid.Duration_Seconds_field_name const google.golang.org/protobuf/internal/genid.Empty_message_name const google.golang.org/protobuf/internal/genid.Enum_Enumvalue_field_name const google.golang.org/protobuf/internal/genid.Enum_message_name const google.golang.org/protobuf/internal/genid.Enum_Name_field_name const google.golang.org/protobuf/internal/genid.Enum_Options_field_name const google.golang.org/protobuf/internal/genid.Enum_SourceContext_field_name const google.golang.org/protobuf/internal/genid.Enum_Syntax_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_EnumReservedRange_End_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_EnumReservedRange_message_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_EnumReservedRange_Start_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_ReservedName_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_ReservedRange_field_name const google.golang.org/protobuf/internal/genid.EnumDescriptorProto_Value_field_name const google.golang.org/protobuf/internal/genid.EnumOptions_AllowAlias_field_name const google.golang.org/protobuf/internal/genid.EnumOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.EnumOptions_message_name const google.golang.org/protobuf/internal/genid.EnumOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.EnumValue_message_name const google.golang.org/protobuf/internal/genid.EnumValue_Name_field_name const google.golang.org/protobuf/internal/genid.EnumValue_Number_field_name const google.golang.org/protobuf/internal/genid.EnumValue_Options_field_name const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_Number_field_name const google.golang.org/protobuf/internal/genid.EnumValueDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.EnumValueOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.EnumValueOptions_message_name const google.golang.org/protobuf/internal/genid.EnumValueOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.ExtensionRangeOptions_message_name const google.golang.org/protobuf/internal/genid.ExtensionRangeOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.Field_Cardinality_field_name const google.golang.org/protobuf/internal/genid.Field_DefaultValue_field_name const google.golang.org/protobuf/internal/genid.Field_JsonName_field_name const google.golang.org/protobuf/internal/genid.Field_Kind_field_name const google.golang.org/protobuf/internal/genid.Field_message_name const google.golang.org/protobuf/internal/genid.Field_Name_field_name const google.golang.org/protobuf/internal/genid.Field_Number_field_name const google.golang.org/protobuf/internal/genid.Field_OneofIndex_field_name const google.golang.org/protobuf/internal/genid.Field_Options_field_name const google.golang.org/protobuf/internal/genid.Field_Packed_field_name const google.golang.org/protobuf/internal/genid.Field_TypeUrl_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_DefaultValue_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Extendee_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_JsonName_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Label_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Number_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_OneofIndex_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Proto3Optional_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_Type_field_name const google.golang.org/protobuf/internal/genid.FieldDescriptorProto_TypeName_field_name const google.golang.org/protobuf/internal/genid.FieldMask_message_name const google.golang.org/protobuf/internal/genid.FieldMask_Paths_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_Ctype_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_Jstype_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_Lazy_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_message_name const google.golang.org/protobuf/internal/genid.FieldOptions_Packed_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.FieldOptions_Weak_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Dependency_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_EnumType_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Extension_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_MessageType_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Package_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_PublicDependency_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Service_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_SourceCodeInfo_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_Syntax_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorProto_WeakDependency_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorSet_File_field_name const google.golang.org/protobuf/internal/genid.FileDescriptorSet_message_name const google.golang.org/protobuf/internal/genid.FileOptions_CcEnableArenas_field_name const google.golang.org/protobuf/internal/genid.FileOptions_CcGenericServices_field_name const google.golang.org/protobuf/internal/genid.FileOptions_CsharpNamespace_field_name const google.golang.org/protobuf/internal/genid.FileOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.FileOptions_GoPackage_field_name const google.golang.org/protobuf/internal/genid.FileOptions_JavaGenerateEqualsAndHash_field_name const google.golang.org/protobuf/internal/genid.FileOptions_JavaGenericServices_field_name const google.golang.org/protobuf/internal/genid.FileOptions_JavaMultipleFiles_field_name const google.golang.org/protobuf/internal/genid.FileOptions_JavaOuterClassname_field_name const google.golang.org/protobuf/internal/genid.FileOptions_JavaPackage_field_name const google.golang.org/protobuf/internal/genid.FileOptions_JavaStringCheckUtf8_field_name const google.golang.org/protobuf/internal/genid.FileOptions_message_name const google.golang.org/protobuf/internal/genid.FileOptions_ObjcClassPrefix_field_name const google.golang.org/protobuf/internal/genid.FileOptions_OptimizeFor_field_name const google.golang.org/protobuf/internal/genid.FileOptions_PhpClassPrefix_field_name const google.golang.org/protobuf/internal/genid.FileOptions_PhpGenericServices_field_name const google.golang.org/protobuf/internal/genid.FileOptions_PhpMetadataNamespace_field_name const google.golang.org/protobuf/internal/genid.FileOptions_PhpNamespace_field_name const google.golang.org/protobuf/internal/genid.FileOptions_PyGenericServices_field_name const google.golang.org/protobuf/internal/genid.FileOptions_RubyPackage_field_name const google.golang.org/protobuf/internal/genid.FileOptions_SwiftPrefix_field_name const google.golang.org/protobuf/internal/genid.FileOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.FloatValue_message_name const google.golang.org/protobuf/internal/genid.FloatValue_Value_field_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_Begin_field_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_End_field_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_field_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_message_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_Path_field_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_Annotation_SourceFile_field_name const google.golang.org/protobuf/internal/genid.GeneratedCodeInfo_message_name const google.golang.org/protobuf/internal/genid.Int32Value_message_name const google.golang.org/protobuf/internal/genid.Int32Value_Value_field_name const google.golang.org/protobuf/internal/genid.Int64Value_message_name const google.golang.org/protobuf/internal/genid.Int64Value_Value_field_name const google.golang.org/protobuf/internal/genid.ListValue_message_name const google.golang.org/protobuf/internal/genid.ListValue_Values_field_name const google.golang.org/protobuf/internal/genid.MapEntry_Key_field_name const google.golang.org/protobuf/internal/genid.MapEntry_Value_field_name const google.golang.org/protobuf/internal/genid.MessageOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.MessageOptions_MapEntry_field_name const google.golang.org/protobuf/internal/genid.MessageOptions_message_name const google.golang.org/protobuf/internal/genid.MessageOptions_MessageSetWireFormat_field_name const google.golang.org/protobuf/internal/genid.MessageOptions_NoStandardDescriptorAccessor_field_name const google.golang.org/protobuf/internal/genid.MessageOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.Method_message_name const google.golang.org/protobuf/internal/genid.Method_Name_field_name const google.golang.org/protobuf/internal/genid.Method_Options_field_name const google.golang.org/protobuf/internal/genid.Method_RequestStreaming_field_name const google.golang.org/protobuf/internal/genid.Method_RequestTypeUrl_field_name const google.golang.org/protobuf/internal/genid.Method_ResponseStreaming_field_name const google.golang.org/protobuf/internal/genid.Method_ResponseTypeUrl_field_name const google.golang.org/protobuf/internal/genid.Method_Syntax_field_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_ClientStreaming_field_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_InputType_field_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_OutputType_field_name const google.golang.org/protobuf/internal/genid.MethodDescriptorProto_ServerStreaming_field_name const google.golang.org/protobuf/internal/genid.MethodOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.MethodOptions_IdempotencyLevel_field_name const google.golang.org/protobuf/internal/genid.MethodOptions_message_name const google.golang.org/protobuf/internal/genid.MethodOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.Mixin_message_name const google.golang.org/protobuf/internal/genid.Mixin_Name_field_name const google.golang.org/protobuf/internal/genid.Mixin_Root_field_name const google.golang.org/protobuf/internal/genid.OneofDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.OneofDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.OneofDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.OneofOptions_message_name const google.golang.org/protobuf/internal/genid.OneofOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.Option_message_name const google.golang.org/protobuf/internal/genid.Option_Name_field_name const google.golang.org/protobuf/internal/genid.Option_Value_field_name const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_message_name const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_Method_field_name const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_Name_field_name const google.golang.org/protobuf/internal/genid.ServiceDescriptorProto_Options_field_name const google.golang.org/protobuf/internal/genid.ServiceOptions_Deprecated_field_name const google.golang.org/protobuf/internal/genid.ServiceOptions_message_name const google.golang.org/protobuf/internal/genid.ServiceOptions_UninterpretedOption_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_LeadingComments_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_LeadingDetachedComments_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_message_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_Path_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_Span_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_Location_TrailingComments_field_name const google.golang.org/protobuf/internal/genid.SourceCodeInfo_message_name const google.golang.org/protobuf/internal/genid.SourceContext_FileName_field_name const google.golang.org/protobuf/internal/genid.SourceContext_message_name const google.golang.org/protobuf/internal/genid.StringValue_message_name const google.golang.org/protobuf/internal/genid.StringValue_Value_field_name const google.golang.org/protobuf/internal/genid.Struct_Fields_field_name const google.golang.org/protobuf/internal/genid.Struct_FieldsEntry_Key_field_name const google.golang.org/protobuf/internal/genid.Struct_FieldsEntry_message_name const google.golang.org/protobuf/internal/genid.Struct_FieldsEntry_Value_field_name const google.golang.org/protobuf/internal/genid.Struct_message_name const google.golang.org/protobuf/internal/genid.Timestamp_message_name const google.golang.org/protobuf/internal/genid.Timestamp_Nanos_field_name const google.golang.org/protobuf/internal/genid.Timestamp_Seconds_field_name const google.golang.org/protobuf/internal/genid.Type_Fields_field_name const google.golang.org/protobuf/internal/genid.Type_message_name const google.golang.org/protobuf/internal/genid.Type_Name_field_name const google.golang.org/protobuf/internal/genid.Type_Oneofs_field_name const google.golang.org/protobuf/internal/genid.Type_Options_field_name const google.golang.org/protobuf/internal/genid.Type_SourceContext_field_name const google.golang.org/protobuf/internal/genid.Type_Syntax_field_name const google.golang.org/protobuf/internal/genid.UInt32Value_message_name const google.golang.org/protobuf/internal/genid.UInt32Value_Value_field_name const google.golang.org/protobuf/internal/genid.UInt64Value_message_name const google.golang.org/protobuf/internal/genid.UInt64Value_Value_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_AggregateValue_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_DoubleValue_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_IdentifierValue_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_message_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_Name_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_NamePart_IsExtension_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_NamePart_message_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_NamePart_NamePart_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_NegativeIntValue_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_PositiveIntValue_field_name const google.golang.org/protobuf/internal/genid.UninterpretedOption_StringValue_field_name const google.golang.org/protobuf/internal/genid.Value_BoolValue_field_name const google.golang.org/protobuf/internal/genid.Value_Kind_oneof_name const google.golang.org/protobuf/internal/genid.Value_ListValue_field_name const google.golang.org/protobuf/internal/genid.Value_message_name const google.golang.org/protobuf/internal/genid.Value_NullValue_field_name const google.golang.org/protobuf/internal/genid.Value_NumberValue_field_name const google.golang.org/protobuf/internal/genid.Value_StringValue_field_name const google.golang.org/protobuf/internal/genid.Value_StructValue_field_name const google.golang.org/protobuf/internal/genid.WrapperValue_Value_field_name
Names represent a list of names. Get returns the ith name. It panics if out of bounds. Has reports whether s matches any names in the list. Len reports the number of names in the list. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Names T : google.golang.org/protobuf/internal/pragma.DoNotImplement func EnumDescriptor.ReservedNames() Names func MessageDescriptor.ReservedNames() Names func google.golang.org/protobuf/internal/filedesc.(*Enum).ReservedNames() Names func google.golang.org/protobuf/internal/filedesc.(*Message).ReservedNames() Names func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.ReservedNames() Names func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.ReservedNames() Names
OneofDescriptor describes a oneof field set within a given message and corresponds with the google.protobuf.OneofDescriptorProto message. Fields is a list of fields belonging to this oneof. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. IsSynthetic reports whether this is a synthetic oneof created to support proto3 optional semantics. If true, Fields contains exactly one field with HasOptionalKeyword specified. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(OneofDescriptor) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 *google.golang.org/protobuf/internal/filedesc.Oneof T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func ExtensionDescriptor.ContainingOneof() OneofDescriptor func ExtensionTypeDescriptor.ContainingOneof() OneofDescriptor func FieldDescriptor.ContainingOneof() OneofDescriptor func OneofDescriptors.ByName(s Name) OneofDescriptor func OneofDescriptors.Get(i int) OneofDescriptor func google.golang.org/protobuf/internal/filedesc.(*Extension).ContainingOneof() OneofDescriptor func google.golang.org/protobuf/internal/filedesc.(*Field).ContainingOneof() OneofDescriptor func google.golang.org/protobuf/internal/filedesc.(*Oneofs).ByName(s Name) OneofDescriptor func google.golang.org/protobuf/internal/filedesc.(*Oneofs).Get(i int) OneofDescriptor func Message.WhichOneof(OneofDescriptor) FieldDescriptor func OneofDescriptor.ProtoType(OneofDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToOneofDescriptorProto(oneof OneofDescriptor) *descriptorpb.OneofDescriptorProto func google.golang.org/protobuf/internal/filedesc.(*Oneof).ProtoType(OneofDescriptor)
OneofDescriptors is a list of oneof declarations. ByName returns the OneofDescriptor for a oneof named s. It returns nil if not found. Get returns the ith OneofDescriptor. It panics if out of bounds. Len reports the number of oneof fields. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Oneofs T : google.golang.org/protobuf/internal/pragma.DoNotImplement func MessageDescriptor.Oneofs() OneofDescriptors func google.golang.org/protobuf/internal/filedesc.(*Message).Oneofs() OneofDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Oneofs() OneofDescriptors
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 proto.Message type instead, which aliases this type. ( T) ProtoReflect() Message *google.golang.org/protobuf/types/descriptorpb.DescriptorProto *google.golang.org/protobuf/types/descriptorpb.DescriptorProto_ExtensionRange *google.golang.org/protobuf/types/descriptorpb.DescriptorProto_ReservedRange *google.golang.org/protobuf/types/descriptorpb.EnumDescriptorProto *google.golang.org/protobuf/types/descriptorpb.EnumDescriptorProto_EnumReservedRange *google.golang.org/protobuf/types/descriptorpb.EnumOptions *google.golang.org/protobuf/types/descriptorpb.EnumValueDescriptorProto *google.golang.org/protobuf/types/descriptorpb.EnumValueOptions *google.golang.org/protobuf/types/descriptorpb.ExtensionRangeOptions *google.golang.org/protobuf/types/descriptorpb.FieldDescriptorProto *google.golang.org/protobuf/types/descriptorpb.FieldOptions *google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto *google.golang.org/protobuf/types/descriptorpb.FileDescriptorSet *google.golang.org/protobuf/types/descriptorpb.FileOptions *google.golang.org/protobuf/types/descriptorpb.GeneratedCodeInfo *google.golang.org/protobuf/types/descriptorpb.GeneratedCodeInfo_Annotation *google.golang.org/protobuf/types/descriptorpb.MessageOptions *google.golang.org/protobuf/types/descriptorpb.MethodDescriptorProto *google.golang.org/protobuf/types/descriptorpb.MethodOptions *google.golang.org/protobuf/types/descriptorpb.OneofDescriptorProto *google.golang.org/protobuf/types/descriptorpb.OneofOptions *google.golang.org/protobuf/types/descriptorpb.ServiceDescriptorProto *google.golang.org/protobuf/types/descriptorpb.ServiceOptions *google.golang.org/protobuf/types/descriptorpb.SourceCodeInfo *google.golang.org/protobuf/types/descriptorpb.SourceCodeInfo_Location *google.golang.org/protobuf/types/descriptorpb.UninterpretedOption *google.golang.org/protobuf/types/descriptorpb.UninterpretedOption_NamePart *google.golang.org/protobuf/types/known/anypb.Any *google.golang.org/protobuf/types/known/durationpb.Duration *google.golang.org/protobuf/types/known/timestamppb.Timestamp *google.golang.org/genproto/googleapis/api/annotations.CustomHttpPattern *google.golang.org/genproto/googleapis/api/annotations.Http *google.golang.org/genproto/googleapis/api/annotations.HttpRule *google.golang.org/genproto/googleapis/api/annotations.ResourceDescriptor *google.golang.org/genproto/googleapis/api/annotations.ResourceReference *google.golang.org/genproto/googleapis/logging/type.HttpRequest github.com/golang/protobuf/ptypes.DynamicAny func Descriptor.Options() ProtoMessage func EnumDescriptor.Options() ProtoMessage func EnumValueDescriptor.Options() ProtoMessage func ExtensionDescriptor.Options() ProtoMessage func ExtensionTypeDescriptor.Options() ProtoMessage func FieldDescriptor.Options() ProtoMessage func FileDescriptor.Options() ProtoMessage func Message.Interface() ProtoMessage func MessageDescriptor.ExtensionRangeOptions(i int) ProtoMessage func MessageDescriptor.Options() ProtoMessage func MethodDescriptor.Options() ProtoMessage func OneofDescriptor.Options() ProtoMessage func ServiceDescriptor.Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Enum).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*EnumValue).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Extension).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Field).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*File).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Message).ExtensionRangeOptions(i int) ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Message).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Method).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Oneof).Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.ExtensionRangeOptions(int) ProtoMessage func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Options() ProtoMessage func google.golang.org/protobuf/internal/filedesc.(*Service).Options() ProtoMessage func google.golang.org/protobuf/internal/impl.Export.GetWeak(w impl.WeakFields, num FieldNumber, name FullName) ProtoMessage func google.golang.org/protobuf/internal/impl.Export.ProtoMessageV2Of(m impl.message) ProtoMessage func google.golang.org/protobuf/proto.Clone(m proto.Message) proto.Message func google.golang.org/protobuf/types/known/anypb.UnmarshalNew(src *anypb.Any, opts proto.UnmarshalOptions) (dst proto.Message, err error) func google.golang.org/protobuf/types/known/anypb.(*Any).UnmarshalNew() (proto.Message, error) func github.com/golang/protobuf/proto.MessageV2(m proto.GeneratedMessage) protoV2.Message func google.golang.org/protobuf/encoding/prototext.Format(m proto.Message) string func google.golang.org/protobuf/encoding/prototext.Marshal(m proto.Message) ([]byte, error) func google.golang.org/protobuf/encoding/prototext.Unmarshal(b []byte, m proto.Message) error func google.golang.org/protobuf/encoding/prototext.MarshalOptions.Format(m proto.Message) string func google.golang.org/protobuf/encoding/prototext.MarshalOptions.Marshal(m proto.Message) ([]byte, error) func google.golang.org/protobuf/encoding/prototext.UnmarshalOptions.Unmarshal(b []byte, m proto.Message) error func google.golang.org/protobuf/internal/impl.Export.MessageStringOf(m ProtoMessage) string func google.golang.org/protobuf/internal/impl.Export.SetWeak(w *impl.WeakFields, num FieldNumber, name FullName, m ProtoMessage) func google.golang.org/protobuf/proto.CheckInitialized(m proto.Message) error func google.golang.org/protobuf/proto.ClearExtension(m proto.Message, xt ExtensionType) func google.golang.org/protobuf/proto.Clone(m proto.Message) proto.Message func google.golang.org/protobuf/proto.Equal(x, y proto.Message) bool func google.golang.org/protobuf/proto.GetExtension(m proto.Message, xt ExtensionType) interface{} func google.golang.org/protobuf/proto.HasExtension(m proto.Message, xt ExtensionType) bool func google.golang.org/protobuf/proto.Marshal(m proto.Message) ([]byte, error) func google.golang.org/protobuf/proto.Merge(dst, src proto.Message) func google.golang.org/protobuf/proto.MessageName(m proto.Message) FullName func google.golang.org/protobuf/proto.RangeExtensions(m proto.Message, f func(ExtensionType, interface{}) bool) func google.golang.org/protobuf/proto.Reset(m proto.Message) func google.golang.org/protobuf/proto.SetExtension(m proto.Message, xt ExtensionType, v interface{}) func google.golang.org/protobuf/proto.Size(m proto.Message) int func google.golang.org/protobuf/proto.Unmarshal(b []byte, m proto.Message) error func google.golang.org/protobuf/proto.MarshalOptions.Marshal(m proto.Message) ([]byte, error) func google.golang.org/protobuf/proto.MarshalOptions.MarshalAppend(b []byte, m proto.Message) ([]byte, error) func google.golang.org/protobuf/proto.MarshalOptions.Size(m proto.Message) int func google.golang.org/protobuf/proto.UnmarshalOptions.Unmarshal(b []byte, m proto.Message) error func google.golang.org/protobuf/types/known/anypb.MarshalFrom(dst *anypb.Any, src proto.Message, opts proto.MarshalOptions) error func google.golang.org/protobuf/types/known/anypb.New(src proto.Message) (*anypb.Any, error) func google.golang.org/protobuf/types/known/anypb.UnmarshalTo(src *anypb.Any, dst proto.Message, opts proto.UnmarshalOptions) error func google.golang.org/protobuf/types/known/anypb.(*Any).MarshalFrom(m proto.Message) error func google.golang.org/protobuf/types/known/anypb.(*Any).MessageIs(m proto.Message) bool func google.golang.org/protobuf/types/known/anypb.(*Any).UnmarshalTo(m proto.Message) error var google.golang.org/protobuf/internal/descopts.Enum var google.golang.org/protobuf/internal/descopts.EnumValue var google.golang.org/protobuf/internal/descopts.ExtensionRange var google.golang.org/protobuf/internal/descopts.Field var google.golang.org/protobuf/internal/descopts.File var google.golang.org/protobuf/internal/descopts.Message var google.golang.org/protobuf/internal/descopts.Method var google.golang.org/protobuf/internal/descopts.Oneof var google.golang.org/protobuf/internal/descopts.Service
RawFields is the raw bytes for an ordered sequence of fields. Each field contains both the tag (representing field number and wire type), and also the wire data itself. IsValid reports whether b is syntactically correct wire format. func Message.GetUnknown() RawFields func Message.SetUnknown(RawFields)
ServiceDescriptor describes a service and corresponds with the google.protobuf.ServiceDescriptorProto message. Nested declarations: MethodDescriptor. FullName is the fully-qualified name of the declaration. The FullName is a concatenation of the full name of the type that this type is declared within and the declaration name. For example, field "foo_field" in message "proto.package.MyMessage" is uniquely identified as "proto.package.MyMessage.foo_field". Enum values are an exception to the rule (see EnumValueDescriptor). // e.g., "google.protobuf.Any" Index returns the index of this descriptor within its parent. It returns 0 if the descriptor does not have a parent or if the parent is unknown. IsPlaceholder reports whether type information is missing since a dependency is not resolved, in which case only name information is known. Placeholder types may only be returned by the following accessors as a result of unresolved dependencies or weak imports: ╔═══════════════════════════════════╤═════════════════════╗ ║ Accessor │ Descriptor ║ ╠═══════════════════════════════════╪═════════════════════╣ ║ FileImports.FileDescriptor │ FileDescriptor ║ ║ FieldDescriptor.Enum │ EnumDescriptor ║ ║ FieldDescriptor.Message │ MessageDescriptor ║ ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║ ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║ ║ MethodDescriptor.Input │ MessageDescriptor ║ ║ MethodDescriptor.Output │ MessageDescriptor ║ ╚═══════════════════════════════════╧═════════════════════╝ If true, only Name and FullName are valid. For FileDescriptor, the Path is also valid. Methods is a list of nested message declarations. Name is the short name of the declaration (i.e., FullName.Name). // e.g., "Any" Options returns the descriptor options. The caller must not modify the returned value. To avoid a dependency cycle, this function returns a proto.Message value. The proto message type returned for each descriptor type is as follows: ╔═════════════════════╤══════════════════════════════════════════╗ ║ Go type │ Protobuf message type ║ ╠═════════════════════╪══════════════════════════════════════════╣ ║ FileDescriptor │ google.protobuf.FileOptions ║ ║ EnumDescriptor │ google.protobuf.EnumOptions ║ ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║ ║ MessageDescriptor │ google.protobuf.MessageOptions ║ ║ FieldDescriptor │ google.protobuf.FieldOptions ║ ║ OneofDescriptor │ google.protobuf.OneofOptions ║ ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║ ║ MethodDescriptor │ google.protobuf.MethodOptions ║ ╚═════════════════════╧══════════════════════════════════════════╝ This method returns a typed nil-pointer if no options are present. The caller must import the descriptorpb package to use this. Parent returns the parent containing this descriptor declaration. The following shows the mapping from child type to possible parent types: ╔═════════════════════╤═══════════════════════════════════╗ ║ Child type │ Possible parent types ║ ╠═════════════════════╪═══════════════════════════════════╣ ║ FileDescriptor │ nil ║ ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║ ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║ ║ OneofDescriptor │ MessageDescriptor ║ ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║ ║ EnumValueDescriptor │ EnumDescriptor ║ ║ ServiceDescriptor │ FileDescriptor ║ ║ MethodDescriptor │ ServiceDescriptor ║ ╚═════════════════════╧═══════════════════════════════════╝ Support for this functionality is optional and may return nil. ParentFile returns the parent file descriptor that this descriptor is declared within. The parent file for the file descriptor is itself. Support for this functionality is optional and may return nil. ( T) ProtoInternal(pragma.DoNotImplement) ( T) ProtoType(ServiceDescriptor) Syntax is the protobuf syntax. // e.g., Proto2 or Proto3 *google.golang.org/protobuf/internal/filedesc.Service T : Descriptor T : google.golang.org/protobuf/internal/pragma.DoNotImplement func ServiceDescriptors.ByName(s Name) ServiceDescriptor func ServiceDescriptors.Get(i int) ServiceDescriptor func google.golang.org/protobuf/internal/filedesc.(*Services).ByName(s Name) ServiceDescriptor func google.golang.org/protobuf/internal/filedesc.(*Services).Get(i int) ServiceDescriptor func ServiceDescriptor.ProtoType(ServiceDescriptor) func google.golang.org/protobuf/reflect/protodesc.ToServiceDescriptorProto(service ServiceDescriptor) *descriptorpb.ServiceDescriptorProto func google.golang.org/protobuf/internal/filedesc.(*Service).ProtoType(ServiceDescriptor)
ServiceDescriptors is a list of service declarations. ByName returns the ServiceDescriptor for a service named s. It returns nil if not found. Get returns the ith ServiceDescriptor. It panics if out of bounds. Len reports the number of services. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.Services T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileDescriptor.Services() ServiceDescriptors func google.golang.org/protobuf/internal/filedesc.(*File).Services() ServiceDescriptors func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Services() ServiceDescriptors
SourceLocation describes a source location and corresponds with the google.protobuf.SourceCodeInfo.Location message. EndLine and EndColumn are the zero-indexed ending location in the source file for the declaration. In the descriptor.proto, the end line may be omitted if it is identical to the start line. Here, it is always populated. EndLine and EndColumn are the zero-indexed ending location in the source file for the declaration. In the descriptor.proto, the end line may be omitted if it is identical to the start line. Here, it is always populated. LeadingComments is the leading attached comment for the declaration. LeadingDetachedComments are the leading detached comments for the declaration. The contents of this slice must not be mutated. Next is an index into SourceLocations for the next source location that has the same Path. It is zero if there is no next location. Path is the path to the declaration from the root file descriptor. The contents of this slice must not be mutated. StartLine and StartColumn are the zero-indexed starting location in the source file for the declaration. StartLine and StartColumn are the zero-indexed starting location in the source file for the declaration. TrailingComments is the trailing attached comment for the declaration. func SourceLocations.ByDescriptor(desc Descriptor) SourceLocation func SourceLocations.ByPath(path SourcePath) SourceLocation func SourceLocations.Get(int) SourceLocation func google.golang.org/protobuf/internal/filedesc.(*SourceLocations).ByDescriptor(desc Descriptor) SourceLocation func google.golang.org/protobuf/internal/filedesc.(*SourceLocations).ByPath(path SourcePath) SourceLocation func google.golang.org/protobuf/internal/filedesc.(*SourceLocations).Get(i int) SourceLocation
SourceLocations is a list of source locations. ByDescriptor returns the SourceLocation for the given descriptor, returning the first location if multiple exist for the same path. If no location exists for this descriptor, it returns the zero value. ByPath returns the SourceLocation for the given path, returning the first location if multiple exist for the same path. If multiple locations exist for the same path, then SourceLocation.Next index can be used to identify the index of the next SourceLocation. If no location exists for this path, it returns the zero value. Get returns the ith SourceLocation. It panics if out of bounds. Len reports the number of source locations in the proto file. ( T) ProtoInternal(pragma.DoNotImplement) *google.golang.org/protobuf/internal/filedesc.SourceLocations T : google.golang.org/protobuf/internal/pragma.DoNotImplement func FileDescriptor.SourceLocations() SourceLocations func google.golang.org/protobuf/internal/filedesc.(*File).SourceLocations() SourceLocations func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.SourceLocations() SourceLocations
SourcePath identifies part of a file descriptor for a source location. The SourcePath is a sequence of either field numbers or indexes into a repeated field that form a path starting from the root file descriptor. See google.protobuf.SourceCodeInfo.Location.path. Equal reports whether p1 equals p2. String formats the path in a humanly readable manner. The output is guaranteed to be deterministic, making it suitable for use as a key into a Go map. It is not guaranteed to be stable as the exact output could change in a future version of this module. Example output: .message_type[6].nested_type[15].field[3] T : fmt.Stringer func SourceLocations.ByPath(path SourcePath) SourceLocation func SourcePath.Equal(p2 SourcePath) bool func google.golang.org/protobuf/internal/filedesc.(*SourceLocations).ByPath(path SourcePath) SourceLocation
Syntax is the language version of the proto file. GoString returns s as a Go source identifier (e.g., "Proto2"). IsValid reports whether the syntax is valid. String returns s as a proto source identifier (e.g., "proto2"). T : fmt.GoStringer T : fmt.Stringer func Descriptor.Syntax() Syntax func EnumDescriptor.Syntax() Syntax func EnumValueDescriptor.Syntax() Syntax func ExtensionDescriptor.Syntax() Syntax func ExtensionTypeDescriptor.Syntax() Syntax func FieldDescriptor.Syntax() Syntax func FileDescriptor.Syntax() Syntax func MessageDescriptor.Syntax() Syntax func MethodDescriptor.Syntax() Syntax func OneofDescriptor.Syntax() Syntax func ServiceDescriptor.Syntax() Syntax func google.golang.org/protobuf/internal/filedesc.(*Base).Syntax() Syntax func google.golang.org/protobuf/internal/filedesc.(*File).Syntax() Syntax func google.golang.org/protobuf/internal/filedesc.PlaceholderEnum.Syntax() Syntax func google.golang.org/protobuf/internal/filedesc.PlaceholderEnumValue.Syntax() Syntax func google.golang.org/protobuf/internal/filedesc.PlaceholderFile.Syntax() Syntax func google.golang.org/protobuf/internal/filedesc.PlaceholderMessage.Syntax() Syntax const Proto2 const Proto3
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: ╔════════════╤═════════════════════════════════════╗ ║ Go type │ Protobuf kind ║ ╠════════════╪═════════════════════════════════════╣ ║ bool │ BoolKind ║ ║ int32 │ Int32Kind, Sint32Kind, Sfixed32Kind ║ ║ int64 │ Int64Kind, Sint64Kind, Sfixed64Kind ║ ║ uint32 │ Uint32Kind, Fixed32Kind ║ ║ uint64 │ Uint64Kind, Fixed64Kind ║ ║ float32 │ FloatKind ║ ║ float64 │ DoubleKind ║ ║ string │ StringKind ║ ║ []byte │ BytesKind ║ ║ EnumNumber │ EnumKind ║ ║ Message │ MessageKind, GroupKind ║ ╚════════════╧═════════════════════════════════════╝ 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, 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. Converting to/from a Value and a concrete Go value panics on type mismatch. For example, ValueOf("hello").Int() panics because this attempts to retrieve an int64 from a string. // 0B Bool returns v as a bool and panics if the type is not a bool. Bytes returns v as a []byte and panics if the type is not a []byte. Enum returns v as a EnumNumber and panics if the type is not a EnumNumber. Float returns v as a float64 and panics if the type is not a float32 or float64. Int returns v as a int64 and panics if the type is not a int32 or int64. Interface returns v as an interface{}. Invariant: v == ValueOf(v).Interface() IsValid reports whether v is populated with a value. List returns v as a List and panics if the type is not a List. Map returns v as a Map and panics if the type is not a Map. MapKey returns v as a MapKey and panics for invalid MapKey types. Message returns v as a Message and panics if the type is not a Message. String returns v as a string. Since this method implements fmt.Stringer, this returns the formatted string value for any non-string type. Uint returns v as a uint64 and panics if the type is not a uint32 or uint64. T : fmt.Stringer func ValueOf(v interface{}) Value func ValueOfBool(v bool) Value func ValueOfBytes(v []byte) Value func ValueOfEnum(v EnumNumber) Value func ValueOfFloat32(v float32) Value func ValueOfFloat64(v float64) Value func ValueOfInt32(v int32) Value func ValueOfInt64(v int64) Value func ValueOfList(v List) Value func ValueOfMap(v Map) Value func ValueOfMessage(v Message) Value func ValueOfString(v string) Value func ValueOfUint32(v uint32) Value func ValueOfUint64(v uint64) Value func ExtensionDescriptor.Default() Value func ExtensionType.New() Value func ExtensionType.ValueOf(interface{}) Value func ExtensionType.Zero() Value func ExtensionTypeDescriptor.Default() Value func FieldDescriptor.Default() Value func List.AppendMutable() Value func List.Get(int) Value func List.NewElement() Value func Map.Get(MapKey) Value func Map.Mutable(MapKey) Value func Map.NewValue() Value func MapKey.Value() Value func Message.Get(FieldDescriptor) Value func Message.Mutable(FieldDescriptor) Value func Message.NewField(FieldDescriptor) Value func google.golang.org/protobuf/internal/encoding/defval.Unmarshal(s string, k Kind, evs EnumValueDescriptors, f defval.Format) (Value, EnumValueDescriptor, error) func google.golang.org/protobuf/internal/filedesc.(*Extension).Default() Value func google.golang.org/protobuf/internal/filedesc.(*Field).Default() Value func google.golang.org/protobuf/internal/impl.Converter.New() Value func google.golang.org/protobuf/internal/impl.Converter.PBValueOf(reflect.Value) Value func google.golang.org/protobuf/internal/impl.Converter.Zero() Value func google.golang.org/protobuf/internal/impl.(*ExtensionField).Value() Value func google.golang.org/protobuf/internal/impl.(*ExtensionInfo).New() Value func google.golang.org/protobuf/internal/impl.(*ExtensionInfo).ValueOf(v interface{}) Value func google.golang.org/protobuf/internal/impl.(*ExtensionInfo).Zero() Value func ExtensionType.InterfaceOf(Value) interface{} func ExtensionType.IsValidValue(Value) bool func List.Append(Value) func List.Set(int, Value) func Map.Set(MapKey, Value) func Message.Set(FieldDescriptor, Value) func google.golang.org/protobuf/internal/encoding/defval.Marshal(v Value, ev EnumValueDescriptor, k Kind, f defval.Format) (string, error) func google.golang.org/protobuf/internal/filedesc.DefaultValue(v Value, ev EnumValueDescriptor) filedesc.defaultValue func google.golang.org/protobuf/internal/impl.Converter.GoValueOf(Value) reflect.Value func google.golang.org/protobuf/internal/impl.Converter.IsValidPB(Value) bool func google.golang.org/protobuf/internal/impl.(*ExtensionField).Set(t ExtensionType, v Value) func google.golang.org/protobuf/internal/impl.(*ExtensionInfo).InterfaceOf(v Value) interface{} func google.golang.org/protobuf/internal/impl.(*ExtensionInfo).IsValidValue(v Value) bool
Package-Level Functions (total 21, in which 14 are exported)
ValueOf returns a Value initialized with the concrete value stored in v. This panics if the type does not match one of the allowed types in the Value union.
ValueOfBool returns a new boolean value.
ValueOfBytes returns a new bytes value.
ValueOfEnum returns a new enum value.
ValueOfFloat32 returns a new float32 value.
ValueOfFloat64 returns a new float64 value.
ValueOfInt32 returns a new int32 value.
ValueOfInt64 returns a new int64 value.
ValueOfList returns a new List value.
ValueOfMap returns a new Map value.
ValueOfMessage returns a new Message value.
ValueOfString returns a new string value.
ValueOfUint32 returns a new uint32 value.
ValueOfUint64 returns a new uint64 value.
Package-Level Variables (total 11, none are exported)
Package-Level Constants (total 23, all are exported)
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Cardinality enumeration.
const Proto2 Syntax = 2
const Proto3 Syntax = 3
Constants as defined by the google.protobuf.Cardinality enumeration.
Constants as defined by the google.protobuf.Cardinality enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.
Constants as defined by the google.protobuf.Field.Kind enumeration.