Documentation ¶
Index ¶
- Constants
- func CarGen(name, dbName, grpcPath, grpcPkgName, distPath, distPkg string)
- func CreateApiRouter(genPath string)
- func GormGen(path, dsn, name string, tables []string)
- func KitexGen(name, path string)
- func ModelToProtobuf(path, protoPkg, goPkg, modelPath, modelName string)
- type Config
- type FileInfo
- type Generator
- type ServiceField
- type ServiceFileInfo
- type TableInfo
Constants ¶
View Source
const ( GenGrpc = "grpc" GenDB = "database" GenDoc = "doc" GenRouter = "router" )
Variables ¶
This section is empty.
Functions ¶
func ModelToProtobuf ¶
func ModelToProtobuf(path, protoPkg, goPkg, modelPath, modelName string)
Types ¶
type Config ¶
type Generator ¶
type Generator struct { Model string PkgPath string PkgName string DistPath string DistPkg string DbName string ServiceFields []ServiceField MethodImports []string ServiceFiles []ServiceFileInfo // contains filtered or unexported fields }
type ServiceField ¶
type TableInfo ¶ added in v1.1.6
type TableInfo struct { Generated bool // whether to generate db model FileName string // generated file name S string // the first letter(lower case)of simple Name (receiver) QueryStructName string // internal query struct name ModelStructName string // origin/model struct name TableName string // table name in db server }
Click to show internal directories.
Click to hide internal directories.