Versions in this module Expand all Collapse all v1 v1.14.6 Aug 24, 2025 v1.14.5 Aug 24, 2025 v1.14.4 Aug 3, 2025 v1.14.3 Jul 27, 2025 v1.14.2 Jul 20, 2025 v1.14.1 Jul 19, 2025 v1.14.0 Jun 22, 2025 v1.13.2 May 18, 2025 v1.13.1 Apr 12, 2025 v1.13.0 Apr 12, 2025 v1.12.8 Mar 2, 2025 v1.12.7 Feb 16, 2025 v1.12.6 Feb 8, 2025 v1.12.5 Jan 25, 2025 v1.12.3 Jan 20, 2025 v1.12.2 Jan 19, 2025 v1.12.1 Dec 19, 2024 v1.12.0 Dec 19, 2024 Changes in this version + const CodeTypeCrudInfo + const CodeTypeDAO + const CodeTypeHandler + const CodeTypeJSON + const CodeTypeModel + const CodeTypeProto + const CodeTypeService + const CodeTypeTableInfo + const DBDriverMongodb + const DBDriverMysql + const DBDriverPostgresql + const DBDriverSqlite + const DBDriverTidb + const ProtoSubStructKey + const SubStructKey + const TableName + func ConvertToSQLByMgoFields(tableName string, fields []*MgoField) (string, map[string]string) + func ConvertToSQLByPgFields(tableName string, fields PGFields) (string, map[string]string) + func GetMysqlTableInfo(dsn, tableName string) (string, error) + func GetSqliteTableInfo(dbFile string, tableName string) (string, error) + func GetTableInfo(dsn, tableName string) (string, error) + func MgoFieldToGoStruct(name string, fs []*MgoField) string + func ParseSQL(sql string, options ...Option) (map[string]string, error) + func SetJSONTagCamelCase() + func SetJSONTagSnakeCase() + func UnMarshalTableInfo(data string) (map[string]interface{}, error) + type Codes struct + HandlerStruct []string + Model []string + ModelJSON []string + UpdateFields []string + type CrudInfo struct + ColumnName string + ColumnNameCamel string + ColumnNameCamelFCL string + ColumnNamePluralCamel string + ColumnNamePluralCamelFCL string + GoType string + GoTypeFCU string + IsCommonType bool + IsStandardPrimaryKey bool + IsStringType bool + PrimaryKeyColumnName string + ProtoType string + TableNameCamel string + TableNameCamelFCL string + TableNamePluralCamel string + TableNamePluralCamelFCL string + func (info *CrudInfo) CheckCommonType() bool + func (info *CrudInfo) GetGRPCProtoValidation() string + func (info *CrudInfo) GetWebProtoValidation() string + type Field struct + ColumnComment string + ColumnName string + ColumnNameCamel string + ColumnNameCamelFCL string + GoType string + IsPrimaryKey bool + Tag string + type MgoField struct + Comment string + Name string + ObjectStr string + ProtoObjectStr string + Type string + func GetMongodbTableInfo(dsn string, tableName string) ([]*MgoField, error) + type NullStyle int + const NullDisable + const NullInPointer + const NullInSql + type Option func(*options) + func WithCharset(charset string) Option + func WithCollation(collation string) Option + func WithColumnPrefix(p string) Option + func WithCustomTemplate() Option + func WithDBDriver(driver string) Option + func WithEmbed() Option + func WithExtendedAPI() Option + func WithFieldTypes(fieldTypes map[string]string) Option + func WithForceTableName() Option + func WithGormType() Option + func WithJSONTag(namedType int) Option + func WithNoNullType() Option + func WithNullStyle(s NullStyle) Option + func WithPackage(pkg string) Option + func WithTablePrefix(p string) Option + func WithWebProto() Option + type PGField struct + Comment string + IsPrimaryKey bool + Length int + Lengthvar int + Name string + Notnull bool + Type string + type PGFields []*PGField + func GetPostgresqlTableInfo(dsn string, tableName string) (PGFields, error) + type PrimaryKey struct + GoType string + GoTypeFCU string + IsStringType bool + Name string + NameCamel string + NameCamelFCL string + NamePluralCamel string + NamePluralCamelFCL string + type SqliteField struct + Cid int + DefaultValue string + Name string + Notnull int + Pk int + Type string + type SqliteFields []*SqliteField + type TableInfo struct + ColumnSubMessage string + ColumnSubStructure string + Columns []Field + DBDriver string + PrimaryKey *PrimaryKey + TableComment string + TableName string + TableNameCamel string + TableNameCamelFCL string + TableNamePluralCamel string + TableNamePluralCamelFCL string + TableNamePrefix string + TableNameSnake string