core

package
v0.0.0-...-2deb099 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMysqlTypeToProtoType

func ConvertMysqlTypeToProtoType(fieldSlic []SqlFieldDesc) string

convert mysql type to proto type

func DealServerName

func DealServerName(tableName string) string

处理名称

func FirstToUpper

func FirstToUpper(s string) string

首字母大写其他小写

func Generator

func Generator(connString string, tableName string, fileDir string, packageName string)

生成proto文件

func GetBetweenStr

func GetBetweenStr(str, start, end string) string

func GetDB

func GetDB(connString string) *sql.DB

func PathExists

func PathExists(path string) (bool, error)

func WriteFile

func WriteFile(fileDir string, fileName string, file string, mode os.FileMode) error

写入文件

Types

type SqlFieldDesc

type SqlFieldDesc struct {
	COLUMN_NAME    string
	COLUMN_COMMENT string
	COLUMN_TYPE    string
}

func GetMysqlStruct

func GetMysqlStruct(connString string, tableName string) ([]SqlFieldDesc, error)

获取mysql结构的slic

Jump to

Keyboard shortcuts

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