Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TypeMessage is the number of the message type index in the FileDescriptorProto. TypeMessage = 4 TypeNestedType = 3 TypeNestedEnum = 4 TypeEnum = 5 TypeEnumValue = 2 TypeMessageField = 2 TypeService = 6 TypeServiceMethod = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Location ¶
type Location = descriptorpb.SourceCodeInfo_Location
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds indexed files that hold comments and locations for various proto types for quick lookups.
func NewRegistry ¶
func NewRegistry(descriptorRegistry *descriptor.Registry) *Registry
func (*Registry) LookupEnum ¶
func (r *Registry) LookupEnum(enum *descriptor.Enum) *Enum
func (*Registry) LookupField ¶
func (r *Registry) LookupField(field *descriptor.Field) *Location
LookupField looks up comments for a field.
NOTE: Avoid using this method unless an arbitrary field access is needed. A more efficient way when iterating over fields of a message is to use the Message object directly.
func (*Registry) LookupMessage ¶
func (r *Registry) LookupMessage(message *descriptor.Message) *Message
func (*Registry) LookupService ¶
func (r *Registry) LookupService(service *descriptor.Service) *Service
Click to show internal directories.
Click to hide internal directories.