Documentation ¶
Index ¶
- Variables
- func Command(coms []string) ([][]byte, error)
- func MakeCmd(packageName, name string) error
- func MakeDeployments(name string) error
- func MakeInternal(packageName, name string) error
- func MakeModel(name, modelo, schemaVar string) error
- func MakePkg(name, schema, schemaVar string) error
- func MakeProject(name string) error
- func MakeRest(name string) error
- func MakeTest(name string) error
- func MakeWeb(name string) error
- func MkMicroservice(packageName, name, schema string) error
- func MkMolue(name, modelo, schema string) error
- func MkPMicroservice(packageName, name, author, schema string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdCreate = &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() }, }
View Source
var CmdMicro = &cobra.Command{ Use: "micro [name schema, schema_var]", 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 := utilities.ModuleName() if err != nil { fmt.Printf("Prompt failed %v\n", err) return } name, err := prompStr("Name") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } schema, err := prompStr("Schema") 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) { name, err := prompStr("Package") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } modelo, err := prompStr("Model") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } schema, err := prompStr("Schema") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } err = MkMolue(name, modelo, schema) if err != nil { fmt.Printf("Command failed %v\n", err) return } }, }
View Source
var CmdPMicro = &cobra.Command{ Use: "micro [name author schema, schema_var]", 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 := utilities.ModuleName() if err != nil { fmt.Printf("Prompt failed %v\n", err) return } name, err := prompStr("Name") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } author, err := prompStr("Author") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } schema, err := prompStr("Schema") if err != nil { fmt.Printf("Prompt failed %v\n", err) return } err = MkPMicroservice(packageName, name, author, schema) if err != nil { fmt.Printf("Command failed %v\n", err) return } }, }
Functions ¶
func MakeDeployments ¶
func MakeInternal ¶
func MakeProject ¶
func MkMicroservice ¶
func MkPMicroservice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.