Documentation ¶
Index ¶
- type DefinitionComments
- type MessageDefinition
- type Registry
- func (r *Registry) FieldComments(message *MessageDefinition, field *descriptor.FieldDescriptorProto) (DefinitionComments, error)
- func (r *Registry) FileComments(file *descriptor.FileDescriptorProto) (DefinitionComments, error)
- func (r *Registry) MessageDefinition(name string) *MessageDefinition
- func (r *Registry) MethodComments(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto, ...) (DefinitionComments, error)
- func (r *Registry) MethodInputDefinition(method *descriptor.MethodDescriptorProto) *MessageDefinition
- func (r *Registry) MethodOutputDefinition(method *descriptor.MethodDescriptorProto) *MessageDefinition
- func (r *Registry) ServiceComments(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto) (DefinitionComments, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefinitionComments ¶
// ignored detached comments.
type MessageDefinition ¶
type MessageDefinition struct { // Descriptor is is the DescriptorProto defining the message. Descriptor *descriptor.DescriptorProto // File is the File that the message was defined in. Or, if it has been // publicly imported, what File was that import performed in? File *descriptor.FileDescriptorProto // Parent is the parent message, if this was defined as a nested message. If // this was defiend at the top level, parent is nil. Parent *MessageDefinition // Comments describes the comments surrounding a message's definition. If it // was publicly imported, then these comments are from the actual source file, // not the file that the import was performed in. Comments DefinitionComments // contains filtered or unexported fields }
MessageDefinition msg info
func (*MessageDefinition) Lineage ¶
func (m *MessageDefinition) Lineage() []*MessageDefinition
Lineage returns m's parental chain all the way back up to a top-level message definition. The first element of the returned slice is the highest-level parent.
func (*MessageDefinition) ProtoName ¶
func (m *MessageDefinition) ProtoName() string
ProtoName returns the dot-delimited, fully-qualified protobuf name of the message.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is the place of descriptors resolving
func (*Registry) FieldComments ¶
func (r *Registry) FieldComments(message *MessageDefinition, field *descriptor.FieldDescriptorProto) (DefinitionComments, error)
FieldComments ...
func (*Registry) FileComments ¶
func (r *Registry) FileComments(file *descriptor.FileDescriptorProto) (DefinitionComments, error)
FileComments comment of file
func (*Registry) MessageDefinition ¶
func (r *Registry) MessageDefinition(name string) *MessageDefinition
MessageDefinition by name
func (*Registry) MethodComments ¶
func (r *Registry) MethodComments(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto, method *descriptor.MethodDescriptorProto) (DefinitionComments, error)
MethodComments comment of method
func (*Registry) MethodInputDefinition ¶
func (r *Registry) MethodInputDefinition(method *descriptor.MethodDescriptorProto) *MessageDefinition
MethodInputDefinition returns MethodInputDefinition
func (*Registry) MethodOutputDefinition ¶
func (r *Registry) MethodOutputDefinition(method *descriptor.MethodDescriptorProto) *MessageDefinition
MethodOutputDefinition returns MethodOutputDefinition
func (*Registry) ServiceComments ¶
func (r *Registry) ServiceComments(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto) (DefinitionComments, error)
ServiceComments comments of service
Click to show internal directories.
Click to hide internal directories.