cmd

package
v0.0.0-...-2611440 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "mskit",
	Short: "micro service kit",
	Run: func(cmd *cobra.Command, args []string) {
		if err := cmd.Help(); err != nil {
			os.Exit(1)
		}
	},
}

RootCmd is the root command of kit

View Source
var (
	SupportTransports = []string{"http", "grpc"}
)

Functions

func Execute

func Execute()

Execute runs the root command

Types

type Factory

type Factory interface {
	Generate() error // generate something based on already created one
}

type ServiceFactory

type ServiceFactory struct {
	Meta   *option.ServiceMeta
	Option *option.GenerateOption
}

ServiceFactory is the main entry to generate different elements

func NewServiceFactory

func NewServiceFactory(rootDir string) (*ServiceFactory, error)

NewServiceFactory returns a initialized and ready generator.

func (*ServiceFactory) Generate

func (m *ServiceFactory) Generate() error

Generate generate service_impl.go

Jump to

Keyboard shortcuts

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