kratos: github.com/bilibili/kratos/tool/protobuf/pkg/typemap Index | Files

package typemap

import "github.com/bilibili/kratos/tool/protobuf/pkg/typemap"

Index

Package Files

typemap.go

type DefinitionComments Uses

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

// ignored detached comments.

type MessageDefinition Uses

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 Uses

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 Uses

func (m *MessageDefinition) ProtoName() string

ProtoName returns the dot-delimited, fully-qualified protobuf name of the message.

type Registry Uses

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

Registry is the place of descriptors resolving

func New Uses

func New(files []*descriptor.FileDescriptorProto) *Registry

New Registry

func (*Registry) FieldComments Uses

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

FieldComments ...

func (*Registry) FileComments Uses

func (r *Registry) FileComments(file *descriptor.FileDescriptorProto) (DefinitionComments, error)

FileComments comment of file

func (*Registry) MessageDefinition Uses

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

MessageDefinition by name

func (*Registry) MethodComments Uses

func (r *Registry) MethodComments(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto, method *descriptor.MethodDescriptorProto) (DefinitionComments, error)

MethodComments comment of method

func (*Registry) MethodInputDefinition Uses

func (r *Registry) MethodInputDefinition(method *descriptor.MethodDescriptorProto) *MessageDefinition

MethodInputDefinition returns MethodInputDefinition

func (*Registry) MethodOutputDefinition Uses

func (r *Registry) MethodOutputDefinition(method *descriptor.MethodDescriptorProto) *MessageDefinition

MethodOutputDefinition returns MethodOutputDefinition

func (*Registry) ServiceComments Uses

func (r *Registry) ServiceComments(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto) (DefinitionComments, error)

ServiceComments comments of service

Package typemap imports 3 packages (graph) and is imported by 3 packages. Updated 2019-05-16. Refresh now. Tools for package owners.