handler

package
v1.0.1-0...-d19d8d5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var YamlExt = ".yaml"

YamlExt is local file ext

View Source
var YamlFile = ".gen-model"

YamlFile is config file

View Source
var YamlMap = "FieldMapper"

YamlMap is local mapper file suffix

Functions

func GenConfigYaml

func GenConfigYaml(cmdRequest *CmdRequest)

GenConfigYaml can generate config in app path

func Welcome

func Welcome()

Welcome slogan

Types

type CmdRequest

type CmdRequest struct {
	Db  dbConfig
	Gen genConfig
	Wg  sync.WaitGroup
}

CmdRequest is request arguments manager

func (*CmdRequest) CreateModelStruct

func (g *CmdRequest) CreateModelStruct()

CreateModelStruct handler

func (*CmdRequest) SetDataByViper

func (g *CmdRequest) SetDataByViper()

SetDataByViper bind viper value

type SchemaColumn

type SchemaColumn struct {
	ColumnName    string `gorm:"column:COLUMN_NAME"`
	ColumnKey     string `gorm:"column:COLUMN_KEY"`
	DataType      string `gorm:"column:DATA_TYPE"`
	IsNullable    string `gorm:"column:IS_NULLABLE"`
	ColumnComment string `gorm:"column:COLUMN_COMMENT"`
}

SchemaColumn show table information_schema.COLUMNS fields

func (*SchemaColumn) TableName

func (tc *SchemaColumn) TableName() string

TableName is gorm func

type SchemaTable

type SchemaTable struct {
	TableSchema    string `gorm:"column:TABLE_SCHEMA"`
	TableNameAlias string `gorm:"column:TABLE_NAME"`
}

SchemaTable show table information_schema.TABLES fields

func (*SchemaTable) TableName

func (tc *SchemaTable) TableName() string

TableName is gorm func

Jump to

Keyboard shortcuts

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