Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DefaultFormat defines a default naming style
DefaultFormat = "gozero"
)
Variables ¶
View Source
var ( // Cmd describes a bug command. Cmd = cobrax.NewCommand("config") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // NamingFormat is used to define the naming format of the generated file name. // just like time formatting, you can specify the formatting style through the // two format characters go, and zero. for example: snake format you can // define as go_zero, camel case format you can it is defined as goZero, // and even split characters can be specified, such as go#zero. in theory, // any combination can be used, but the prerequisite must meet the naming conventions // of each operating system file name. // Note: NamingFormat is based on snake or camel string NamingFormat string `yaml:"namingFormat"` }
Config defines the file naming style
type External ¶ added in v1.6.5
type External struct { // Model is the configuration for the model code generation. Model Model `yaml:"model,omitempty"` }
Config defines the file naming style
func GetExternalConfig ¶ added in v1.6.6
type Model ¶ added in v1.6.5
type Model struct { // TypesMap: custom Data Type Mapping Table. TypesMap map[string]ModelTypeMapOption `yaml:"types_map,omitempty" ` }
Model defines the configuration for the model code generation.
type ModelTypeMapOption ¶ added in v1.6.5
type ModelTypeMapOption struct { // Type: valid when not using UnsignedType and NullType. Type string `yaml:"type"` // UnsignedType: valid when not using NullType. UnsignedType string `yaml:"unsigned_type,omitempty"` // NullType: priority use. NullType string `yaml:"null_type,omitempty"` // Pkg defines the package of the custom type. Pkg string `yaml:"pkg,omitempty"` }
ModelTypeMapOption custom Type Options.
Click to show internal directories.
Click to hide internal directories.