protobuf: google.golang.org/protobuf/internal/filedesc Index | Files

package filedesc

import "google.golang.org/protobuf/internal/filedesc"

Package filedesc provides functionality for constructing descriptors.

The types in this package implement interfaces in the protoreflect package related to protobuf descripriptors.

Index

Package Files

build.go desc.go desc_init.go desc_lazy.go desc_list.go desc_list_gen.go placeholder.go

Variables

var (
    SurrogateProto2 = &File{L1: FileL1{Syntax: pref.Proto2}, L2: &FileL2{}}
    SurrogateProto3 = &File{L1: FileL1{Syntax: pref.Proto3}, L2: &FileL2{}}
)

Surrogate files are can be used to create standalone descriptors where the syntax is only information derived from the parent file.

func DefaultValue Uses

func DefaultValue(v pref.Value, ev pref.EnumValueDescriptor) defaultValue

type Base Uses

type Base struct {
    L0 BaseL0
}

func (*Base) FullName Uses

func (d *Base) FullName() pref.FullName

func (*Base) Index Uses

func (d *Base) Index() int

func (*Base) IsPlaceholder Uses

func (d *Base) IsPlaceholder() bool

func (*Base) Name Uses

func (d *Base) Name() pref.Name

func (*Base) Parent Uses

func (d *Base) Parent() pref.Descriptor

func (*Base) ParentFile Uses

func (d *Base) ParentFile() pref.FileDescriptor

func (*Base) ProtoInternal Uses

func (d *Base) ProtoInternal(pragma.DoNotImplement)

func (*Base) Syntax Uses

func (d *Base) Syntax() pref.Syntax

type BaseL0 Uses

type BaseL0 struct {
    FullName   pref.FullName // must be populated
    ParentFile *File         // must be populated
    Parent     pref.Descriptor
    Index      int
}

type Builder Uses

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 {
        preg.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(pref.FullName) (pref.Descriptor, error)
        RegisterFile(pref.FileDescriptor) error
    }
}

Builder construct a protoreflect.FileDescriptor from the raw descriptor.

func (Builder) Build Uses

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.

type Enum Uses

type Enum struct {
    Base
    L1  EnumL1
    L2  *EnumL2 // protected by fileDesc.once
}

func (*Enum) Format Uses

func (ed *Enum) Format(s fmt.State, r rune)

func (*Enum) Options Uses

func (ed *Enum) Options() pref.ProtoMessage

func (*Enum) ProtoType Uses

func (ed *Enum) ProtoType(pref.EnumDescriptor)

func (*Enum) ReservedNames Uses

func (ed *Enum) ReservedNames() pref.Names

func (*Enum) ReservedRanges Uses

func (ed *Enum) ReservedRanges() pref.EnumRanges

func (*Enum) Values Uses

func (ed *Enum) Values() pref.EnumValueDescriptors

type EnumL1 Uses

type EnumL1 struct {
    // contains filtered or unexported fields
}

type EnumL2 Uses

type EnumL2 struct {
    Options        func() pref.ProtoMessage
    Values         EnumValues
    ReservedNames  Names
    ReservedRanges EnumRanges
}

type EnumRanges Uses

type EnumRanges struct {
    List [][2]pref.EnumNumber // start inclusive; end inclusive
    // contains filtered or unexported fields
}

func (*EnumRanges) CheckValid Uses

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 (*EnumRanges) Format Uses

func (p *EnumRanges) Format(s fmt.State, r rune)

func (*EnumRanges) Get Uses

func (p *EnumRanges) Get(i int) [2]pref.EnumNumber

func (*EnumRanges) Has Uses

func (p *EnumRanges) Has(n pref.EnumNumber) bool

func (*EnumRanges) Len Uses

func (p *EnumRanges) Len() int

func (*EnumRanges) ProtoInternal Uses

func (p *EnumRanges) ProtoInternal(pragma.DoNotImplement)

type EnumValue Uses

type EnumValue struct {
    Base
    L1  EnumValueL1
}

func (*EnumValue) Format Uses

func (ed *EnumValue) Format(s fmt.State, r rune)

func (*EnumValue) Number Uses

func (ed *EnumValue) Number() pref.EnumNumber

func (*EnumValue) Options Uses

func (ed *EnumValue) Options() pref.ProtoMessage

func (*EnumValue) ProtoType Uses

func (ed *EnumValue) ProtoType(pref.EnumValueDescriptor)

