filedesc

package
v8.1.0-liftoff0+incomp... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package filedesc provides functionality for constructing descriptors.

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

Index

Constants

This section is empty.

Variables

View Source
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.

Functions

func DefaultValue

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

Types

type Base

type Base struct {
	L0 BaseL0
}

func (*Base) FullName

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

func (*Base) Index

func (d *Base) Index() int

func (*Base) IsPlaceholder

func (d *Base) IsPlaceholder() bool

func (*Base) Name

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

func (*Base) Parent

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

func (*Base) ParentFile

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

func (*Base) ProtoInternal

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

func (*Base) Syntax

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

type BaseL0

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

type Builder

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

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

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

func (*Enum) Format

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

func (*Enum) Options

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

func (*Enum) ProtoType

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

func (*Enum) ReservedNames

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

func (*Enum) ReservedRanges

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

func (*Enum) Values

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

type EnumL1

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

type EnumL2

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

type EnumRanges

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

func (*EnumRanges) CheckValid

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

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

func (*EnumRanges) Get

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

func (*EnumRanges) Has

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

func (*EnumRanges) Len

func (p *EnumRanges) Len() int

func (*EnumRanges) ProtoInternal

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

type EnumValue

type EnumValue struct {
	Base
	L1 EnumValueL1
}

func (*EnumValue) Format

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

func (*EnumValue) Number

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

func (*EnumValue) Options

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

func (*EnumValue) ProtoType

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

type EnumValueL1

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

type EnumValues

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

func (*EnumValues) ByName

func (*EnumValues) ByNumber

func (*EnumValues) Format

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

func (*EnumValues) Get

func (*EnumValues) Len

func (p *EnumValues) Len() int

func (*EnumValues) ProtoInternal

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

type Enums

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

func (*Enums) ByName

func (*Enums) Format

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

func (*Enums) Get

func (*Enums) Len

func (p *Enums) Len() int

func (*Enums) ProtoInternal

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

type Extension

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

func (*Extension) Cardinality

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

func (*Extension) ContainingMessage

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

func (*Extension) ContainingOneof

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

func (*Extension) Default

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

func (*Extension) DefaultEnumValue

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

func (*Extension) Enum

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

func (*Extension) Format

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

func (*Extension) HasDefault

func (xd *Extension) HasDefault() bool

func (*Extension) HasJSONName

func (xd *Extension) HasJSONName() bool

func (*Extension) HasOptionalKeyword

func (xd *Extension) HasOptionalKeyword() bool

func (*Extension) HasPresence

func (xd *Extension) HasPresence() bool

func (*Extension) IsExtension

func (xd *Extension) IsExtension() bool

func (*Extension) IsList

func (xd *Extension) IsList() bool

func (*Extension) IsMap

func (xd *Extension) IsMap() bool

func (*Extension) IsPacked

func (xd *Extension) IsPacked() bool

func (*Extension) IsWeak

func (xd *Extension) IsWeak() bool

func (*Extension) JSONName

func (xd *Extension) JSONName() string

func (*Extension) Kind

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

func (*Extension) MapKey

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

func (*Extension) MapValue

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

func (*Extension) Message

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

func (*Extension) Number

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

func (*Extension) Options

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

func (*Extension) ProtoInternal

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

func (*Extension) ProtoType

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

func (*Extension) TextName

func (xd *Extension) TextName() string

type ExtensionL1

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

type ExtensionL2

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

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

func (*Extensions) ByName

func (*Extensions) Format

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

func (*Extensions) Get

func (*Extensions) Len

func (p *Extensions) Len() int

func (*Extensions) ProtoInternal

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

type Field

type Field struct {
	Base
	L1 FieldL1
}

func (*Field) Cardinality

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

func (*Field) ContainingMessage

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

func (*Field) ContainingOneof

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

func (*Field) Default

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

func (*Field) DefaultEnumValue

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

func (*Field) EnforceUTF8

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

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

func (*Field) Format

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

func (*Field) HasDefault

func (fd *Field) HasDefault() bool

func (*Field) HasJSONName

func (fd *Field) HasJSONName() bool

