Documentation ¶
Index ¶
- Variables
- func BuildTypes(types []spec.Type, config *config.Config) (string, error)
- func Category() string
- func Clean() error
- func ConvertRoutePathToSwagger(data string) string
- func DoGenProject(apiFile, dir, style string, g *GenContext) error
- func GenCRUDLogicByEnt(_ *cobra.Command, _ []string) error
- func GenCRUDLogicByProto(_ *cobra.Command, _ []string) error
- func GenEntTx(dir, style, rootPkg string) error
- func GenErrorHandler(dir, style, rootPkg string) error
- func GenTemplates() error
- func GoCommand(_ *cobra.Command, _ []string) error
- func RevertTemplate(name string) error
- func Update() error
- type GenContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // VarStringDir describes the directory. VarStringDir string // VarStringAPI describes the API. VarStringAPI string // VarStringHome describes the go home. VarStringHome string // VarStringRemote describes the remote git repository. VarStringRemote string // VarStringBranch describes the branch. VarStringBranch string // VarStringStyle describes the style of output files. VarStringStyle string // VarBoolErrorTranslate describes whether to translate error VarBoolErrorTranslate bool // VarBoolUseCasbin describe whether to use Casbin VarBoolUseCasbin bool // VarBoolUseI18n describe whether to use i18n VarBoolUseI18n bool // VarStringProto describe the proto file path VarStringProto string // VarStringAPIServiceName describe the API service name VarStringAPIServiceName string // VarStringRPCServiceName describe the RPC service name VarStringRPCServiceName string // VarStringModelName describe which model for generating VarStringModelName string // VarIntSearchKeyNum describe the number of search keys VarIntSearchKeyNum int // VarStringOutput describes the output. VarStringOutput string // VarStringRpcName describes the rpc name in service context VarStringRpcName string // VarStringGrpcPbPackage describes the grpc package VarStringGrpcPbPackage string // VarBoolMultiple describes whether the proto contains multiple services VarBoolMultiple bool // VarStringJSONStyle describes the JSON tag format. VarStringJSONStyle string // VarBoolOverwrite describes whether to overwrite the files, it will overwrite all generated files. VarBoolOverwrite bool // VarStringSchema describes the ent schema path VarStringSchema string // VarStringGroupName describes whether to use group VarStringGroupName string // VarStringImportPrefix describes the prefix in import VarStringImportPrefix string // VarStringExtraField describes the extra field for api logic code such as user id VarStringExtraField string // VarBoolDisabledValidator describes whether to disable validator VarBoolDisabledValidator bool // VarBoolOptionalService describes whether to generate for optional service VarBoolOptionalService bool )
Functions ¶
func BuildTypes ¶
BuildTypes gen types to string
func ConvertRoutePathToSwagger ¶
ConvertRoutePathToSwagger converts route path to swagger format.
func DoGenProject ¶
func DoGenProject(apiFile, dir, style string, g *GenContext) error
DoGenProject gen go project files with api file
func GenErrorHandler ¶
func RevertTemplate ¶
RevertTemplate reverts the given enttemplate file to the default value.
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.