Documentation
¶
Overview ¶
description: superwallet
@author: xwc1125 @date: 2020/10/05
description: Leetcode
@author: xwc1125 @date: 2020/10/05
description: sync_eth
@author: xwc1125 @date: 2020/10/05
Index ¶
Constants ¶
View Source
const ( ABLE int64 = iota UNABLE DELETE UNACTIVE )
Variables ¶
View Source
var SysTimeLocation, _ = time.LoadLocation("Asia/Shanghai")
Functions ¶
func GetConnURL ¶
func GetConnURL(info *MysqlConfig) (url string)
func MasterEngine ¶
func MasterEngine(master MysqlConfig) *xorm.Engine
Types ¶
type CursorResult ¶
type CursorResult struct {
Results interface{} `json:"results"`
Cursor string `json:"cursor"`
}
type MysqlConfig ¶
type MysqlConfig struct {
DriverName string `json:"driverName" mapstructure:"driverName"`
User string `json:"user" mapstructure:"user"`
Password string `json:"password" mapstructure:"password"`
Host string `json:"host" mapstructure:"host"`
Port int `json:"port" mapstructure:"port"`
Database string `json:"database" mapstructure:"database"`
Charset string `json:"charset" mapstructure:"charset"`
ShowSql bool `json:"showSql" mapstructure:"showSql"`
LogLevel string `json:"logLevel" mapstructure:"logLevel"`
MaxIdleConns int `json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `json:"maxOpenConns" mapstructure:"maxOpenConns"`
//ParseTime bool `json:"parseTime" mapstructure:"parseTime"`
ConnMaxLifetime int64 `json:"connMaxLifetime" mapstructure:"connMaxLifetime: 10"` // s
}
type OrderByCol ¶
type PageResult ¶
type PageResult struct {
Page *Paging `json:"page"`
Results interface{} `json:"results"`
}
type PageWhereOrder ¶
type XormModel ¶
type XormModel struct {
Id int64 `xorm:"pk autoincr INT(11) notnull" json:"id" form:"id"`
CreateTime int64 `xorm:"bigint(15) " json:"createTime"`
CreateBy string `xorm:"varchar(55)" json:"createBy"`
UpdateTime int64 `xorm:"bigint(15) " json:"updateTime"`
UpdateBy string `xorm:"varchar(55)" json:"updateBy"`
Remark string `xorm:"varchar(500)" json:"remark"`
Status int64 `xorm:"int(8) notnull default(0)" json:"status"`
}
Xorm
type XormModel1 ¶
type XormModel1 struct {
Id int64 `xorm:"pk autoincr INT(11) notnull" json:"id" form:"id"`
CreateTime int64 `xorm:"bigint(15) " json:"createTime"`
UpdateTime int64 `xorm:"bigint(15) " json:"updateTime"`
Remark string `xorm:"varchar(500)" json:"remark"`
Status int64 `xorm:"int(8) notnull default(0)" json:"status"`
}
type XormModel2 ¶
type XormModelId ¶
type XormModelId struct {
Id int64 `xorm:"pk autoincr INT(11) notnull" json:"id" form:"id"` // ID
}
Click to show internal directories.
Click to hide internal directories.