v0.0.3 Latest Latest

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

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type DefinitionComments

type DefinitionComments struct {
	Leading         string
	Trailing        string
	LeadingDetached []string

// 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 New

New Registry

func (*Registry) FieldComments

func (r *Registry) FieldComments(message *MessageDefinition, field *descriptor.FieldDescriptorProto) (DefinitionComments, error)

FieldComments ...

func (*Registry) FileComments

FileComments comment of file

func (*Registry) MessageDefinition

func (r *Registry) MessageDefinition(name string) *MessageDefinition

MessageDefinition by name

func (*Registry) MethodComments

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

ServiceComments comments of service

Jump to

Keyboard shortcuts

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