type EnumValueL1 Uses

type EnumValueL1 struct {
    Options func() pref.ProtoMessage
    Number  pref.EnumNumber
}

type EnumValues Uses

type EnumValues struct {
    List []EnumValue
    // contains filtered or unexported fields
}

func (*EnumValues) ByName Uses

func (p *EnumValues) ByName(s protoreflect.Name) protoreflect.EnumValueDescriptor

func (*EnumValues) ByNumber Uses

func (p *EnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor

func (*EnumValues) Format Uses

func (p *EnumValues) Format(s fmt.State, r rune)

func (*EnumValues) Get Uses

func (p *EnumValues) Get(i int) protoreflect.EnumValueDescriptor

func (*EnumValues) Len Uses

func (p *EnumValues) Len() int

func (*EnumValues) ProtoInternal Uses

func (p *EnumValues) ProtoInternal(pragma.DoNotImplement)

type Enums Uses

type Enums struct {
    List []Enum
    // contains filtered or unexported fields
}

func (*Enums) ByName Uses

func (p *Enums) ByName(s protoreflect.Name) protoreflect.EnumDescriptor

func (*Enums) Format Uses

func (p *Enums) Format(s fmt.State, r rune)

func (*Enums) Get Uses

func (p *Enums) Get(i int) protoreflect.EnumDescriptor

func (*Enums) Len Uses

func (p *Enums) Len() int

func (*Enums) ProtoInternal Uses

func (p *Enums) ProtoInternal(pragma.DoNotImplement)

type Extension Uses

type Extension struct {
    Base
    L1  ExtensionL1
    L2  *ExtensionL2 // protected by fileDesc.once
}

func (*Extension) Cardinality Uses

func (xd *Extension) Cardinality() pref.Cardinality

func (*Extension) ContainingMessage Uses

func (xd *Extension) ContainingMessage() pref.MessageDescriptor

func (*Extension) ContainingOneof Uses

func (xd *Extension) ContainingOneof() pref.OneofDescriptor

func (*Extension) Default Uses

func (xd *Extension) Default() pref.Value

func (*Extension) DefaultEnumValue Uses

func (xd *Extension) DefaultEnumValue() pref.EnumValueDescriptor

func (*Extension) Enum Uses

func (xd *Extension) Enum() pref.EnumDescriptor

func (*Extension) Format Uses

func (xd *Extension) Format(s fmt.State, r rune)

func (*Extension) HasDefault Uses

func (xd *Extension) HasDefault() bool

func (*Extension) HasJSONName Uses

func (xd *Extension) HasJSONName() bool

func (*Extension) HasOptionalKeyword Uses

func (xd *Extension) HasOptionalKeyword() bool

func (*Extension) HasPresence Uses

func (xd *Extension) HasPresence() bool

func (*Extension) IsExtension Uses

func (xd *Extension) IsExtension() bool

func (*Extension) IsList Uses

func (xd *Extension) IsList() bool

func (*Extension) IsMap Uses

func (xd *Extension) IsMap() bool

func (*Extension) IsPacked Uses

func (xd *Extension) IsPacked() bool

func (*Extension) IsWeak Uses

func (xd *Extension) IsWeak() bool

func (*Extension) JSONName Uses

func (xd *Extension) JSONName() string

func (*Extension) Kind Uses

func (xd *Extension) Kind() pref.Kind

func (*Extension) MapKey Uses

func (xd *Extension) MapKey() pref.FieldDescriptor

func (*Extension) MapValue Uses

func (xd *Extension) MapValue() pref.FieldDescriptor

func (*Extension) Message Uses

func (xd *Extension) Message() pref.MessageDescriptor

func (*Extension) Number Uses

func (xd *Extension) Number() pref.FieldNumber

func (*Extension) Options Uses

func (xd *Extension) Options() pref.ProtoMessage

func (*Extension) ProtoInternal Uses

func (xd *Extension) ProtoInternal(pragma.DoNotImplement)

func (*Extension) ProtoType Uses

func (xd *Extension) ProtoType(pref.FieldDescriptor)

func (*Extension) TextName Uses

func (xd *Extension) TextName() string

type ExtensionL1 Uses

type ExtensionL1 struct {
    Number      pref.FieldNumber
    Extendee    pref.MessageDescriptor
    Cardinality pref.Cardinality
    Kind        pref.Kind
}

type ExtensionL2 Uses

type ExtensionL2 struct {
    Options          func() pref.ProtoMessage
    StringName       stringName
    IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
    IsPacked         bool // promoted from google.protobuf.FieldOptions
    Default          defaultValue
    Enum             pref.EnumDescriptor
    Message          pref.MessageDescriptor
}

type Extensions Uses

type Extensions struct {
    List []Extension
    // contains filtered or unexported fields
}

func (*Extensions) ByName Uses

func (p *Extensions) ByName(s protoreflect.Name) protoreflect.ExtensionDescriptor

func (*Extensions) Format Uses

func (p *Extensions) Format(s fmt.State, r rune)

func (*Extensions) Get Uses

func (p *Extensions) Get(i int) protoreflect.ExtensionDescriptor

func (*Extensions) Len Uses

func (p *Extensions) Len() int

func (*Extensions) ProtoInternal Uses

func (p *Extensions) ProtoInternal(pragma.DoNotImplement)

type Field Uses

type Field struct {
    Base
    L1  FieldL1
}

func (*Field) Cardinality Uses

func (fd *Field) Cardinality() pref.Cardinality

func (*Field) ContainingMessage Uses

func (fd *Field) ContainingMessage() pref.MessageDescriptor

func (*Field) ContainingOneof Uses

func (fd *Field) ContainingOneof() pref.OneofDescriptor

func (*Field) Default Uses

func (fd *Field) Default() pref.Value

func (*Field) DefaultEnumValue Uses

func (fd *Field) DefaultEnumValue() pref.EnumValueDescriptor

func (*Field) EnforceUTF8 Uses

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 (*Field) Enum Uses

func (fd *Field) Enum() pref.EnumDescriptor

func (*Field) Format Uses

func (fd *Field) Format(s fmt.State, r rune)

func (*Field) HasDefault Uses

func (fd *Field) HasDefault() bool

func (*Field) HasJSONName Uses

func (fd *Field) HasJSONName() bool

func (*Field) HasOptionalKeyword Uses

func (fd *Field) HasOptionalKeyword() bool

func (*Field) HasPresence Uses

func (fd *Field) HasPresence() bool

func (*Field) IsExtension Uses

func (fd *Field) IsExtension() bool

func (*Field) IsList Uses

func (fd *Field) IsList() bool

func (*Field) IsMap Uses

func (fd *Field) IsMap() bool

func (*Field) IsPacked Uses

func (fd *Field) IsPacked() bool

func (*Field) IsWeak Uses

func (fd *Field) IsWeak() bool

func (*Field) JSONName Uses

func (fd *Field) JSONName() string

func (*Field) Kind Uses

func (fd *Field) Kind() pref.Kind

func (*Field) MapKey Uses

func (fd *Field) MapKey() pref.FieldDescriptor

func (*Field) MapValue Uses

func (fd *Field) MapValue() pref.FieldDescriptor

func (*Field) Message Uses

func (fd *Field) Message() pref.MessageDescriptor

func (*Field) Number Uses

func (fd *Field) Number() pref.FieldNumber

func (*Field) Options Uses

func (fd *Field) Options() pref.ProtoMessage

func (*Field) ProtoType Uses

func (fd *Field) ProtoType(pref.FieldDescriptor)

func (*Field) TextName Uses

func (fd *Field) TextName() string

type FieldL1 Uses

type FieldL1 struct {
    Options          func() pref.ProtoMessage
    Number           pref.FieldNumber
    Cardinality      pref.Cardinality // must be consistent with Message.RequiredNumbers
    Kind             pref.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  pref.OneofDescriptor // must be consistent with Message.Oneofs.Fields
    Enum             pref.EnumDescriptor
    Message          pref.MessageDescriptor
}

type FieldNumbers Uses

type FieldNumbers struct {
    List []pref.FieldNumber
    // contains filtered or unexported fields
}

func (*FieldNumbers) Format Uses

func (p *FieldNumbers) Format(s fmt.State, r rune)

func (*FieldNumbers) Get Uses

func (p *FieldNumbers) Get(i int) pref.FieldNumber

func (*FieldNumbers) Has Uses

func (p *FieldNumbers) Has(n pref.FieldNumber) bool

func (*FieldNumbers) Len Uses

func (p *FieldNumbers) Len() int

func (*FieldNumbers) ProtoInternal Uses

func (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement)

type FieldRanges Uses

type FieldRanges struct {
    List [][2]pref.FieldNumber // start inclusive; end exclusive
    // contains filtered or unexported fields
}

func (*FieldRanges) CheckOverlap Uses

func (p *FieldRanges) CheckOverlap(q *FieldRanges) error

CheckOverlap reports an error if p and q overlap.

func (*FieldRanges) CheckValid Uses

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 (*FieldRanges) Format Uses

func (p *FieldRanges) Format(s fmt.State, r rune)

func (*FieldRanges) Get Uses

func (p *FieldRanges) Get(i int) [2]pref.FieldNumber

func (*FieldRanges) Has Uses

func (p *FieldRanges) Has(n pref.FieldNumber) bool

func (*FieldRanges) Len Uses

func (p *FieldRanges) Len() int

func (*FieldRanges) ProtoInternal Uses

func (p *FieldRanges) ProtoInternal(pragma.DoNotImplement)

type Fields Uses

type Fields struct {
    List []Field
    // contains filtered or unexported fields
}

func (*Fields) ByJSONName Uses

func (p *Fields) ByJSONName(s string) protoreflect.FieldDescriptor

func (*Fields) ByName Uses

func (p *Fields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor

func (*Fields) ByNumber Uses

func (p *Fields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor

func (*Fields) ByTextName Uses

func (p *Fields) ByTextName(s string) protoreflect.FieldDescriptor

func (*Fields) Format Uses

func (p *Fields) Format(s fmt.State, r rune)

func (*Fields) Get Uses

func (p *Fields) Get(i int) protoreflect.FieldDescriptor

func (*Fields) Len Uses

func (p *Fields) Len() int

func (*Fields) ProtoInternal Uses

func (p *Fields) ProtoInternal(pragma.DoNotImplement)

type File Uses

type File struct {
    L1  FileL1

    L2  *FileL2
    // contains filtered or unexported fields
}

func (*File) Enums Uses

func (fd *File) Enums() pref.EnumDescriptors

func (*File) Extensions Uses

func (fd *File) Extensions() pref.ExtensionDescriptors

func (*File) Format Uses

func (fd *File) Format(s fmt.State, r rune)

func (*File) FullName Uses

func (fd *File) FullName() pref.FullName

func (*File) GoPackagePath Uses

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 (*File) Imports Uses

func (fd *File) Imports() pref.FileImports

func (*File) Index Uses

func (fd *File) Index() int

func (*File) IsPlaceholder Uses

func (fd *File) IsPlaceholder() bool

func (*File) Messages Uses

func (fd *File) Messages() pref.MessageDescriptors

func (*File) Name Uses

func (fd *File) Name() pref.Name

func (*File) Options Uses

func (fd *File) Options() pref.ProtoMessage

func (*File) Package Uses

func (fd *File) Package() pref.FullName

func (*File) Parent Uses

func (fd *File) Parent() pref.Descriptor

func (*File) ParentFile Uses

func (fd *File) ParentFile() pref.FileDescriptor

func (*File) Path Uses

func (fd *File) Path() string

func (*File) ProtoInternal Uses

func (fd *File) ProtoInternal(pragma.DoNotImplement)

func (*File) ProtoLegacyRawDesc Uses

func (fd *File) ProtoLegacyRawDesc() []byte

ProtoLegacyRawDesc is a pseudo-internal API for allowing the v1 code to be able to retrieve the raw descriptor.

WARNING: This method is exempt from the compatibility promise and may be removed in the future without warning.

func (*File) ProtoType Uses

func (fd *File) ProtoType(pref.FileDescriptor)

func (*File) Services Uses

func (fd *File) Services() pref.ServiceDescriptors

func (*File) SourceLocations Uses

func (fd *File) SourceLocations() pref.SourceLocations

func (*File) Syntax Uses

func (fd *File) Syntax() pref.Syntax

type FileImports Uses

type FileImports []pref.FileImport

func (*FileImports) Format Uses

func (p *FileImports) Format(s fmt.State, r rune)

func (*FileImports) Get Uses

func (p *FileImports) Get(i int) pref.FileImport

func (*FileImports) Len Uses

func (p *FileImports) Len() int

func (*FileImports) ProtoInternal Uses

func (p *FileImports) ProtoInternal(pragma.DoNotImplement)

type FileL1 Uses

type FileL1 struct {
    Syntax  pref.Syntax
    Path    string
    Package pref.FullName

    Enums      Enums
    Messages   Messages
    Extensions Extensions
    Services   Services
}

type FileL2 Uses

type FileL2 struct {
    Options   func() pref.ProtoMessage
    Imports   FileImports
    Locations SourceLocations
}

type Message Uses

type Message struct {
    Base
    L1  MessageL1
    L2  *MessageL2 // protected by fileDesc.once
}

func (*Message) Enums Uses

func (md *Message) Enums() pref.EnumDescriptors

func (*Message) ExtensionRangeOptions Uses

func (md *Message) ExtensionRangeOptions(i int) pref.ProtoMessage

func (*Message) ExtensionRanges Uses

func (md *Message) ExtensionRanges() pref.FieldRanges

func (*Message) Extensions Uses

func (md *Message) Extensions() pref.ExtensionDescriptors

func (*Message) Fields Uses

func (md *Message) Fields() pref.FieldDescriptors

func (*Message) Format Uses

func (md *Message) Format(s fmt.State, r rune)

func (*Message) IsMapEntry Uses

func (md *Message) IsMapEntry() bool

func (*Message) IsMessageSet Uses

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 (*Message) Messages Uses

func (md *Message) Messages() pref.MessageDescriptors

func (*Message) Oneofs Uses

func (md *Message) Oneofs() pref.OneofDescriptors

func (*Message) Options Uses

func (md *Message) Options() pref.ProtoMessage

func (*Message) ProtoType Uses

func (md *Message) ProtoType(pref.MessageDescriptor)

func (*Message) RequiredNumbers Uses

func (md *Message) RequiredNumbers() pref.FieldNumbers

func (*Message) ReservedNames Uses

func (md *Message) ReservedNames() pref.Names

func (*Message) ReservedRanges Uses

func (md *Message) ReservedRanges() pref.FieldRanges

type MessageL1 Uses

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 Uses

type MessageL2 struct {
    Options               func() pref.ProtoMessage
    Fields                Fields
    Oneofs                Oneofs
    ReservedNames         Names
    ReservedRanges        FieldRanges
    RequiredNumbers       FieldNumbers // must be consistent with Fields.Cardinality
    ExtensionRanges       FieldRanges
    ExtensionRangeOptions []func() pref.ProtoMessage // must be same length as ExtensionRanges
}

type Messages Uses

type Messages struct {
    List []Message
    // contains filtered or unexported fields
}

func (*Messages) ByName Uses

func (p *Messages) ByName(s protoreflect.Name) protoreflect.MessageDescriptor

func (*Messages) Format Uses

func (p *Messages) Format(s fmt.State, r rune)

func (*Messages) Get Uses

func (p *Messages) Get(i int) protoreflect.MessageDescriptor

func (*Messages) Len Uses

func (p *Messages) Len() int

func (*Messages) ProtoInternal Uses

func (p *Messages) ProtoInternal(pragma.DoNotImplement)

type Method Uses

type Method struct {
    Base
    L1  MethodL1
}

func (*Method) Format Uses

func (md *Method) Format(s fmt.State, r rune)

func (*Method) Input Uses

func (md *Method) Input() pref.MessageDescriptor

func (*Method) IsStreamingClient Uses

func (md *Method) IsStreamingClient() bool

func (*Method) IsStreamingServer Uses

func (md *Method) IsStreamingServer() bool

func (*Method) Options Uses

func (md *Method) Options() pref.ProtoMessage

func (*Method) Output Uses

func (md *Method) Output() pref.MessageDescriptor

func (*Method) ProtoInternal Uses

func (md *Method) ProtoInternal(pragma.DoNotImplement)

func (*Method) ProtoType Uses

func (md *Method) ProtoType(pref.MethodDescriptor)

type MethodL1 Uses

type MethodL1 struct {
    Options           func() pref.ProtoMessage
    Input             pref.MessageDescriptor
    Output            pref.MessageDescriptor
    IsStreamingClient bool
    IsStreamingServer bool
}

type Methods Uses

type Methods struct {
    List []Method
    // contains filtered or unexported fields
}

func (*Methods) ByName Uses

func (p *Methods) ByName(s protoreflect.Name) protoreflect.MethodDescriptor

func (*Methods) Format Uses

func (p *Methods) Format(s fmt.State, r rune)

func (*Methods) Get Uses

func (p *Methods) Get(i int) protoreflect.MethodDescriptor

func (*Methods) Len Uses

func (p *Methods) Len() int

func (*Methods) ProtoInternal Uses

func (p *Methods) ProtoInternal(pragma.DoNotImplement)

type Names Uses

type Names struct {
    List []pref.Name
    // contains filtered or unexported fields
}

func (*Names) CheckValid Uses

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 (*Names) Format Uses

func (p *Names) Format(s fmt.State, r rune)

func (*Names) Get Uses

func (p *Names) Get(i int) pref.Name

func (*Names) Has Uses

func (p *Names) Has(s pref.Name) bool

func (*Names) Len Uses

func (p *Names) Len() int

func (*Names) ProtoInternal Uses

func (p *Names) ProtoInternal(pragma.DoNotImplement)

type Oneof Uses

type Oneof struct {
    Base
    L1  OneofL1
}

func (*Oneof) Fields Uses

func (od *Oneof) Fields() pref.FieldDescriptors

func (*Oneof) Format Uses

func (od *Oneof) Format(s fmt.State, r rune)

func (*Oneof) IsSynthetic Uses

func (od *Oneof) IsSynthetic() bool

func (*Oneof) Options Uses

func (od *Oneof) Options() pref.ProtoMessage

func (*Oneof) ProtoType Uses

func (od *Oneof) ProtoType(pref.OneofDescriptor)

type OneofFields Uses

type OneofFields struct {
    List []pref.FieldDescriptor
    // contains filtered or unexported fields
}

func (*OneofFields) ByJSONName Uses

func (p *OneofFields) ByJSONName(s string) pref.FieldDescriptor

func (*OneofFields) ByName Uses

func (p *OneofFields) ByName(s pref.Name) pref.FieldDescriptor

func (*OneofFields) ByNumber Uses

func (p *OneofFields) ByNumber(n pref.FieldNumber) pref.FieldDescriptor

func (*OneofFields) ByTextName Uses

func (p *OneofFields) ByTextName(s string) pref.FieldDescriptor

func (*OneofFields) Format Uses

func (p *OneofFields) Format(s fmt.State, r rune)

func (*OneofFields) Get Uses

func (p *OneofFields) Get(i int) pref.FieldDescriptor

func (*OneofFields) Len Uses

func (p *OneofFields) Len() int

func (*OneofFields) ProtoInternal Uses

func (p *OneofFields) ProtoInternal(pragma.DoNotImplement)

type OneofL1 Uses

type OneofL1 struct {
    Options func() pref.ProtoMessage
    Fields  OneofFields // must be consistent with Message.Fields.ContainingOneof
}

type Oneofs Uses

type Oneofs struct {
    List []Oneof
    // contains filtered or unexported fields
}

func (*Oneofs) ByName Uses

func (p *Oneofs) ByName(s protoreflect.Name) protoreflect.OneofDescriptor

func (*Oneofs) Format Uses

func (p *Oneofs) Format(s fmt.State, r rune)

func (*Oneofs) Get Uses

func (p *Oneofs) Get(i int) protoreflect.OneofDescriptor

func (*Oneofs) Len Uses

func (p *Oneofs) Len() int

func (*Oneofs) ProtoInternal Uses

func (p *Oneofs) ProtoInternal(pragma.DoNotImplement)

type Out Uses

type Out struct {
    File pref.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
}

Out is the output of the Builder.

type PlaceholderEnum Uses

type PlaceholderEnum pref.FullName

PlaceholderEnum is a placeholder, representing only the full name.

func (PlaceholderEnum) FullName Uses

func (e PlaceholderEnum) FullName() pref.FullName

func (PlaceholderEnum) Index Uses

func (e PlaceholderEnum) Index() int

func (PlaceholderEnum) IsPlaceholder Uses

func (e PlaceholderEnum) IsPlaceholder() bool

func (PlaceholderEnum) Name Uses

func (e PlaceholderEnum) Name() pref.Name

func (PlaceholderEnum) Options Uses

func (e PlaceholderEnum) Options() pref.ProtoMessage

func (PlaceholderEnum) Parent Uses

func (e PlaceholderEnum) Parent() pref.Descriptor

func (PlaceholderEnum) ParentFile Uses

func (e PlaceholderEnum) ParentFile() pref.FileDescriptor

func (PlaceholderEnum) ProtoInternal Uses

func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderEnum) ProtoType Uses

func (e PlaceholderEnum) ProtoType(pref.EnumDescriptor)

func (PlaceholderEnum) ReservedNames Uses

func (e PlaceholderEnum) ReservedNames() pref.Names

func (PlaceholderEnum) ReservedRanges Uses

func (e PlaceholderEnum) ReservedRanges() pref.EnumRanges

func (PlaceholderEnum) Syntax Uses

func (e PlaceholderEnum) Syntax() pref.Syntax

func (PlaceholderEnum) Values Uses

func (e PlaceholderEnum) Values() pref.EnumValueDescriptors

type PlaceholderEnumValue Uses

type PlaceholderEnumValue pref.FullName

PlaceholderEnumValue is a placeholder, representing only the full name.

func (PlaceholderEnumValue) FullName Uses

func (e PlaceholderEnumValue) FullName() pref.FullName

func (PlaceholderEnumValue) Index Uses

func (e PlaceholderEnumValue) Index() int

func (PlaceholderEnumValue) IsPlaceholder Uses

func (e PlaceholderEnumValue) IsPlaceholder() bool

func (PlaceholderEnumValue) Name Uses

func (e PlaceholderEnumValue) Name() pref.Name

func (PlaceholderEnumValue) Number Uses

func (e PlaceholderEnumValue) Number() pref.EnumNumber

func (PlaceholderEnumValue) Options Uses

func (e PlaceholderEnumValue) Options() pref.ProtoMessage

func (PlaceholderEnumValue) Parent Uses

func (e PlaceholderEnumValue) Parent() pref.Descriptor

func (PlaceholderEnumValue) ParentFile Uses

func (e PlaceholderEnumValue) ParentFile() pref.FileDescriptor

func (PlaceholderEnumValue) ProtoInternal Uses

func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderEnumValue) ProtoType Uses

func (e PlaceholderEnumValue) ProtoType(pref.EnumValueDescriptor)

func (PlaceholderEnumValue) Syntax Uses

func (e PlaceholderEnumValue) Syntax() pref.Syntax

type PlaceholderFile Uses

type PlaceholderFile string

PlaceholderFile is a placeholder, representing only the file path.

func (PlaceholderFile) Enums Uses

func (f PlaceholderFile) Enums() pref.EnumDescriptors

func (PlaceholderFile) Extensions Uses

func (f PlaceholderFile) Extensions() pref.ExtensionDescriptors

func (PlaceholderFile) FullName Uses

func (f PlaceholderFile) FullName() pref.FullName

func (PlaceholderFile) Imports Uses

func (f PlaceholderFile) Imports() pref.FileImports

func (PlaceholderFile) Index Uses

func (f PlaceholderFile) Index() int

func (PlaceholderFile) IsPlaceholder Uses

func (f PlaceholderFile) IsPlaceholder() bool

func (PlaceholderFile) Messages Uses

func (f PlaceholderFile) Messages() pref.MessageDescriptors

func (PlaceholderFile) Name Uses

func (f PlaceholderFile) Name() pref.Name

func (PlaceholderFile) Options Uses

func (f PlaceholderFile) Options() pref.ProtoMessage

func (PlaceholderFile) Package Uses

func (f PlaceholderFile) Package() pref.FullName

func (PlaceholderFile) Parent Uses

func (f PlaceholderFile) Parent() pref.Descriptor

func (PlaceholderFile) ParentFile Uses

func (f PlaceholderFile) ParentFile() pref.FileDescriptor

func (PlaceholderFile) Path Uses

func (f PlaceholderFile) Path() string

func (PlaceholderFile) ProtoInternal Uses

func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderFile) ProtoType Uses

