descriptor

package
v0.0.0-...-8328a67 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePathTemplateToGinFormat

func ParsePathTemplateToGinFormat(pathTemplate string) string

Types

type Descriptor

type Descriptor struct {
	FileToGenerate []*FileDescriptorExtension
	Repository     DescriptorRepository
}

type DescriptorRepository

type DescriptorRepository struct {
	Files    map[string]*FileDescriptorExtension
	Messages map[string]*MessageDescriptorExtension
	Enums    map[string]*EnumDescriptorExtension
}

type DomainInfo

type DomainInfo struct {
	Name                string
	NameLower           string
	IsSingular          bool
	DBTableName         string
	DBTimestampTracking bool
}

type EnumDescriptorExtension

type EnumDescriptorExtension struct {
	FileExtension *FileDescriptorExtension
	*descriptor.EnumDescriptorProto
	NestedPath []string
}

EnumDescriptorExtension wraps descriptor.EnumDescriptorProto for richer features.

func NewEnumDescriptorExtension

func NewEnumDescriptorExtension(file *FileDescriptorExtension, enum *descriptor.EnumDescriptorProto, nestedPath []string) *EnumDescriptorExtension

func (*EnumDescriptorExtension) GetFullName

func (eext *EnumDescriptorExtension) GetFullName() string

type FieldDescriptorExtension

type FieldDescriptorExtension struct {
	MessageExtension *MessageDescriptorExtension
	*descriptor.FieldDescriptorProto
	DBColumnName       string
	DBColumnType       string
	DBPrimaryKey       bool
	DBColumnConstraint []string
}

FieldDescriptorExtension wraps descriptor.FieldDescriptorProto for richer features.

func (*FieldDescriptorExtension) GetGormTag

func (fext *FieldDescriptorExtension) GetGormTag() string

func (*FieldDescriptorExtension) GetTypeGo

func (fext *FieldDescriptorExtension) GetTypeGo() string

type FileDescriptorExtension

type FileDescriptorExtension struct {
	*descriptor.FileDescriptorProto
	MessageExtension []*MessageDescriptorExtension
	EnumExtension    []*EnumDescriptorExtension
	ServiceExtension []*ServiceDescriptorExtension
}

type MessageDescriptorExtension

type MessageDescriptorExtension struct {
	FileExtension *FileDescriptorExtension
	*descriptor.DescriptorProto
	FieldExtension []*FieldDescriptorExtension
	NestedPath     []string
	Domain         *DomainInfo
}

MessageDescriptorExtension wraps descriptor.MessageDescriptorProto for richer features.

func NewMessageDescriptorExtension

func NewMessageDescriptorExtension(file *FileDescriptorExtension, message *descriptor.DescriptorProto, nestedPath []string) (*MessageDescriptorExtension, error)

func (*MessageDescriptorExtension) GetFullName

func (mext *MessageDescriptorExtension) GetFullName() string

func (*MessageDescriptorExtension) GetPrimaryKey

func (mext *MessageDescriptorExtension) GetPrimaryKey() []*FieldDescriptorExtension

func (*MessageDescriptorExtension) GetPrimaryKeyAsString

func (mext *MessageDescriptorExtension) GetPrimaryKeyAsString(prefix, suffix, delimiter string, toLower bool) string

func (*MessageDescriptorExtension) GetPrimaryKeyDBColumnAsString

func (mext *MessageDescriptorExtension) GetPrimaryKeyDBColumnAsString(prefix, suffix, delimiter string) string

func (*MessageDescriptorExtension) GetPrimaryKeyQueryStatement

func (mext *MessageDescriptorExtension) GetPrimaryKeyQueryStatement() string

func (*MessageDescriptorExtension) GetPrimaryKeyWithTypeAsString

func (mext *MessageDescriptorExtension) GetPrimaryKeyWithTypeAsString(prefix, suffix, delimiter string, toLower bool) string

type MethodDescriptorExtension

type MethodDescriptorExtension struct {
	ServiceExtension *ServiceDescriptorExtension
	*descriptor.MethodDescriptorProto
	RequestType           *MessageDescriptorExtension
	ResponseType          *MessageDescriptorExtension
	HTTPMethod            string
	PathTemplate          string
	PathTemplateGinFormat string
	Body                  string
}

MethodDescriptorExtension wraps descriptor.MethodDescriptorProto for richer features.

type ServiceDescriptorExtension

type ServiceDescriptorExtension struct {
	Repository    DescriptorRepository
	FileExtension *FileDescriptorExtension
	*descriptor.ServiceDescriptorProto
	MethodExtension []*MethodDescriptorExtension
}

ServiceDescriptorExtension wraps descriptor.ServiceDescriptorProto for richer features.

Jump to

Keyboard shortcuts

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