Documentation ¶
Overview ¶
Package generate is to generate code, including model, cache, dao, handler, http, service, rpc, rpc-gw, rpc-cli code.
Index ¶
- Constants
- Variables
- func CacheCommand(parentName string) *cobra.Command
- func ConfigCommand() *cobra.Command
- func ConvertSwagJSONCommand(parentName string) *cobra.Command
- func DaoCommand(parentName string) *cobra.Command
- func HTTPCommand() *cobra.Command
- func HTTPPbCommand() *cobra.Command
- func HandlerCommand() *cobra.Command
- func HandlerPbCommand() *cobra.Command
- func Init(name string, filepath string) error
- func InitFS(name string, filepath string, fs embed.FS)
- func ModelCommand(parentName string) *cobra.Command
- func ProtoBufCommand() *cobra.Command
- func RPCCommand() *cobra.Command
- func RPCConnectionCommand() *cobra.Command
- func RPCGwPbCommand() *cobra.Command
- func RPCPbCommand() *cobra.Command
- func ServiceCommand() *cobra.Command
- type Template
Constants ¶
const (
// TplNameSponge name of the template
TplNameSponge = "sponge"
)
Variables ¶
var Replacers = map[string]replacer.Replacer{}
Replacers replacer name
Functions ¶
func CacheCommand ¶ added in v1.4.2
CacheCommand generate cache code
func ConfigCommand ¶
ConfigCommand convert yaml to struct command
func ConvertSwagJSONCommand ¶ added in v1.4.2
ConvertSwagJSONCommand convert 64-bit fields type string to integer
func HTTPPbCommand ¶ added in v1.2.0
HTTPPbCommand generate web service code based on protobuf file
func HandlerPbCommand ¶ added in v1.5.0
HandlerPbCommand generate handler and protobuf code
func ModelCommand ¶
ModelCommand generate model code
func ProtoBufCommand ¶ added in v1.2.0
ProtoBufCommand generate protobuf code
func RPCCommand ¶ added in v1.2.0
RPCCommand generate rpc service code
func RPCConnectionCommand ¶ added in v1.4.2
RPCConnectionCommand generate rpc connection code
func RPCGwPbCommand ¶ added in v1.2.0
RPCGwPbCommand generate rpc gateway service code base on protobuf file
func RPCPbCommand ¶ added in v1.2.0
RPCPbCommand generate rpc service code bash on protobuf file