Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Options   *protobuf.ColumnOptions
	Tags      map[string]interface{}
	Name      string
	Signature string
}

    Column wraps Column information

    type Field

    type Field struct {
    	// Message is the message type which this field belongs to.
    	Message *Message
    	*descriptor.FieldDescriptorProto
    	Name   string
    	Column *Column
    }

      Field wraps descriptor.FieldDescriptorProto for richer features.

      type File

      type File struct {
      	*descriptor.FileDescriptorProto
      	// GoPkg is the go package of the go file generated from this file..
      	GoPkg GoPackage
      	// Messages is the list of messages defined in this file.
      	Messages []*Message
      	// Migration files directory
      	MigrationDir string
      }

        File wraps descriptor.FileDescriptorProto for richer features.

        type GoPackage

        type GoPackage struct {
        	// Path is the package path to the package.
        	Path string
        	// Name is the package name of the package
        	Name string
        	// Alias is an alias of the package unique within the current invokation of orm generator.
        	Alias string
        }

          GoPackage represents a golang package

          func (GoPackage) Standard

          func (p GoPackage) Standard() bool

            Standard returns whether the import is a golang standard package.

            type Message

            type Message struct {
            	// File is the file where the message is defined
            	File *File
            	// Outers is a list of outer messages if this message is a nested type.
            	Outers []string
            	*descriptor.DescriptorProto
            	TableOptions *protobuf.TableOptions
            	Fields       []*Field
            
            	// Index is proto path index of this message in File.
            	Index int
            }

              Message describes a protocol buffer message types

              func (*Message) FQMN

              func (m *Message) FQMN() string

                FQMN return register name

                type Option

                type Option struct {
                	MigrationDir string
                }

                  Option is used for user-provided flags

                  type Registry

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

                    Registry is a registry of information extracted from plugin.CodeGeneratorRequest.

                    func NewRegistry

                    func NewRegistry() *Registry

                      NewRegistry returns a new Registry.

                      func (*Registry) CommandLineParameters

                      func (r *Registry) CommandLineParameters(parameter string)

                        CommandLineParameters breaks the comma-separated list of key=value pairs and sets in Option

                        func (*Registry) Load

                        func (r *Registry) Load(req *plugin.CodeGeneratorRequest) error

                          Load loads definitions of services, methods, messages, enumerations and fields from "req".

                          func (*Registry) LookupFile

                          func (r *Registry) LookupFile(name string) (*File, error)

                            LookupFile looks up a file by name.

                            func (*Registry) LookupMsg

                            func (r *Registry) LookupMsg(location, name string) (*Message, error)

                              LookupMsg return Message using name