Documentation ¶
Overview ¶
* * @Author: TheLife * @Date: 2021/7/22 下午4:18
* * @Author: TheLife * @Date: 2021/7/19 下午5:19
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RestCmd = &cobra.Command{ Use: "create", Short: "generate a RESTful codebase from SQL database", Long: `generate a RESTful APIs app with gin and gorm for gophers`, Example: example, RunE: func(cmd *cobra.Command, args []string) (err error) { return err }, }
RestCmd represents the rest command
Functions ¶
This section is empty.
Types ¶
type App ¶
func (*App) ListAppFileTree ¶
type ColumnCommentTag ¶
type ColumnSchema ¶
type ColumnSchema struct { TableName string ColumnName string ColumnType string ColumnDataType string ColumnComment string ColumnKey string }
func FetchDbColumn ¶
func FetchDbColumn(gb GinPlay) ([]ColumnSchema, error)
func (*ColumnSchema) ToProperty ¶
func (c *ColumnSchema) ToProperty(authTable, passwordColumn string) Property
type GinPlay ¶
type GinPlay struct { AppPkg string `json:"app_pkg" form:"app_pkg"` AppDir string `json:"app_dir" form:"app_dir"` AppAddr string `json:"app_addr" form:"app_addr"` AppPort int `json:"app_port" form:"app_port"` AuthTable string `json:"auth_table" form:"auth_table"` AuthColumn string `json:"auth_column" form:"auth_column"` AuthType AuthType `json:"account_auth_type" form:"account_auth_type"` DbType string `json:"db_type" form:"db_type"` DbUser string `json:"db_user" form:"db_user"` DbPassword string `json:"db_password" form:"db_password"` DbAddr string `json:"db_addr" form:"db_addr"` DbPort int `json:"db_port" form:"db_port"` DbName string `json:"db_name" form:"db_name"` DbChar string `json:"db_char" form:"db_char"` }
Click to show internal directories.
Click to hide internal directories.