func (*Field) HasOptionalKeyword

func (fd *Field) HasOptionalKeyword() bool

func (*Field) HasPresence

func (fd *Field) HasPresence() bool

func (*Field) IsExtension

func (fd *Field) IsExtension() bool

func (*Field) IsList

func (fd *Field) IsList() bool

func (*Field) IsMap

func (fd *Field) IsMap() bool

func (*Field) IsPacked

func (fd *Field) IsPacked() bool

func (*Field) IsWeak

func (fd *Field) IsWeak() bool

func (*Field) JSONName

func (fd *Field) JSONName() string

func (*Field) Kind

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

func (*Field) MapKey

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

func (*Field) MapValue

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

func (*Field) Message

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

func (*Field) Number

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

func (*Field) Options

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

func (*Field) ProtoType

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

func (*Field) TextName

func (fd *Field) TextName() string

type FieldL1

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

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

func (*FieldNumbers) Format

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

func (*FieldNumbers) Get

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

func (*FieldNumbers) Has

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

func (*FieldNumbers) Len

func (p *FieldNumbers) Len() int

func (*FieldNumbers) ProtoInternal

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

type FieldRanges

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

func (*FieldRanges) CheckOverlap

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

CheckOverlap reports an error if p and q overlap.

func (*FieldRanges) CheckValid

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

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

func (*FieldRanges) Get

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

func (*FieldRanges) Has

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

func (*FieldRanges) Len

func (p *FieldRanges) Len() int

func (*FieldRanges) ProtoInternal

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

type Fields

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

func (*Fields) ByJSONName

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

func (*Fields) ByName

func (*Fields) ByNumber

func (*Fields) ByTextName

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

func (*Fields) Format

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

func (*Fields) Get

func (*Fields) Len

func (p *Fields) Len() int

func (*Fields) ProtoInternal

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

type File

type File struct {
	L1 FileL1

	L2 *FileL2
	// contains filtered or unexported fields
}

func (*File) Enums

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

func (*File) Extensions

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

func (*File) Format

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

func (*File) FullName

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

func (*File) GoPackagePath

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

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

func (*File) Index

func (fd *File) Index() int

func (*File) IsPlaceholder

func (fd *File) IsPlaceholder() bool

func (*File) Messages

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

func (*File) Name

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

func (*File) Options

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

func (*File) Package

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

func (*File) Parent

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

func (*File) ParentFile

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

func (*File) Path

func (fd *File) Path() string

func (*File) ProtoInternal

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

func (*File) ProtoType

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

func (*File) Services

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

func (*File) SourceLocations

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

func (*File) Syntax

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

type FileImports

type FileImports []pref.FileImport

func (*FileImports) Format

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

func (*FileImports) Get

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

func (*FileImports) Len

func (p *FileImports) Len() int

func (*FileImports) ProtoInternal

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

type FileL1

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

	Enums      Enums
	Messages   Messages
	Extensions Extensions
	Services   Services
}

type FileL2

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

type Message

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

func (*Message) Enums

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

func (*Message) ExtensionRangeOptions

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

func (*Message) ExtensionRanges

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

func (*Message) Extensions

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

func (*Message) Fields

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

func (*Message) Format

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

func (*Message) IsMapEntry

func (md *Message) IsMapEntry() bool

func (*Message) IsMessageSet

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

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

func (*Message) Oneofs

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

func (*Message) Options

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

func (*Message) ProtoType

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

func (*Message) RequiredNumbers

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

func (*Message) ReservedNames

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

func (*Message) ReservedRanges

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

type MessageL1

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

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

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

func (*Messages) ByName

func (*Messages) Format

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

func (*Messages) Get

func (*Messages) Len

func (p *Messages) Len() int

func (*Messages) ProtoInternal

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

type Method

type Method struct {
	Base
	L1 MethodL1
}

func (*Method) Format

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

func (*Method) Input

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

func (*Method) IsStreamingClient

func (md *Method) IsStreamingClient() bool

func (*Method) IsStreamingServer

func (md *Method) IsStreamingServer() bool

func (*Method) Options

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

func (*Method) Output

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

