Surrogate files are can be used to create standalone descriptors where the syntax is only information derived from the parent file.
var (
SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}}
SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}}
)
func DefaultValue(v protoreflect.Value, ev protoreflect.EnumValueDescriptor) defaultValue
type Base struct {
L0 BaseL0
}
func (d *Base) FullName() protoreflect.FullName
func (d *Base) Index() int
func (d *Base) IsPlaceholder() bool
func (d *Base) Name() protoreflect.Name
func (d *Base) Parent() protoreflect.Descriptor
func (d *Base) ParentFile() protoreflect.FileDescriptor
func (d *Base) ProtoInternal(pragma.DoNotImplement)
func (d *Base) Syntax() protoreflect.Syntax
type BaseL0 struct {
FullName protoreflect.FullName // must be populated
ParentFile *File // must be populated
Parent protoreflect.Descriptor
Index int
}
Builder construct a protoreflect.FileDescriptor from the raw descriptor.
type Builder struct {
// GoPackagePath is the Go package path that is invoking this builder.
GoPackagePath string
// RawDescriptor is the wire-encoded bytes of FileDescriptorProto
// and must be populated.
RawDescriptor []byte
// NumEnums is the total number of enums declared in the file.
NumEnums int32
// NumMessages is the total number of messages declared in the file.
// It includes the implicit message declarations for map entries.
NumMessages int32
// NumExtensions is the total number of extensions declared in the file.
NumExtensions int32
// NumServices is the total number of services declared in the file.
NumServices int32
// TypeResolver resolves extension field types for descriptor options.
// If nil, it uses protoregistry.GlobalTypes.
TypeResolver interface {
protoregistry.ExtensionTypeResolver
}
// FileRegistry is use to lookup file, enum, and message dependencies.
// Once constructed, the file descriptor is registered here.
// If nil, it uses protoregistry.GlobalFiles.
FileRegistry interface {
FindFileByPath(string) (protoreflect.FileDescriptor, error)
FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)
RegisterFile(protoreflect.FileDescriptor) error
}
}
func (db Builder) Build() (out Out)
Build constructs a FileDescriptor given the parameters set in Builder. It assumes that the inputs are well-formed and panics if any inconsistencies are encountered.
If NumEnums+NumMessages+NumExtensions+NumServices is zero, then Build automatically derives them from the raw descriptor.
Edition is an Enum for proto2.Edition
type Edition int32
These values align with the value of Enum in descriptor.proto which allows direct conversion between the proto enum and this enum.
const (
EditionUnknown Edition = 0
EditionProto2 Edition = 998
EditionProto3 Edition = 999
Edition2023 Edition = 1000
EditionUnsupported Edition = 100000
)
type Enum struct {
Base
L1 EnumL1
L2 *EnumL2 // protected by fileDesc.once
}
func (ed *Enum) Format(s fmt.State, r rune)
func (ed *Enum) Options() protoreflect.ProtoMessage
func (ed *Enum) ProtoType(protoreflect.EnumDescriptor)
func (ed *Enum) ReservedNames() protoreflect.Names
func (ed *Enum) ReservedRanges() protoreflect.EnumRanges
func (ed *Enum) Values() protoreflect.EnumValueDescriptors
type EnumL1 struct {
// contains filtered or unexported fields
}
type EnumL2 struct {
Options func() protoreflect.ProtoMessage
Values EnumValues
ReservedNames Names
ReservedRanges EnumRanges
}
type EnumRanges struct {
List [][2]protoreflect.EnumNumber // start inclusive; end inclusive
// contains filtered or unexported fields
}
func (p *EnumRanges) CheckValid() error
CheckValid reports any errors with the set of names with an error message that completes the sentence: "ranges is invalid because it has ..."
func (p *EnumRanges) Format(s fmt.State, r rune)
func (p *EnumRanges) Get(i int) [2]protoreflect.EnumNumber
func (p *EnumRanges) Has(n protoreflect.EnumNumber) bool
func (p *EnumRanges) Len() int
func (p *EnumRanges) ProtoInternal(pragma.DoNotImplement)
type EnumValue struct {
Base
L1 EnumValueL1
}
func (ed *EnumValue) Format(s fmt.State, r rune)
func (ed *EnumValue) Number() protoreflect.EnumNumber
func (ed *EnumValue) Options() protoreflect.ProtoMessage
func (ed *EnumValue) ProtoType(protoreflect.EnumValueDescriptor)
type EnumValueL1 struct {
Options func() protoreflect.ProtoMessage
Number protoreflect.EnumNumber
}
type EnumValues struct {
List []EnumValue
// contains filtered or unexported fields
}
func (p *EnumValues) ByName(s protoreflect.Name) protoreflect.EnumValueDescriptor
func (p *EnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor
func (p *EnumValues) Format(s fmt.State, r rune)
func (p *EnumValues) Get(i int) protoreflect.EnumValueDescriptor
func (p *EnumValues) Len() int
func (p *EnumValues) ProtoInternal(pragma.DoNotImplement)
type Enums struct {
List []Enum
// contains filtered or unexported fields
}
func (p *Enums) ByName(s protoreflect.Name) protoreflect.EnumDescriptor
func (p *Enums) Format(s fmt.State, r rune)
func (p *Enums) Get(i int) protoreflect.EnumDescriptor
func (p *Enums) Len() int
func (p *Enums) ProtoInternal(pragma.DoNotImplement)
type Extension struct {
Base
L1 ExtensionL1
L2 *ExtensionL2 // protected by fileDesc.once
}
func (xd *Extension) Cardinality() protoreflect.Cardinality
func (xd *Extension) ContainingMessage() protoreflect.MessageDescriptor
func (xd *Extension) ContainingOneof() protoreflect.OneofDescriptor
func (xd *Extension) Default() protoreflect.Value
func (xd *Extension) DefaultEnumValue() protoreflect.EnumValueDescriptor
func (xd *Extension) Enum() protoreflect.EnumDescriptor
func (xd *Extension) Format(s fmt.State, r rune)
func (xd *Extension) HasDefault() bool
func (xd *Extension) HasJSONName() bool
func (xd *Extension) HasOptionalKeyword() bool
func (xd *Extension) HasPresence() bool
func (xd *Extension) IsExtension() bool
func (xd *Extension) IsList() bool
func (xd *Extension) IsMap() bool
func (xd *Extension) IsPacked() bool
func (xd *Extension) IsWeak() bool
func (xd *Extension) JSONName() string
func (xd *Extension) Kind() protoreflect.Kind
func (xd *Extension) MapKey() protoreflect.FieldDescriptor
func (xd *Extension) MapValue() protoreflect.FieldDescriptor
func (xd *Extension) Message() protoreflect.MessageDescriptor
func (xd *Extension) Number() protoreflect.FieldNumber
func (xd *Extension) Options() protoreflect.ProtoMessage
func (xd *Extension) ProtoInternal(pragma.DoNotImplement)
func (xd *Extension) ProtoType(protoreflect.FieldDescriptor)
func (xd *Extension) TextName() string
type ExtensionL1 struct {
Number protoreflect.FieldNumber
Extendee protoreflect.MessageDescriptor
Cardinality protoreflect.Cardinality
Kind protoreflect.Kind
}
type ExtensionL2 struct {
Options func() protoreflect.ProtoMessage
StringName stringName
IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
IsPacked bool // promoted from google.protobuf.FieldOptions
Default defaultValue
Enum protoreflect.EnumDescriptor
Message protoreflect.MessageDescriptor
}
type Extensions struct {
List []Extension
// contains filtered or unexported fields
}
func (p *Extensions) ByName(s protoreflect.Name) protoreflect.ExtensionDescriptor
func (p *Extensions) Format(s fmt.State, r rune)
func (p *Extensions) Get(i int) protoreflect.ExtensionDescriptor
func (p *Extensions) Len() int
func (p *Extensions) ProtoInternal(pragma.DoNotImplement)
type Field struct {
Base
L1 FieldL1
}
func (fd *Field) Cardinality() protoreflect.Cardinality
func (fd *Field) ContainingMessage() protoreflect.MessageDescriptor
func (fd *Field) ContainingOneof() protoreflect.OneofDescriptor
func (fd *Field) Default() protoreflect.Value
func (fd *Field) DefaultEnumValue() protoreflect.EnumValueDescriptor
func (fd *Field) EnforceUTF8() bool
EnforceUTF8 is a pseudo-internal API to determine whether to enforce UTF-8 validation for the string field. This exists for Google-internal use only since proto3 did not enforce UTF-8 validity prior to the open-source release. If this method does not exist, the default is to enforce valid UTF-8.
WARNING: This method is exempt from the compatibility promise and may be removed in the future without warning.
func (fd *Field) Enum() protoreflect.EnumDescriptor
func (fd *Field) Format(s fmt.State, r rune)
func (fd *Field) HasDefault() bool
func (fd *Field) HasJSONName() bool
func (fd *Field) HasOptionalKeyword() bool
func (fd *Field) HasPresence() bool
func (fd *Field) IsExtension() bool
func (fd *Field) IsList() bool
func (fd *Field) IsMap() bool
func (fd *Field) IsPacked() bool
func (fd *Field) IsWeak() bool
func (fd *Field) JSONName() string
func (fd *Field) Kind() protoreflect.Kind
func (fd *Field) MapKey() protoreflect.FieldDescriptor
func (fd *Field) MapValue() protoreflect.FieldDescriptor
func (fd *Field) Message() protoreflect.MessageDescriptor
func (fd *Field) Number() protoreflect.FieldNumber
func (fd *Field) Options() protoreflect.ProtoMessage
func (fd *Field) ProtoType(protoreflect.FieldDescriptor)
func (fd *Field) TextName() string
type FieldL1 struct {
Options func() protoreflect.ProtoMessage
Number protoreflect.FieldNumber
Cardinality protoreflect.Cardinality // must be consistent with Message.RequiredNumbers
Kind protoreflect.Kind
StringName stringName
IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
IsWeak bool // promoted from google.protobuf.FieldOptions
HasPacked bool // promoted from google.protobuf.FieldOptions
IsPacked bool // promoted from google.protobuf.FieldOptions
HasEnforceUTF8 bool // promoted from google.protobuf.FieldOptions
EnforceUTF8 bool // promoted from google.protobuf.FieldOptions
Default defaultValue
ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields
Enum protoreflect.EnumDescriptor
Message protoreflect.MessageDescriptor
// Edition features.
Presence bool
}
type FieldNumbers struct {
List []protoreflect.FieldNumber
// contains filtered or unexported fields
}
func (p *FieldNumbers) Format(s fmt.State, r rune)
func (p *FieldNumbers) Get(i int) protoreflect.FieldNumber
func (p *FieldNumbers) Has(n protoreflect.FieldNumber) bool
func (p *FieldNumbers) Len() int
func (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement)
type FieldRanges struct {
List [][2]protoreflect.FieldNumber // start inclusive; end exclusive
// contains filtered or unexported fields
}
func (p *FieldRanges) CheckOverlap(q *FieldRanges) error
CheckOverlap reports an error if p and q overlap.
func (p *FieldRanges) CheckValid(isMessageSet bool) error
CheckValid reports any errors with the set of ranges with an error message that completes the sentence: "ranges is invalid because it has ..."
func (p *FieldRanges) Format(s fmt.State, r rune)
func (p *FieldRanges) Get(i int) [2]protoreflect.FieldNumber
func (p *FieldRanges) Has(n protoreflect.FieldNumber) bool
func (p *FieldRanges) Len() int
func (p *FieldRanges) ProtoInternal(pragma.DoNotImplement)
type Fields struct {
List []Field
// contains filtered or unexported fields
}
func (p *Fields) ByJSONName(s string) protoreflect.FieldDescriptor
func (p *Fields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor
func (p *Fields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor
func (p *Fields) ByTextName(s string) protoreflect.FieldDescriptor
func (p *Fields) Format(s fmt.State, r rune)
func (p *Fields) Get(i int) protoreflect.FieldDescriptor
func (p *Fields) Len() int
func (p *Fields) ProtoInternal(pragma.DoNotImplement)
type File struct {
L1 FileL1
L2 *FileL2
// contains filtered or unexported fields
}
func (fd *File) Enums() protoreflect.EnumDescriptors
func (fd *File) Extensions() protoreflect.ExtensionDescriptors
func (fd *File) Format(s fmt.State, r rune)
func (fd *File) FullName() protoreflect.FullName
func (fd *File) GoPackagePath() string
GoPackagePath is a pseudo-internal API for determining the Go package path that this file descriptor is declared in.
WARNING: This method is exempt from the compatibility promise and may be removed in the future without warning.
func (fd *File) Imports() protoreflect.FileImports
func (fd *File) Index() int
func (fd *File) IsPlaceholder() bool
func (fd *File) Messages() protoreflect.MessageDescriptors
func (fd *File) Name() protoreflect.Name
func (fd *File) Options() protoreflect.ProtoMessage
func (fd *File) Package() protoreflect.FullName
func (fd *File) Parent() protoreflect.Descriptor
func (fd *File) ParentFile() protoreflect.FileDescriptor
func (fd *File) Path() string
func (fd *File) ProtoInternal(pragma.DoNotImplement)
func (fd *File) ProtoType(protoreflect.FileDescriptor)
func (fd *File) Services() protoreflect.ServiceDescriptors
func (fd *File) SourceLocations() protoreflect.SourceLocations
func (fd *File) Syntax() protoreflect.Syntax
type FileEditionFeatures struct {
// IsFieldPresence is true if field_presence is EXPLICIT
// https://protobuf.dev/editions/features/#field_presence
IsFieldPresence bool
// IsOpenEnum is true if enum_type is OPEN
// https://protobuf.dev/editions/features/#enum_type
IsOpenEnum bool
// IsPacked is true if repeated_field_encoding is PACKED
// https://protobuf.dev/editions/features/#repeated_field_encoding
IsPacked bool
// IsUTF8Validated is true if utf_validation is VERIFY
// https://protobuf.dev/editions/features/#utf8_validation
IsUTF8Validated bool
// IsDelimitedEncoded is true if message_encoding is DELIMITED
// https://protobuf.dev/editions/features/#message_encoding
IsDelimitedEncoded bool
// IsJSONCompliant is true if json_format is ALLOW
// https://protobuf.dev/editions/features/#json_format
IsJSONCompliant bool
}
type FileImports []protoreflect.FileImport
func (p *FileImports) Format(s fmt.State, r rune)
func (p *FileImports) Get(i int) protoreflect.FileImport
func (p *FileImports) Len() int
func (p *FileImports) ProtoInternal(pragma.DoNotImplement)
type FileL1 struct {
Syntax protoreflect.Syntax
Edition Edition // Only used if Syntax == Editions
Path string
Package protoreflect.FullName
Enums Enums
Messages Messages
Extensions Extensions
Services Services
EditionFeatures FileEditionFeatures
}
type FileL2 struct {
Options func() protoreflect.ProtoMessage
Imports FileImports
Locations SourceLocations
}
type Message struct {
Base
L1 MessageL1
L2 *MessageL2 // protected by fileDesc.once
}
func (md *Message) Enums() protoreflect.EnumDescriptors
func (md *Message) ExtensionRangeOptions(i int) protoreflect.ProtoMessage
func (md *Message) ExtensionRanges() protoreflect.FieldRanges
func (md *Message) Extensions() protoreflect.ExtensionDescriptors
func (md *Message) Fields() protoreflect.FieldDescriptors
func (md *Message) Format(s fmt.State, r rune)
func (md *Message) IsMapEntry() bool
func (md *Message) IsMessageSet() bool
IsMessageSet is a pseudo-internal API for checking whether a message should serialize in the proto1 message format.
WARNING: This method is exempt from the compatibility promise and may be removed in the future without warning.
func (md *Message) Messages() protoreflect.MessageDescriptors
func (md *Message) Oneofs() protoreflect.OneofDescriptors
func (md *Message) Options() protoreflect.ProtoMessage
func (md *Message) ProtoType(protoreflect.MessageDescriptor)
func (md *Message) RequiredNumbers() protoreflect.FieldNumbers
func (md *Message) ReservedNames() protoreflect.Names
func (md *Message) ReservedRanges() protoreflect.FieldRanges
type MessageL1 struct {
Enums Enums
Messages Messages
Extensions Extensions
IsMapEntry bool // promoted from google.protobuf.MessageOptions
IsMessageSet bool // promoted from google.protobuf.MessageOptions
}
type MessageL2 struct {
Options func() protoreflect.ProtoMessage
Fields Fields
Oneofs Oneofs
ReservedNames Names
ReservedRanges FieldRanges
RequiredNumbers FieldNumbers // must be consistent with Fields.Cardinality
ExtensionRanges FieldRanges
ExtensionRangeOptions []func() protoreflect.ProtoMessage // must be same length as ExtensionRanges
}
type Messages struct {
List []Message
// contains filtered or unexported fields
}
func (p *Messages) ByName(s protoreflect.Name) protoreflect.MessageDescriptor
func (p *Messages) Format(s fmt.State, r rune)
func (p *Messages) Get(i int) protoreflect.MessageDescriptor
func (p *Messages) Len() int
func (p *Messages) ProtoInternal(pragma.DoNotImplement)
type Method struct {
Base
L1 MethodL1
}
func (md *Method) Format(s fmt.State, r rune)
func (md *Method) Input() protoreflect.MessageDescriptor
func (md *Method) IsStreamingClient() bool
func (md *Method) IsStreamingServer() bool
func (md *Method) Options() protoreflect.ProtoMessage
func (md *Method) Output() protoreflect.MessageDescriptor
func (md *Method) ProtoInternal(pragma.DoNotImplement)
func (md *Method) ProtoType(protoreflect.MethodDescriptor)
type MethodL1 struct {
Options func() protoreflect.ProtoMessage
Input protoreflect.MessageDescriptor
Output protoreflect.MessageDescriptor
IsStreamingClient bool
IsStreamingServer bool
}
type Methods struct {
List []Method
// contains filtered or unexported fields
}
func (p *Methods) ByName(s protoreflect.Name) protoreflect.MethodDescriptor
func (p *Methods) Format(s fmt.State, r rune)
func (p *Methods) Get(i int) protoreflect.MethodDescriptor
func (p *Methods) Len() int
func (p *Methods) ProtoInternal(pragma.DoNotImplement)
type Names struct {
List []protoreflect.Name
// contains filtered or unexported fields
}
func (p *Names) CheckValid() error
CheckValid reports any errors with the set of names with an error message that completes the sentence: "ranges is invalid because it has ..."
func (p *Names) Format(s fmt.State, r rune)
func (p *Names) Get(i int) protoreflect.Name
func (p *Names) Has(s protoreflect.Name) bool
func (p *Names) Len() int
func (p *Names) ProtoInternal(pragma.DoNotImplement)
type Oneof struct {
Base
L1 OneofL1
}
func (od *Oneof) Fields() protoreflect.FieldDescriptors
func (od *Oneof) Format(s fmt.State, r rune)
func (od *Oneof) IsSynthetic() bool
func (od *Oneof) Options() protoreflect.ProtoMessage
func (od *Oneof) ProtoType(protoreflect.OneofDescriptor)
type OneofFields struct {
List []protoreflect.FieldDescriptor
// contains filtered or unexported fields
}
func (p *OneofFields) ByJSONName(s string) protoreflect.FieldDescriptor
func (p *OneofFields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor
func (p *OneofFields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor
func (p *OneofFields) ByTextName(s string) protoreflect.FieldDescriptor
func (p *OneofFields) Format(s fmt.State, r rune)
func (p *OneofFields) Get(i int) protoreflect.FieldDescriptor
func (p *OneofFields) Len() int
func (p *OneofFields) ProtoInternal(pragma.DoNotImplement)
type OneofL1 struct {
Options func() protoreflect.ProtoMessage
Fields OneofFields // must be consistent with Message.Fields.ContainingOneof
}
type Oneofs struct {
List []Oneof
// contains filtered or unexported fields
}
func (p *Oneofs) ByName(s protoreflect.Name) protoreflect.OneofDescriptor
func (p *Oneofs) Format(s fmt.State, r rune)
func (p *Oneofs) Get(i int) protoreflect.OneofDescriptor
func (p *Oneofs) Len() int
func (p *Oneofs) ProtoInternal(pragma.DoNotImplement)
Out is the output of the Builder.
type Out struct {
File protoreflect.FileDescriptor
// Enums is all enum descriptors in "flattened ordering".
Enums []Enum
// Messages is all message descriptors in "flattened ordering".
// It includes the implicit message declarations for map entries.
Messages []Message
// Extensions is all extension descriptors in "flattened ordering".
Extensions []Extension
// Service is all service descriptors in "flattened ordering".
Services []Service
}
PlaceholderEnum is a placeholder, representing only the full name.
type PlaceholderEnum protoreflect.FullName
func (e PlaceholderEnum) FullName() protoreflect.FullName
func (e PlaceholderEnum) Index() int
func (e PlaceholderEnum) IsPlaceholder() bool
func (e PlaceholderEnum) Name() protoreflect.Name
func (e PlaceholderEnum) Options() protoreflect.ProtoMessage
func (e PlaceholderEnum) Parent() protoreflect.Descriptor
func (e PlaceholderEnum) ParentFile() protoreflect.FileDescriptor
func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement)
func (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor)
func (e PlaceholderEnum) ReservedNames() protoreflect.Names
func (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges
func (e PlaceholderEnum) Syntax() protoreflect.Syntax
func (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors
PlaceholderEnumValue is a placeholder, representing only the full name.
type PlaceholderEnumValue protoreflect.FullName
func (e PlaceholderEnumValue) FullName() protoreflect.FullName
func (e PlaceholderEnumValue) Index() int
func (e PlaceholderEnumValue) IsPlaceholder() bool
func (e PlaceholderEnumValue) Name() protoreflect.Name
func (e PlaceholderEnumValue) Number() protoreflect.EnumNumber
func (e PlaceholderEnumValue) Options() protoreflect.ProtoMessage
func (e PlaceholderEnumValue) Parent() protoreflect.Descriptor
func (e PlaceholderEnumValue) ParentFile() protoreflect.FileDescriptor
func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement)
func (e PlaceholderEnumValue) ProtoType(protoreflect.EnumValueDescriptor)
func (e PlaceholderEnumValue) Syntax() protoreflect.Syntax
PlaceholderFile is a placeholder, representing only the file path.
type PlaceholderFile string
func (f PlaceholderFile) Enums() protoreflect.EnumDescriptors
func (f PlaceholderFile) Extensions() protoreflect.ExtensionDescriptors
func (f PlaceholderFile) FullName() protoreflect.FullName
func (f PlaceholderFile) Imports() protoreflect.FileImports
func (f PlaceholderFile) Index() int
func (f PlaceholderFile) IsPlaceholder() bool
func (f PlaceholderFile) Messages() protoreflect.MessageDescriptors
func (f PlaceholderFile) Name() protoreflect.Name
func (f PlaceholderFile) Options() protoreflect.ProtoMessage
func (f PlaceholderFile) Package() protoreflect.FullName
func (f PlaceholderFile) Parent() protoreflect.Descriptor
func (f PlaceholderFile) ParentFile() protoreflect.FileDescriptor
func (f PlaceholderFile) Path() string
func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement)
func (f PlaceholderFile) ProtoType(protoreflect.FileDescriptor)
func (f PlaceholderFile) Services() protoreflect.ServiceDescriptors
func (f PlaceholderFile) SourceLocations() protoreflect.SourceLocations
func (f PlaceholderFile) Syntax() protoreflect.Syntax
PlaceholderMessage is a placeholder, representing only the full name.
type PlaceholderMessage protoreflect.FullName
func (m PlaceholderMessage) Enums() protoreflect.EnumDescriptors
func (m PlaceholderMessage) ExtensionRangeOptions(int) protoreflect.ProtoMessage
func (m PlaceholderMessage) ExtensionRanges() protoreflect.FieldRanges
func (m PlaceholderMessage) Extensions() protoreflect.ExtensionDescriptors
func (m PlaceholderMessage) Fields() protoreflect.FieldDescriptors
func (m PlaceholderMessage) FullName() protoreflect.FullName
func (m PlaceholderMessage) Index() int
func (m PlaceholderMessage) IsMapEntry() bool
func (m PlaceholderMessage) IsPlaceholder() bool
func (m PlaceholderMessage) Messages() protoreflect.MessageDescriptors
func (m PlaceholderMessage) Name() protoreflect.Name
func (m PlaceholderMessage) Oneofs() protoreflect.OneofDescriptors
func (m PlaceholderMessage) Options() protoreflect.ProtoMessage
func (m PlaceholderMessage) Parent() protoreflect.Descriptor
func (m PlaceholderMessage) ParentFile() protoreflect.FileDescriptor
func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement)
func (m PlaceholderMessage) ProtoType(protoreflect.MessageDescriptor)
func (m PlaceholderMessage) RequiredNumbers() protoreflect.FieldNumbers
func (m PlaceholderMessage) ReservedNames() protoreflect.Names
func (m PlaceholderMessage) ReservedRanges() protoreflect.FieldRanges
func (m PlaceholderMessage) Syntax() protoreflect.Syntax
type Service struct {
Base
L1 ServiceL1
L2 *ServiceL2 // protected by fileDesc.once
}
func (sd *Service) Format(s fmt.State, r rune)
func (sd *Service) Methods() protoreflect.MethodDescriptors
func (sd *Service) Options() protoreflect.ProtoMessage
func (sd *Service) ProtoInternal(pragma.DoNotImplement)
func (sd *Service) ProtoType(protoreflect.ServiceDescriptor)
type ServiceL1 struct{}
type ServiceL2 struct {
Options func() protoreflect.ProtoMessage
Methods Methods
}
type Services struct {
List []Service
// contains filtered or unexported fields
}
func (p *Services) ByName(s protoreflect.Name) protoreflect.ServiceDescriptor
func (p *Services) Format(s fmt.State, r rune)
func (p *Services) Get(i int) protoreflect.ServiceDescriptor
func (p *Services) Len() int
func (p *Services) ProtoInternal(pragma.DoNotImplement)
type SourceLocations struct {
// List is a list of SourceLocations.
// The SourceLocation.Next field does not need to be populated
// as it will be lazily populated upon first need.
List []protoreflect.SourceLocation
// File is the parent file descriptor that these locations are relative to.
// If non-nil, ByDescriptor verifies that the provided descriptor
// is a child of this file descriptor.
File protoreflect.FileDescriptor
// contains filtered or unexported fields
}
func (p *SourceLocations) ByDescriptor(desc protoreflect.Descriptor) protoreflect.SourceLocation
func (p *SourceLocations) ByPath(path protoreflect.SourcePath) protoreflect.SourceLocation
func (p *SourceLocations) Get(i int) protoreflect.SourceLocation
func (p *SourceLocations) Len() int
func (p *SourceLocations) ProtoInternal(pragma.DoNotImplement)