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 ¶
View Source
const (
// TplNameSponge name of the template
TplNameSponge = "sponge"
)
Variables ¶
View Source
var Replacers = map[string]replacer.Replacer{}
Replacers replacer name
Functions ¶
func CacheCommand ¶
CacheCommand generate cache code
func ConfigCommand ¶
ConfigCommand convert yaml to struct command
func ConvertSwagJSONCommand ¶
ConvertSwagJSONCommand convert 64-bit fields type string to integer
func HTTPPbCommand ¶
HTTPPbCommand generate web service code based on protobuf file
func HandlerPbCommand ¶
HandlerPbCommand generate handler and protobuf code
func ModelCommand ¶
ModelCommand generate model code
func RPCConnectionCommand ¶
RPCConnectionCommand generate rpc connection code
func RPCGwPbCommand ¶
RPCGwPbCommand generate rpc gateway service code base on protobuf file
func RPCPbCommand ¶
RPCPbCommand generate rpc service code bash on protobuf file
Types ¶
Click to show internal directories.
Click to hide internal directories.