func (*Method) ProtoInternal

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

func (*Method) ProtoType

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

type MethodL1

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

type Methods

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

func (*Methods) ByName

func (*Methods) Format

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

func (*Methods) Get

func (*Methods) Len

func (p *Methods) Len() int

func (*Methods) ProtoInternal

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

type Names

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

func (*Names) CheckValid

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

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

func (*Names) Get

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

func (*Names) Has

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

func (*Names) Len

func (p *Names) Len() int

func (*Names) ProtoInternal

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

type Oneof

type Oneof struct {
	Base
	L1 OneofL1
}

func (*Oneof) Fields

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

func (*Oneof) Format

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

func (*Oneof) IsSynthetic

func (od *Oneof) IsSynthetic() bool

func (*Oneof) Options

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

func (*Oneof) ProtoType

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

type OneofFields

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

func (*OneofFields) ByJSONName

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

func (*OneofFields) ByName

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

func (*OneofFields) ByNumber

func (*OneofFields) ByTextName

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

func (*OneofFields) Format

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

func (*OneofFields) Get

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

func (*OneofFields) Len

func (p *OneofFields) Len() int

func (*OneofFields) ProtoInternal

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

type OneofL1

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

type Oneofs

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

func (*Oneofs) ByName

func (*Oneofs) Format

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

func (*Oneofs) Get

func (*Oneofs) Len

func (p *Oneofs) Len() int

func (*Oneofs) ProtoInternal

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

type Out

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

type PlaceholderEnum pref.FullName

PlaceholderEnum is a placeholder, representing only the full name.

func (PlaceholderEnum) FullName

func (e PlaceholderEnum) FullName() pref.FullName

func (PlaceholderEnum) Index

func (e PlaceholderEnum) Index() int

func (PlaceholderEnum) IsPlaceholder

func (e PlaceholderEnum) IsPlaceholder() bool

func (PlaceholderEnum) Name

func (e PlaceholderEnum) Name() pref.Name

func (PlaceholderEnum) Options

func (e PlaceholderEnum) Options() pref.ProtoMessage

func (PlaceholderEnum) Parent

func (e PlaceholderEnum) Parent() pref.Descriptor

func (PlaceholderEnum) ParentFile

func (e PlaceholderEnum) ParentFile() pref.FileDescriptor

func (PlaceholderEnum) ProtoInternal

func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderEnum) ProtoType

func (e PlaceholderEnum) ProtoType(pref.EnumDescriptor)

func (PlaceholderEnum) ReservedNames

func (e PlaceholderEnum) ReservedNames() pref.Names

func (PlaceholderEnum) ReservedRanges

func (e PlaceholderEnum) ReservedRanges() pref.EnumRanges

func (PlaceholderEnum) Syntax

func (e PlaceholderEnum) Syntax() pref.Syntax

func (PlaceholderEnum) Values

type PlaceholderEnumValue

type PlaceholderEnumValue pref.FullName

PlaceholderEnumValue is a placeholder, representing only the full name.

func (PlaceholderEnumValue) FullName

func (e PlaceholderEnumValue) FullName() pref.FullName

func (PlaceholderEnumValue) Index

func (e PlaceholderEnumValue) Index() int

func (PlaceholderEnumValue) IsPlaceholder

func (e PlaceholderEnumValue) IsPlaceholder() bool

func (PlaceholderEnumValue) Name

func (e PlaceholderEnumValue) Name() pref.Name

func (PlaceholderEnumValue) Number

func (PlaceholderEnumValue) Options

func (PlaceholderEnumValue) Parent

func (PlaceholderEnumValue) ParentFile

func (e PlaceholderEnumValue) ParentFile() pref.FileDescriptor

func (PlaceholderEnumValue) ProtoInternal

func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderEnumValue) ProtoType

func (PlaceholderEnumValue) Syntax

func (e PlaceholderEnumValue) Syntax() pref.Syntax

type PlaceholderFile

type PlaceholderFile string

PlaceholderFile is a placeholder, representing only the file path.

func (PlaceholderFile) Enums

func (PlaceholderFile) Extensions

