generatecmd

package
v0.0.0-...-c75f131 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdGenAll = &cobra.Command{
	Use:   "all",
	Short: "Generate proto, openapi and wire",
	Long:  "Generate proto, openapi and wire",
	Run: func(cmd *cobra.Command, args []string) {
		dir := "api"
		if len(args) > 0 {
			dir = args[0]
		}

		GenerateAll(dir)
	},
}
View Source
var CmdGenOpenApi = &cobra.Command{
	Use:   "openapi",
	Short: "Generate openapi files",
	Long:  "Generate openapi files",
	Run: func(cmd *cobra.Command, args []string) {
		dir := "api"
		if len(args) > 0 {
			dir = args[0]
		}

		GenerateOpenAPI(dir)
	},
}
View Source
var CmdGenProto = &cobra.Command{
	Use:   "proto",
	Short: "Generate go files based on proto files",
	Long:  "Generate go files based on proto files",
	Run: func(cmd *cobra.Command, args []string) {
		dir := "api"
		if len(args) > 0 {
			dir = args[0]
		}

		GenerateProtos(dir)
	},
}
View Source
var CmdGenWire = &cobra.Command{
	Use:   "wire",
	Short: "generate wire injection files",
	Long:  "generate wire injection files",
	Run: func(cmd *cobra.Command, args []string) {
		GenerateWire()
	},
}
View Source
var CmdGenerate = &cobra.Command{
	Use:     "generate",
	Short:   "Generate files, such as go and openapi",
	Long:    "Generate files, include go files from proto files and wire inject and openapi files",
	Example: "mangokit generate [api, wire, openapi]",
}

Functions

func GenerateAll

func GenerateAll(dir string)

func GenerateOpenAPI

func GenerateOpenAPI(dir string) error

func GenerateProtos

func GenerateProtos(dir string) error

func GenerateWire

func GenerateWire() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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