generate

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// TplNameSponge name of the template
	TplNameSponge = "sponge"
)

Variables

View Source
var Replacers = map[string]replacer.Replacer{}

Replacers replacer name

Functions

func ConfigCommand

func ConfigCommand() *cobra.Command

ConfigCommand covert yaml to struct command

func DaoCommand

func DaoCommand(parentName string) *cobra.Command

DaoCommand generate dao codes

func HTTPCommand

func HTTPCommand() *cobra.Command

HTTPCommand generate http service codes

func HTTPPbCommand added in v1.2.0

func HTTPPbCommand() *cobra.Command

HTTPPbCommand generate http service codes based on protobuf file

func HandlerCommand

func HandlerCommand() *cobra.Command

HandlerCommand generate handler codes

func Init

func Init(name string, filepath string) error

Init initializing the template

func InitFS

func InitFS(name string, filepath string, fs embed.FS)

InitFS initializing th FS templates

func ModelCommand

func ModelCommand(parentName string) *cobra.Command

ModelCommand generate model codes

func ProtoBufCommand added in v1.2.0

func ProtoBufCommand() *cobra.Command

ProtoBufCommand generate protobuf codes

func RPCClientCommand added in v1.2.0

func RPCClientCommand() *cobra.Command

RPCClientCommand generate rpc client codes

func RPCCommand added in v1.2.0

func RPCCommand() *cobra.Command

RPCCommand generate rpc service codes

func RPCGwPbCommand added in v1.2.0

func RPCGwPbCommand() *cobra.Command

RPCGwPbCommand generate rpc gateway service codes base on protobuf file

func RPCPbCommand added in v1.2.0

func RPCPbCommand() *cobra.Command

RPCPbCommand generate rpc service codes bash on protobuf file

func ServiceCommand

func ServiceCommand() *cobra.Command

ServiceCommand generate service codes

Types

type Template

type Template struct {
	Name     string
	FS       embed.FS
	FilePath string
}

Template information

Jump to

Keyboard shortcuts

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