func (f PlaceholderFile) Extensions() pref.ExtensionDescriptors

func (PlaceholderFile) FullName

func (f PlaceholderFile) FullName() pref.FullName

func (PlaceholderFile) Imports

func (f PlaceholderFile) Imports() pref.FileImports

func (PlaceholderFile) Index

func (f PlaceholderFile) Index() int

func (PlaceholderFile) IsPlaceholder

func (f PlaceholderFile) IsPlaceholder() bool

func (PlaceholderFile) Messages

func (PlaceholderFile) Name

func (f PlaceholderFile) Name() pref.Name

func (PlaceholderFile) Options

func (f PlaceholderFile) Options() pref.ProtoMessage

func (PlaceholderFile) Package

func (f PlaceholderFile) Package() pref.FullName

func (PlaceholderFile) Parent

func (f PlaceholderFile) Parent() pref.Descriptor

func (PlaceholderFile) ParentFile

func (f PlaceholderFile) ParentFile() pref.FileDescriptor

func (PlaceholderFile) Path

func (f PlaceholderFile) Path() string

func (PlaceholderFile) ProtoInternal

func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderFile) ProtoType

func (f PlaceholderFile) ProtoType(pref.FileDescriptor)

func (PlaceholderFile) Services

func (PlaceholderFile) SourceLocations

func (f PlaceholderFile) SourceLocations() pref.SourceLocations

func (PlaceholderFile) Syntax

func (f PlaceholderFile) Syntax() pref.Syntax

type PlaceholderMessage

type PlaceholderMessage pref.FullName

PlaceholderMessage is a placeholder, representing only the full name.

func (PlaceholderMessage) Enums

func (PlaceholderMessage) ExtensionRangeOptions

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

func (PlaceholderMessage) ExtensionRanges

func (m PlaceholderMessage) ExtensionRanges() pref.FieldRanges

func (PlaceholderMessage) Extensions

func (PlaceholderMessage) Fields

func (PlaceholderMessage) FullName

func (m PlaceholderMessage) FullName() pref.FullName

func (PlaceholderMessage) Index

func (m PlaceholderMessage) Index() int

func (PlaceholderMessage) IsMapEntry

func (m PlaceholderMessage) IsMapEntry() bool

func (PlaceholderMessage) IsPlaceholder

func (m PlaceholderMessage) IsPlaceholder() bool

func (PlaceholderMessage) Messages

func (PlaceholderMessage) Name

func (m PlaceholderMessage) Name() pref.Name

func (PlaceholderMessage) Oneofs

func (PlaceholderMessage) Options

func (m PlaceholderMessage) Options() pref.ProtoMessage

func (PlaceholderMessage) Parent

func (m PlaceholderMessage) Parent() pref.Descriptor

func (PlaceholderMessage) ParentFile

func (m PlaceholderMessage) ParentFile() pref.FileDescriptor

func (PlaceholderMessage) ProtoInternal

func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement)

func (PlaceholderMessage) ProtoType

func (PlaceholderMessage) RequiredNumbers

func (m PlaceholderMessage) RequiredNumbers() pref.FieldNumbers

func (PlaceholderMessage) ReservedNames

func (m PlaceholderMessage) ReservedNames() pref.Names

func (PlaceholderMessage) ReservedRanges

func (m PlaceholderMessage) ReservedRanges() pref.FieldRanges

func (PlaceholderMessage) Syntax

func (m PlaceholderMessage) Syntax() pref.Syntax

type Service

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

func (*Service) Format

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

func (*Service) Methods

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

func (*Service) Options

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

func (*Service) ProtoInternal

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

func (*Service) ProtoType

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

type ServiceL1

type ServiceL1 struct{}

type ServiceL2

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

type Services

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

func (*Services) ByName

func (*Services) Format

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

func (*Services) Get

func (*Services) Len

func (p *Services) Len() int

func (*Services) ProtoInternal

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

type SourceLocations

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

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

func (*SourceLocations) ByPath

func (*SourceLocations) Get

func (*SourceLocations) Len

func (p *SourceLocations) Len() int

func (*SourceLocations) ProtoInternal

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL