Documentation ¶
Index ¶
- func Count(model interface{}, count *int, query QueryParam) bool
- func Create(model interface{}) bool
- func Delete(model interface{}, query QueryParam) bool
- func DeleteByPk(model interface{}) bool
- func GetByPk(model interface{}, id interface{}) bool
- func GetMulti(model interface{}, query QueryParam) bool
- func GetOne(model interface{}, query QueryParam) bool
- func Update(model interface{}, data interface{}, query QueryParam) bool
- func UpdateByPk(model interface{}) bool
- type DeployApply
- func (m *DeployApply) Count(query QueryParam) (int, bool)
- func (m *DeployApply) Create() bool
- func (m *DeployApply) Delete() bool
- func (m *DeployApply) Get(id int) bool
- func (m *DeployApply) List(query QueryParam) ([]DeployApply, bool)
- func (m *DeployApply) TableName() string
- func (m *DeployApply) Update() bool
- func (m *DeployApply) UpdateByFields(data map[string]interface{}, query QueryParam) bool
- type DeployBuild
- type DeployTask
- func (m *DeployTask) Create() bool
- func (m *DeployTask) Delete(query QueryParam) bool
- func (m *DeployTask) GetByApplyId(id int) bool
- func (m *DeployTask) List(query QueryParam) ([]DeployTask, bool)
- func (m *DeployTask) TableName() string
- func (m *DeployTask) UpdateByFields(data map[string]interface{}, query QueryParam) bool
- type Project
- func (m *Project) Count(query QueryParam) (int, bool)
- func (m *Project) Create() bool
- func (m *Project) Delete() bool
- func (m *Project) Get(id int) bool
- func (m *Project) List(query QueryParam) ([]Project, bool)
- func (m *Project) TableName() string
- func (m *Project) Update() bool
- func (m *Project) UpdateByFields(data map[string]interface{}, query QueryParam) bool
- type ProjectMember
- func (m *ProjectMember) Count(query QueryParam) (int, bool)
- func (m *ProjectMember) Create() bool
- func (m *ProjectMember) Delete() bool
- func (m *ProjectMember) Get(id int) bool
- func (m *ProjectMember) List(query QueryParam) ([]ProjectMember, bool)
- func (m *ProjectMember) TableName() string
- func (m *ProjectMember) Update() bool
- type ProjectSpace
- func (m *ProjectSpace) Count(query QueryParam) (int, bool)
- func (m *ProjectSpace) Create() bool
- func (m *ProjectSpace) Delete() bool
- func (m *ProjectSpace) Get(id int) bool
- func (m *ProjectSpace) List(query QueryParam) ([]ProjectSpace, bool)
- func (m *ProjectSpace) TableName() string
- func (m *ProjectSpace) Update() bool
- type QueryParam
- type Server
- type ServerGroup
- func (m *ServerGroup) Count(query QueryParam) (int, bool)
- func (m *ServerGroup) Create() bool
- func (m *ServerGroup) Delete() bool
- func (m *ServerGroup) Get(id int) bool
- func (m *ServerGroup) List(query QueryParam) ([]ServerGroup, bool)
- func (m *ServerGroup) TableName() string
- func (m *ServerGroup) Update() bool
- type User
- func (m *User) Count(query QueryParam) (int, bool)
- func (m *User) Create() bool
- func (m *User) Delete() bool
- func (m *User) Get(id int) bool
- func (m *User) GetOne(query QueryParam) bool
- func (m *User) List(query QueryParam) ([]User, bool)
- func (m *User) TableName() string
- func (m *User) UpdateByFields(data map[string]interface{}, query QueryParam) bool
- type UserRole
- type UserToken
- func (m *UserToken) Count(query QueryParam) (int, bool)
- func (m *UserToken) Create() bool
- func (m *UserToken) Delete() bool
- func (m *UserToken) DeleteByFields(query QueryParam) bool
- func (m *UserToken) Get(id int) bool
- func (m *UserToken) GetOne(query QueryParam) bool
- func (m *UserToken) List(query QueryParam) ([]UserToken, bool)
- func (m *UserToken) TableName() string
- func (m *UserToken) Update() bool
- func (m *UserToken) UpdateByFields(data map[string]interface{}, query QueryParam) bool
- type WhereParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Count ¶
func Count(model interface{}, count *int, query QueryParam) bool
func Delete ¶
func Delete(model interface{}, query QueryParam) bool
func DeleteByPk ¶
func DeleteByPk(model interface{}) bool
func GetMulti ¶
func GetMulti(model interface{}, query QueryParam) bool
func GetOne ¶
func GetOne(model interface{}, query QueryParam) bool
func Update ¶
func Update(model interface{}, data interface{}, query QueryParam) bool
func UpdateByPk ¶
func UpdateByPk(model interface{}) bool
Types ¶
type DeployApply ¶
type DeployApply struct { ID int `gorm:"primary_key"` SpaceId int `gorm:"type:int(11);not null;default:0"` ProjectId int `gorm:"type:int(11);not null;default:0"` Name string `gorm:"type:varchar(100);not null;default:''"` Description string `gorm:"type:varchar(500);not null;default:''"` BranchName string `gorm:"type:varchar(100);not null;default:''"` CommitVersion string `gorm:"type:varchar(50);not null;default:''"` AuditStatus int `gorm:"type:int(11);not null;default:0"` AuditRefusalReasion string `gorm:"type:varchar(500);not null;default:''"` Status int `gorm:"type:int(11);not null;default:0"` UserId int `gorm:"type:int(11);not null;default:0"` RollbackId int `gorm:"type:int(11);not null;default:0"` RollbackApplyId int `gorm:"type:int(11);not null;default:0"` IsRollbackApply int `gorm:"type:int(11);not null;default:0"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*DeployApply) Count ¶
func (m *DeployApply) Count(query QueryParam) (int, bool)
func (*DeployApply) Create ¶
func (m *DeployApply) Create() bool
func (*DeployApply) Delete ¶
func (m *DeployApply) Delete() bool
func (*DeployApply) Get ¶
func (m *DeployApply) Get(id int) bool
func (*DeployApply) List ¶
func (m *DeployApply) List(query QueryParam) ([]DeployApply, bool)
func (*DeployApply) TableName ¶
func (m *DeployApply) TableName() string
func (*DeployApply) Update ¶
func (m *DeployApply) Update() bool
func (*DeployApply) UpdateByFields ¶
func (m *DeployApply) UpdateByFields(data map[string]interface{}, query QueryParam) bool
type DeployBuild ¶
type DeployBuild struct { ID int `gorm:"primary_key"` ApplyId int `gorm:"type:int(11);not null;default:0"` StartTime int `gorm:"type:int(11);not null;default:0"` FinishTime int `gorm:"type:int(11);not null;default:0"` Status int `gorm:"type:int(11);not null;default:0"` Tar string `gorm:"type:varchar(2000);not null;default:''"` Output string `gorm:"type:text;not null"` Errmsg string `gorm:"type:text;not null"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*DeployBuild) Create ¶
func (m *DeployBuild) Create() bool
func (*DeployBuild) Delete ¶
func (m *DeployBuild) Delete() bool
func (*DeployBuild) GetByApplyId ¶
func (m *DeployBuild) GetByApplyId(id int) bool
func (*DeployBuild) TableName ¶
func (m *DeployBuild) TableName() string
func (*DeployBuild) UpdateByFields ¶
func (m *DeployBuild) UpdateByFields(data map[string]interface{}, query QueryParam) bool
type DeployTask ¶
type DeployTask struct { ID int `gorm:"primary_key"` ApplyId int `gorm:"type:int(11);not null;default:0"` GroupId int `gorm:"type:int(11);not null;default:0"` Status int `gorm:"type:int(11);not null;default:0"` Content string `gorm:"type:text;not null"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*DeployTask) Create ¶
func (m *DeployTask) Create() bool
func (*DeployTask) Delete ¶
func (m *DeployTask) Delete(query QueryParam) bool
func (*DeployTask) GetByApplyId ¶
func (m *DeployTask) GetByApplyId(id int) bool
func (*DeployTask) List ¶
func (m *DeployTask) List(query QueryParam) ([]DeployTask, bool)
func (*DeployTask) TableName ¶
func (m *DeployTask) TableName() string
func (*DeployTask) UpdateByFields ¶
func (m *DeployTask) UpdateByFields(data map[string]interface{}, query QueryParam) bool
type Project ¶
type Project struct { ID int `gorm:"primary_key"` SpaceId int `gorm:"type:int(11);not null;default:0"` Name string `gorm:"type:varchar(100);not null;default:''"` Description string `gorm:"type:varchar(500);not null;default:''"` NeedAudit int `gorm:"type:int(11);not null;default:0"` Status int `gorm:"type:int(11);not null;default:0"` RepoUrl string `gorm:"type:varchar(500);not null;default:''"` DeployMode int `gorm:"type:int(11);not null;default:0"` RepoBranch string `gorm:"type:varchar(100);not null;default:''"` OnlineCluster string `gorm:"type:varchar(1000);not null;default:''"` DeployUser string `gorm:"type:varchar(100);not null;default:''"` DeployPath string `gorm:"type:varchar(500);not null;default:''"` BuildScript string `gorm:"type:text;not null"` BuildHookScript string `gorm:"type:text;not null"` DeployHookScript string `gorm:"type:text;not null"` PreDeployCmd string `gorm:"type:text;not null"` AfterDeployCmd string `gorm:"type:text;not null"` AuditNotice string `gorm:"type:varchar(2000);not null;default:''"` DeployNotice string `gorm:"type:varchar(2000);not null;default:''"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*Project) UpdateByFields ¶
func (m *Project) UpdateByFields(data map[string]interface{}, query QueryParam) bool
type ProjectMember ¶
type ProjectMember struct { ID int `gorm:"primary_key"` SpaceId int `gorm:"type:int(11);not null;default:0"` UserId int `gorm:"type:int(11);not null;default:0"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*ProjectMember) Count ¶
func (m *ProjectMember) Count(query QueryParam) (int, bool)
func (*ProjectMember) Create ¶
func (m *ProjectMember) Create() bool
func (*ProjectMember) Delete ¶
func (m *ProjectMember) Delete() bool
func (*ProjectMember) Get ¶
func (m *ProjectMember) Get(id int) bool
func (*ProjectMember) List ¶
func (m *ProjectMember) List(query QueryParam) ([]ProjectMember, bool)
func (*ProjectMember) TableName ¶
func (m *ProjectMember) TableName() string
func (*ProjectMember) Update ¶
func (m *ProjectMember) Update() bool
type ProjectSpace ¶
type ProjectSpace struct { ID int `gorm:"primary_key"` Name string `gorm:"type:varchar(100);not null;default:''"` Description string `gorm:"type:varchar(2000);not null;default:''"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*ProjectSpace) Count ¶
func (m *ProjectSpace) Count(query QueryParam) (int, bool)
func (*ProjectSpace) Create ¶
func (m *ProjectSpace) Create() bool
func (*ProjectSpace) Delete ¶
func (m *ProjectSpace) Delete() bool
func (*ProjectSpace) Get ¶
func (m *ProjectSpace) Get(id int) bool
func (*ProjectSpace) List ¶
func (m *ProjectSpace) List(query QueryParam) ([]ProjectSpace, bool)
func (*ProjectSpace) TableName ¶
func (m *ProjectSpace) TableName() string
func (*ProjectSpace) Update ¶
func (m *ProjectSpace) Update() bool
type QueryParam ¶
type QueryParam struct { Fields string Offset int Limit int Order string Where []WhereParam }
type Server ¶
type Server struct { ID int `gorm:"primary_key"` GroupId int `gorm:"type:int(11);not null;default:0"` Name string `gorm:"type:varchar(100);not null;default:''"` Ip string `gorm:"type:varchar(100);not null;default:''"` SSHPort int `gorm:"type:int(11);not null;default:0"` Ctime int `gorm:"type:int(11);not null;default:0"` }
type ServerGroup ¶
type ServerGroup struct { ID int `gorm:"primary_key"` Name string `gorm:"type:varchar(100);not null;default:''"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*ServerGroup) Count ¶
func (m *ServerGroup) Count(query QueryParam) (int, bool)
func (*ServerGroup) Create ¶
func (m *ServerGroup) Create() bool
func (*ServerGroup) Delete ¶
func (m *ServerGroup) Delete() bool
func (*ServerGroup) Get ¶
func (m *ServerGroup) Get(id int) bool
func (*ServerGroup) List ¶
func (m *ServerGroup) List(query QueryParam) ([]ServerGroup, bool)
func (*ServerGroup) TableName ¶
func (m *ServerGroup) TableName() string
func (*ServerGroup) Update ¶
func (m *ServerGroup) Update() bool
type User ¶
type User struct { ID int `gorm:"primary_key"` RoleId int `gorm:"type:int(11);not null;default:0"` Username string `gorm:"type:varchar(20);not null;default:''"` Password string `gorm:"type:char(32);not null;default:''"` Salt string `gorm:"type:char(10);not null;default:''"` Truename string `gorm:"type:varchar(20);not null;default:''"` Mobile string `gorm:"type:varchar(20);not null;default:''"` Email string `gorm:"type:varchar(500);not null;default:''"` Status int `gorm:"type:int(11);not null;default:0"` LastLoginTime int `gorm:"type:int(11);not null;default:0"` LastLoginIp string `gorm:"type:varchar(50);not null;default:''"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*User) GetOne ¶
func (m *User) GetOne(query QueryParam) bool
func (*User) UpdateByFields ¶
func (m *User) UpdateByFields(data map[string]interface{}, query QueryParam) bool
type UserRole ¶
type UserToken ¶
type UserToken struct { ID int `gorm:"primary_key"` UserId int `gorm:"type:int(11);not null;default:0"` Token string `gorm:"type:varchar(100);not null;default:''"` Expire int `gorm:"type:int(11);not null;default:0"` Ctime int `gorm:"type:int(11);not null;default:0"` }
func (*UserToken) DeleteByFields ¶
func (m *UserToken) DeleteByFields(query QueryParam) bool
func (*UserToken) GetOne ¶
func (m *UserToken) GetOne(query QueryParam) bool
func (*UserToken) UpdateByFields ¶
func (m *UserToken) UpdateByFields(data map[string]interface{}, query QueryParam) bool
type WhereParam ¶
Click to show internal directories.
Click to hide internal directories.