Documentation
¶
Index ¶
Constants ¶
View Source
const ( RPC = "RPC" HTTP = "HTTP" )
View Source
const ( Zk = "ZK" Nacos = "NACOS" Etcd = "ETCD" Polaris = "POLARIS" )
View Source
const ( OutDir = "out_dir" Verbose = "verbose" Template = "template" Service = "service" ServiceType = "type" Module = "module" IDLPath = "idl" Registry = "registry" Pass = "pass" ProtoSearchPath = "proto_search_path" DSN = "dsn" DBType = "db_type" Tables = "tables" OnlyModel = "only_model" OutFile = "out_file" UnitTest = "unittest" ModelPkgName = "model_pkg" Nullable = "nullable" Signable = "signable" IndexTag = "index_tag" TypeTag = "type_tag" )
View Source
const (
Standard = "standard"
)
Variables ¶
View Source
var OpenTypeFuncMap = map[DataBaseType]DialectorFunc{ MySQL: mysql.Open, SQLServer: sqlserver.Open, Sqlite: sqlite.Open, Postgres: postgres.Open, }
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
Verbose bool
*ServerArgument
*ClientArgument
*ModelArgument
*FallbackArgument
}
func GetGlobalArgs ¶
func GetGlobalArgs() *Argument
func NewArgument ¶
func NewArgument() *Argument
type ClientArgument ¶
type ClientArgument struct {
// Common Param
*CommonParam
SliceParam *SliceParam
Verbose bool
Template string
Cwd string
GoSrc string
GoPkg string
GoPath string
}
func NewClientArgument ¶
func NewClientArgument() *ClientArgument
func (*ClientArgument) ParseCli ¶
func (c *ClientArgument) ParseCli(ctx *cli.Context) error
type CommonParam ¶
type DataBaseType ¶
type DataBaseType string
const ( MySQL DataBaseType = "mysql" SQLServer DataBaseType = "sqlserver" Sqlite DataBaseType = "sqlite" Postgres DataBaseType = "postgres" )
type DialectorFunc ¶
type FallbackArgument ¶
func NewFallbackArgument ¶
func NewFallbackArgument() *FallbackArgument
func (*FallbackArgument) ParseCli ¶
func (c *FallbackArgument) ParseCli(ctx *cli.Context) error
type ModelArgument ¶
type ModelArgument struct {
DSN string
Type string
Tables []string
OnlyModel bool
OutPath string
OutFile string
WithUnitTest bool
ModelPkgName string
FieldNullable bool
FieldSignable bool
FieldWithIndexTag bool
FieldWithTypeTag bool
}
func NewModelArgument ¶
func NewModelArgument() *ModelArgument
func (*ModelArgument) ParseCli ¶
func (c *ModelArgument) ParseCli(ctx *cli.Context) error
type ServerArgument ¶
type ServerArgument struct {
// Common Param
*CommonParam
Template string
SliceParam *SliceParam
Verbose bool
Cwd string
GoSrc string
GoPkg string
GoPath string
}
func NewServerArgument ¶
func NewServerArgument() *ServerArgument
func (*ServerArgument) ParseCli ¶
func (s *ServerArgument) ParseCli(ctx *cli.Context) error
type SliceParam ¶
func (*SliceParam) WriteAnswer ¶
func (s *SliceParam) WriteAnswer(name string, value interface{}) error
Click to show internal directories.
Click to hide internal directories.