cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DaoCommand = cli.Command{
	Name:      "dao",
	UsageText: "generate mysql table schema to go struct and CURD code",
	Flags: []cli.Flag{
		cli.StringFlag{Name: "host, H", Value: "localhost"},
		cli.IntFlag{Name: "port, P", Value: 3306},
		cli.StringFlag{Name: "user, u", Value: "root"},
		cli.StringFlag{Name: "password, p", Value: "123456"},
		cli.StringFlag{Name: "database, d", Required: true},
		cli.StringFlag{Name: "table, t", Required: true},
	},
	Action: DaoCommandAction,
}
View Source
var SchemaCommand = cli.Command{
	Name:        "schema",
	UsageText:   "",
	Description: "generate mysql table schema to go struct",
	Flags: []cli.Flag{
		cli.StringFlag{Name: "host, H", Value: "localhost"},
		cli.IntFlag{Name: "port, P", Value: 3306},
		cli.StringFlag{Name: "user, u", Value: "ginger_user"},
		cli.StringFlag{Name: "password, p", Value: "123456"},
		cli.StringFlag{Name: "database, d", Required: true},
		cli.StringFlag{Name: "table, t", Required: true},
	},
	Action: SchemaCommandAction,
}

Functions

func DaoCommandAction

func DaoCommandAction(c *cli.Context) error

func SchemaCommandAction

func SchemaCommandAction(c *cli.Context) error

Types

type DaoArgs

type DaoArgs struct {
	Database string
	Table    string
	User     string
	Password string
	Host     string
	Port     int
}

Jump to

Keyboard shortcuts

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