Documentation ¶
Index ¶
- Variables
- func ConvertGoTypeToTsType(goType string) string
- func ConvertTagToRules(tagString string) ([]string, error)
- func FindBeginEndOfLocaleField(data, target string) (int, int)
- func GenCRUDLogic(_ *cobra.Command, _ []string) error
- func GetRuleType(t string) string
- func GetRules(t spec.Member) string
- type GenContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // VarStringOutput describes the output. VarStringOutput string // VarStringApiFile describes the api file path VarStringApiFile string // VarStringFolderName describes the folder name to output dir VarStringFolderName string // VarStringApiPrefix describes the request URL's prefix VarStringApiPrefix string // VarStringModelName describes the model name VarStringModelName string // VarStringSubFolder describes the sub folder name VarStringSubFolder string // VarBoolOverwrite describes whether to overwrite the files, it will overwrite all generated files. VarBoolOverwrite bool )
Functions ¶
func ConvertGoTypeToTsType ¶
func ConvertTagToRules ¶
ConvertTagToRules converts validator tag to rules.
func GenCRUDLogic ¶
GenCRUDLogic is used to generate CRUD file for simple admin backend UI
func GetRuleType ¶
GetRuleType returns the rule type from go type.
Types ¶
type GenContext ¶
type GenContext struct { ApiDir string ModelDir string ViewDir string Prefix string ModelName string LocaleDir string FolderName string SubFolderName string ApiSpec *spec.ApiSpec UseUUID bool HasStatus bool HasState bool Overwrite bool }
func (GenContext) Validate ¶
func (g GenContext) Validate() error
Click to show internal directories.
Click to hide internal directories.