func (f PlaceholderFile) ProtoType(pref.FileDescriptor)

func (PlaceholderFile) Services Uses

func (f PlaceholderFile) Services() pref.ServiceDescriptors

func (PlaceholderFile) SourceLocations Uses

func (f PlaceholderFile) SourceLocations() pref.SourceLocations

func (PlaceholderFile) Syntax Uses

func (f PlaceholderFile) Syntax() pref.Syntax

type PlaceholderMessage Uses

type PlaceholderMessage pref.FullName

PlaceholderMessage is a placeholder, representing only the full name.

func (PlaceholderMessage) Enums Uses

func (m PlaceholderMessage) Enums() pref.EnumDescriptors

func (PlaceholderMessage) ExtensionRangeOptions Uses

func (m PlaceholderMessage) ExtensionRangeOptions(int) pref.ProtoMessage

func (PlaceholderMessage) ExtensionRanges Uses

func (m PlaceholderMessage) ExtensionRanges() pref.FieldRanges

func (PlaceholderMessage) Extensions Uses

func (m PlaceholderMessage) Extensions() pref.ExtensionDescriptors

func (PlaceholderMessage) Fields Uses

func (m PlaceholderMessage) Fields() pref.FieldDescriptors

func (PlaceholderMessage) FullName Uses

