Documentation ¶
Index ¶
- Variables
- func Add(numberOne, numberTwo any) int
- func ApiToProto(Condition []Column, res, request string, page bool) string
- func CamelStr(name string) string
- func Char(in string) string
- func Convert(Condition []Column) string
- func GoInstall(path ...string) error
- func Helper(name string) string
- func InMethod(arr []Method, target ...string) bool
- func InitBase() error
- func InitConfig() error
- func InitPath() error
- func InitQuery() error
- func Json(Condition []Column) string
- func ModuleDaoConvertProto(Condition []Column, res, resItem string) string
- func ModulePath(filename string) (string, error)
- func ModuleProtoConvertDao(Condition []Column, res, request string) string
- func ModuleProtoConvertMap(Condition []Column, request string) string
- func ModuleVersion(path string) (string, error)
- func NewDataType() map[string]DataType
- func ParseVCSUrl(repo string) (*url.URL, error)
- func Pointer(in string) string
- func Props(table, condition []Column) string
- func ProtoRequest(condition []Column) string
- func RatelMod() string
- func Rule(table []Column) string
- func SymbolChar() string
- func Tree(path string, dir string)
- func TypeScript(Condition []Column) string
- func TypeScriptCondition(Condition []Column) string
- type Column
- type DaoParam
- type DataType
- type Index
- type Method
- type ModuleParam
- type Repo
- func (r *Repo) Clone(ctx context.Context) error
- func (r *Repo) CopyFrontTo(ctx context.Context, to string, modPath string, ignores []string) error
- func (r *Repo) CopyTo(ctx context.Context, to string, modPath string, ignores []string) error
- func (r *Repo) CopyToV2(ctx context.Context, to string, modPath string, ignores, replaces []string) error
- func (r *Repo) Path() string
- func (r *Repo) Pull(ctx context.Context) error
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var Config *config.Config
View Source
var Path string
View Source
var Query sql.SqlConn
Functions ¶
func ApiToProto ¶ added in v3.2.31
func ModuleDaoConvertProto ¶ added in v3.2.31
ModuleDaoConvertProto 条件转换
func ModulePath ¶
ModulePath returns go module path.
func ModuleProtoConvertDao ¶ added in v3.2.31
ModuleProtoConvertDao 条件转换
func ModuleProtoConvertMap ¶ added in v3.2.31
ModuleProtoConvertMap 条件转换
func ModuleVersion ¶
ModuleVersion returns module version.
func NewDataType ¶ added in v3.2.16
func ParseVCSUrl ¶
ParseVCSUrl ref https://github.com/golang/go/blob/master/src/cmd/go/internal/vcs/vcs.go see https://go-review.googlesource.com/c/go/+/12226/ git url define https://git-scm.com/docs/git-clone#_git_urls
func ProtoRequest ¶ added in v3.6.0
func TypeScriptCondition ¶ added in v3.7.21
Types ¶
type Column ¶ added in v3.2.16
type Column struct { ColumnName string `db:"COLUMN_NAME"` // 字段名 IsNullable string `db:"IS_NULLABLE"` // 是否为空 DataType string `db:"DATA_TYPE"` // 字段类型 ColumnKey string `db:"COLUMN_KEY"` // 是否索引 ColumnComment string `db:"COLUMN_COMMENT"` // 字段描述 PosiTion int64 // 排序信息 DataTypeMap DataType // 字段类型信息 AlisaColumnName string // 字段名 }
Column 字段新
func TableColumn ¶ added in v3.2.16
TableColumn 获取数据中表中字段的信息
type DataType ¶ added in v3.2.16
type DataType struct { Default string // 不空时 Empty string // 为空时 Proto string // Grpc 协议 OptionProto bool // Grpc 协议 TypeScript string // TypeScript Json string // Json }
DataType 字段类型信息
type Index ¶ added in v3.2.16
type Index struct { IndexName string `db:"INDEX_NAME"` // 索引名称 Field string `db:"FIELD"` // 索引作用字段 }
Index 索引信息
type Method ¶ added in v3.2.16
type Method struct { Type string // 方法类型(List多个/Item单条/Create新增/Update修改/Delete删除/Only单个) Name string // 函数名称 Alias string // 函数别名 Condition []Column // 函数需要的条件信息 ConditionTotal int // 条件数量 Table Table // 表信息 TableColumn []Column // 表结构信息 Pkg string // 包名 PkgPath string // 包名路径 Primary Column // 主键信息 ModName string // go.mod 信息 Page bool // 是否分页 SoftDelete bool // 是否删除 }
Method 构造的函数
type ModuleParam ¶ added in v3.2.16
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo is git repository manager.
func (*Repo) CopyFrontTo ¶ added in v3.5.3
CopyTo copies the repository to project path.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.