Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeParser ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetFieldDesc ¶
func (*Config) GetIndexes ¶
type Configs ¶
type Configs struct {
// contains filtered or unexported fields
}
func GenerateConfigs ¶
func GenerateConfigs(tables []Table, typeParser TypeParser, codeParser CodeParser, dataParser DataParser) *Configs
func (*Configs) GenerateCode ¶
type DataParser ¶
type Field ¶
type Field interface { // GetIndex 获取字段索引值 // - 当返回值 <= 0 时为非索引字段 GetIndex() int // GetName 字段名称 GetName() string // GetDesc 字段描述 GetDesc() string // GetType 字段类型 GetType() string // GetParam 字段参数 GetParam() string // IsIgnore 是否忽略 IsIgnore() bool // Query 数据查询 Query(pos int) (val map[string]any, skip, end bool) }
type StructField ¶
type StructFieldWrapper ¶
type StructFieldWrapper struct { StructField Desc string }
type StructType ¶
type StructType struct { Name string Fields []*StructField }
type Table ¶
type Table interface { // GetName 是用于代码生成的配置文件结构名称 GetName() string // GetDescribe 用于生成的结构注释 GetDescribe() string // GetIndex 获取索引数量 GetIndex() int // GetFields 获取配置结构的字段 GetFields() FieldScanner // IsIgnore 是否忽略该表 IsIgnore() bool }
type TypeParser ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.