func (m PlaceholderMessage) FullName() pref.FullName

func (PlaceholderMessage) Index Uses

func (m PlaceholderMessage) Index() int

func (PlaceholderMessage) IsMapEntry Uses

func (m PlaceholderMessage) IsMapEntry() bool

func (PlaceholderMessage) IsPlaceholder Uses

func (m PlaceholderMessage) IsPlaceholder() bool

func (PlaceholderMessage) Messages Uses

func (m PlaceholderMessage) Messages() pref.MessageDescriptors

func (PlaceholderMessage) Name Uses

func (m PlaceholderMessage) Name() pref.Name

func (PlaceholderMessage) Oneofs Uses

func (m PlaceholderMessage) Oneofs() pref.OneofDescriptors

func (PlaceholderMessage) Options Uses

func (m PlaceholderMessage) Options() pref.ProtoMessage

func (PlaceholderMessage) Parent Uses

func (m PlaceholderMessage) Parent() pref.Descriptor

func (PlaceholderMessage) ParentFile Uses

func (m PlaceholderMessage) ParentFile() pref.FileDescriptor

func (PlaceholderMessage) ProtoInternal Uses

func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderMessage) ProtoType Uses

func (m PlaceholderMessage) ProtoType(pref.MessageDescriptor)

func (PlaceholderMessage) RequiredNumbers Uses

