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 ¶
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
Click to show internal directories.
Click to hide internal directories.