Documentation ¶
Index ¶
- Variables
- func Command(coms []string) ([][]byte, error)
- func DeleteCmd(packageName string) error
- func DeleteMicroservice(packageName string) error
- func MakeCmd(packageName, name string) error
- func MakeDeployments(name string) error
- func MakeEnv(packageName string) error
- func MakeGitignore(packageName string) error
- func MakeInternal(packageName, name, schema string) error
- func MakeModel(packageName, modelo, schema string) error
- func MakePkg(name, schema string) error
- func MakeProject(name string) error
- func MakeReadme(packageName string) error
- func MakeRpc(name, modelo string) error
- func MakeScripts(name string) error
- func MakeTest(name string) error
- func MakeWWW(name string) error
- func MkMicroservice(packageName, name, schema string) error
- func MkMolue(packageName, modelo, schema string) error
- func MkProject(packageName, name, author, schema string) error
- func MkRpc(name, modelo string) error
- func ProgressInit() *progressbar.ProgressBar
- func ProgressNext(step int) *progressbar.ProgressBar
- func PrompCreate()
- func PrompInt(label string, require bool) (int, error)
- func PrompStr(label string, require bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdMicro = &cobra.Command{ Use: "micro [name schema]", Short: "Create project base type microservice.", Long: "Template project to microservice include folder cmd, deployments, pkg, rest, test and web, with files .go required for making a microservice.", Run: func(cmd *cobra.Command, args []string) { packageName, err := utility.GoMod("module") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } name, err := PrompStr("Name", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } schema, err := PrompStr("Schema", false) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } err = MkMicroservice(packageName, name, schema) if err != nil { fmt.Printf("Command failed %v\n", err) return } }, }
View Source
var CmdModelo = &cobra.Command{ Use: "modelo [name modelo, schema]", Short: "Create model to microservice.", Long: "Template model to microservice include function handler model.", Run: func(cmd *cobra.Command, args []string) { packageName, err := PrompStr("Package", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } modelo, err := PrompStr("Model", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } schema, err := PrompStr("Schema", false) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } err = MkMolue(packageName, modelo, schema) if err != nil { fmt.Printf("Command failed %v\n", err) return } title := strs.Titlecase(packageName) message := strs.Format(`Remember, including the router, that it is on the bottom of the h%s.go, in routers section of the router.go file`, title) fmt.Println(message) }, }
View Source
var CmdProject = &cobra.Command{ Use: "micro [name author schema]", Short: "Create project base type microservice.", Long: "Template project to microservice include folder cmd, deployments, pkg, rest, test and web, with files .go required for making a microservice.", Run: func(cmd *cobra.Command, args []string) { packageName, err := utility.GoMod("module") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } name, err := PrompStr("Name", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } author, err := PrompStr("Author", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } schema, err := PrompStr("Schema", false) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } err = MkProject(packageName, name, author, schema) if err != nil { fmt.Printf("Command failed %v\n", err) return } }, }
View Source
var CmdRpc = &cobra.Command{ Use: "rpc [name]", Short: "Create rpc model to microservice.", Long: "Template rpc model to microservice include function handler model.", Run: func(cmd *cobra.Command, args []string) { name, err := PrompStr("Package", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } modelo, err := PrompStr("Model", true) if err != nil { fmt.Printf("Prompt failed %v\n", err) return } err = MkRpc(name, modelo) if err != nil { fmt.Printf("Command failed %v\n", err) return } }, }
View Source
var Create = &cobra.Command{ Use: "create", Short: "You can created Microservice.", Long: "Template project to create microservice include required folders and basic files.", Run: func(cmd *cobra.Command, args []string) { PrompCreate() }, }
Functions ¶
func MakeDeployments ¶
func MakeGitignore ¶ added in v0.0.175
func MakeInternal ¶
func MakeProject ¶
func MakeReadme ¶ added in v0.0.73
func MakeScripts ¶ added in v0.0.44
func MkMicroservice ¶
func ProgressInit ¶ added in v0.0.57
func ProgressInit() *progressbar.ProgressBar
func ProgressNext ¶ added in v0.0.57
func ProgressNext(step int) *progressbar.ProgressBar
func PrompCreate ¶ added in v0.0.57
func PrompCreate()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.