func (m PlaceholderMessage) RequiredNumbers() pref.FieldNumbers

func (PlaceholderMessage) ReservedNames Uses

func (m PlaceholderMessage) ReservedNames() pref.Names

func (PlaceholderMessage) ReservedRanges Uses

func (m PlaceholderMessage) ReservedRanges() pref.FieldRanges

func (PlaceholderMessage) Syntax Uses

func (m PlaceholderMessage) Syntax() pref.Syntax

type Service Uses

type Service struct {
    Base
    L1  ServiceL1
    L2  *ServiceL2 // protected by fileDesc.once
}

func (*Service) Format Uses

func (sd *Service) Format(s fmt.State, r rune)

func (*Service) Methods Uses

func (sd *Service) Methods() pref.MethodDescriptors

func (*Service) Options Uses

func (sd *Service) Options() pref.ProtoMessage

func (*Service) ProtoInternal Uses

func (sd *Service) ProtoInternal(pragma.DoNotImplement)

func (*Service) ProtoType Uses

func (sd *Service) ProtoType(pref.ServiceDescriptor)

type ServiceL1 Uses

type ServiceL1 struct{}

type ServiceL2 Uses

type ServiceL2 struct {
    Options func() pref.ProtoMessage
    Methods Methods
}

type Services Uses

