Documentation ¶
Overview ¶
数据库实体层
应用启动引擎层
Index ¶
- Constants
- Variables
- type Config
- type DataxLinkInfoModel
- type DataxListModel
- type EsLinkModel
- type GmDslHistoryModel
- func (this *GmDslHistoryModel) Clean() (err error)
- func (this *GmDslHistoryModel) Count() (count int, err error)
- func (this *GmDslHistoryModel) Insert() (err error)
- func (this *GmDslHistoryModel) List() (gmDslHistoryModelList []GmDslHistoryModel, err error)
- func (this *GmDslHistoryModel) TableName() string
- type GmGuidModel
- type GmOperaterLog
- type GmRoleModel
- type GmUserModel
- func (this GmUserModel) Delete() (err error)
- func (this GmUserModel) Exsit() (b bool, err error)
- func (this GmUserModel) GetPassword() string
- func (this GmUserModel) GetUserById() (gmUser GmUserModel, err error)
- func (this GmUserModel) GetUserByUP() (gmUser GmUserModel, err error)
- func (this GmUserModel) Insert() (id int64, err error)
- func (this GmUserModel) Select() (gmUser []GmUserModel, err error)
- func (this GmUserModel) Update() (err error)
Constants ¶
View Source
const ( MysqlDbTyp = "mysql" SqliteDbTyp = "sqlite3" )
Variables ¶
View Source
var EsLinkList = []EsLinkModel{}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Log struct { StorageDays int `json:"storageDays"` LogDir string `json:"logDir"` } `json:"log"` Port int `json:"port"` DbType string `json:"dbType"` Sqlite struct { DbPath string `json:"dbPath"` } `json:"sqlite"` Mysql struct { Username string `json:"username"` Pwd string `json:"pwd"` IP string `json:"ip"` Port string `json:"port"` DbName string `json:"dbName"` MaxOpenConns int `json:"maxOpenConns"` MaxIdleConns int `json:"maxIdleConns"` } `json:"mysql"` AppSecret string `json:"appSecret"` Version string `json:"version"` DeBug bool `json:"deBug"` EsPwdSecret string `json:"esPwdSecret"` }
全局配置结构体
var GlobConfig Config
type DataxLinkInfoModel ¶
type DataxLinkInfoModel struct { Id int `db:"id" json:"id"` Ip string `db:"ip" json:"ip"` Port int `db:"port" json:"port"` DbName string `db:"db_name" json:"db_name"` Username string `db:"username" json:"username"` Pwd string `db:"pwd" json:"pwd"` Remark string `db:"remark" json:"remark"` Typ string `db:"typ" json:"typ"` Updated string `db:"updated" json:"updated"` Created string `db:"created" json:"created"` }
type DataxListModel ¶
type DataxListModel struct { Id int `json:"id" db:"id"` FormData string `json:"form_data" db:"form_data"` Remark string `json:"remark" db:"remark"` Table_name string `json:"table_name" db:"table_name"` Index_name string `json:"index_name" db:"index_name"` Error_msg string `json:"error_msg" db:"error_msg"` Status string `json:"status" db:"status"` Dbcount int `json:"dbcount" db:"dbcount" ` Escount int `json:"escount" db:"escount" ` Updated string `json:"updated" db:"updated"` Created string `json:"created" db:"created"` EsConnect int `json:"es_connect" db:"es_connect"` CrontabSpec string `json:"crontab_spec" db:"crontab_spec"` }
type EsLinkModel ¶
type EsLinkModel struct { ID int64 `gorm:"column:id" json:"id" db:"id"` Ip string `gorm:"column:ip" json:"ip" db:"ip"` User string `gorm:"column:user" json:"user" db:"user"` Pwd string `gorm:"column:pwd" json:"pwd" db:"pwd"` Created string `gorm:"column:created" json:"created" db:"created"` Updated string `gorm:"column:updated" json:"updated" db:"updated"` Remark string `gorm:"column:remark" json:"remark" db:"remark"` Version int `json:"version" db:"version"` }
EsLinkModel es连接信息表
func (*EsLinkModel) FlushEsLinkList ¶
func (this *EsLinkModel) FlushEsLinkList() (err error)
刷新eslink表数据到内存
func (*EsLinkModel) GetListAction ¶
func (this *EsLinkModel) GetListAction() (esLinkList []EsLinkModel, err error)
获取列表信息
type GmDslHistoryModel ¶
type GmDslHistoryModel struct { ID int `gorm:"column:id" json:"id" form:"id" db:"id"` Uid int `gorm:"column:uid" json:"uid" form:"uid" db:"uid"` Method string `gorm:"column:method" json:"method" form:"method" db:"method"` Path string `gorm:"column:path" json:"path" form:"path" db:"path"` Body string `gorm:"column:body" json:"body" form:"body" db:"body"` Created string `gorm:"column:created" json:"created" form:"created" db:"created"` FilterDate []string `json:"date"` IndexName string `json:"indexName"` Page int `json:"page"` Limit int `json:"limit"` }
http://sql2struct.atotoa.com 根据表结构生成 go结构体
GmDslHistoryModel DSL历史记录
func (*GmDslHistoryModel) Count ¶
func (this *GmDslHistoryModel) Count() (count int, err error)
Count
func (*GmDslHistoryModel) List ¶
func (this *GmDslHistoryModel) List() (gmDslHistoryModelList []GmDslHistoryModel, err error)
List
type GmGuidModel ¶
type GmGuidModel struct { ID int `json:"id"` Uid int `json:"uid" db:"uid"` GuidName string `json:"guid_name" db:"guid_name"` Created string `json:"created" db:"created"` }
新手引导
type GmOperaterLog ¶
type GmOperaterLog struct { ID int64 `gorm:"column:id" json:"id" form:"id"` OperaterName string `gorm:"column:operater_name" json:"operater_name" form:"operater_name"` OperaterId int64 `gorm:"column:operater_id" json:"operater_id" form:"operater_id"` OperaterAction string `gorm:"column:operater_action" json:"operater_action" form:"operater_action"` Created string `gorm:"column:created" json:"created" form:"created"` Method string `gorm:"column:method" json:"method" form:"method"` Parmas string `gorm:"column:parmas" json:"parmas" form:"parmas"` Body string `gorm:"column:body" json:"body" form:"body"` OperaterRoleId int `gorm:"column:operater_role_id" json:"operater_role_id" form:"operater_role_id"` }
func (*GmOperaterLog) Insert ¶
func (this *GmOperaterLog) Insert() (err error)
func (*GmOperaterLog) TableName ¶
func (this *GmOperaterLog) TableName() string
type GmRoleModel ¶
type GmRoleModel struct { ID int `json:"id" db:"id"` RoleName string `json:"name" db:"role_name"` Description string `json:"description" db:"description"` RoleList string `json:"routes" db:"role_list"` }
GmRoleModel
func (*GmRoleModel) GetById ¶
func (this *GmRoleModel) GetById(roleId int) (model GmRoleModel, err error)
GetById
func (*GmRoleModel) Select ¶
func (this *GmRoleModel) Select() (model []GmRoleModel, err error)
Select
type GmUserModel ¶
type GmUserModel struct { ID int32 `json:"id" db:"id"` Username string `json:"username" db:"username"` Password string `json:"password" db:"password"` RoleId int32 `json:"role_id" db:"role_id"` Realname string `json:"realname" db:"realname"` }
GmUserModel GM用户
func (GmUserModel) GetUserById ¶
func (this GmUserModel) GetUserById() (gmUser GmUserModel, err error)
通过id查询用户信息
func (GmUserModel) GetUserByUP ¶
func (this GmUserModel) GetUserByUP() (gmUser GmUserModel, err error)
登录
func (GmUserModel) Select ¶
func (this GmUserModel) Select() (gmUser []GmUserModel, err error)
Select
Click to show internal directories.
Click to hide internal directories.