type Services struct {
    List []Service
    // contains filtered or unexported fields
}

func (*Services) ByName Uses

func (p *Services) ByName(s protoreflect.Name) protoreflect.ServiceDescriptor

func (*Services) Format Uses

func (p *Services) Format(s fmt.State, r rune)

func (*Services) Get Uses

func (p *Services) Get(i int) protoreflect.ServiceDescriptor

func (*Services) Len Uses

func (p *Services) Len() int

func (*Services) ProtoInternal Uses

func (p *Services) ProtoInternal(pragma.DoNotImplement)

type SourceLocations Uses

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 []pref.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 pref.FileDescriptor
    // contains filtered or unexported fields
}

func (*SourceLocations) ByDescriptor Uses

func (p *SourceLocations) ByDescriptor(desc pref.Descriptor) pref.SourceLocation

func (*SourceLocations) ByPath Uses

func (p *SourceLocations) ByPath(path pref.SourcePath) pref.SourceLocation

func (*SourceLocations) Get Uses

func (p *SourceLocations) Get(i int) pref.SourceLocation

func (*SourceLocations) Len Uses

func (p *SourceLocations) Len() int

func (*SourceLocations) ProtoInternal Uses

func (p *SourceLocations) ProtoInternal(pragma.DoNotImplement)

Package filedesc imports 19 packages (graph) and is imported by 7 packages. Updated 2020-08-08. Refresh now. Tools for package owners.