Documentation
¶
Index ¶
- func AddApiSystem(m *ApiSystem) (id int64, err error)
- func AddGroup(m *Group) (id int64, err error)
- func AddMigration(m *Migration) (id int64, err error)
- func AddProject(m *Project) (id int64, err error)
- func AddRecord(m *Record) (id int64, err error)
- func AddSession(m *Session) (id int64, err error)
- func AddTask(m *Task) (id int64, err error)
- func AddTaskErrLog(m *TaskErrLog) (id int64, err error)
- func AddUser(m *User) (id int64, err error)
- func Connect()
- func DeleteApiSystem(id int) (err error)
- func DeleteGroup(id int) (err error)
- func DeleteMigration(id int) (err error)
- func DeleteProject(id int) (err error)
- func DeleteRecord(id int) (err error)
- func DeleteSession(id int) (err error)
- func DeleteTask(id int) (err error)
- func DeleteTaskErrLog(id int) (err error)
- func DeleteUser(id int) (err error)
- func GetAllApiSystem(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllGroup(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllMigration(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllProject(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllRecord(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllSession(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllTask(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllTaskAndPro(pro_name string, startTime string, endTime string) ([]orm.Params, error)
- func GetAllTaskErrLog(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllUser(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func Syncdb()
- func UpdateApiSystemById(m *ApiSystem) (err error)
- func UpdateGroupById(m *Group) (err error)
- func UpdateMigrationById(m *Migration) (err error)
- func UpdateProjectById(m *Project) (err error)
- func UpdateRecordById(m *Record) (err error)
- func UpdateSessionById(m *Session) (err error)
- func UpdateTaskById(m *Task) (err error)
- func UpdateTaskErrLogById(m *TaskErrLog) (err error)
- func UpdateUserById(m *User) (err error)
- type ApiSystem
- type Group
- type Migration
- type Project
- type Record
- type Session
- type Task
- type TaskErrLog
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddApiSystem ¶
AddApiSystem insert a new ApiSystem into database and returns last inserted Id on success.
func AddMigration ¶
AddMigration insert a new Migration into database and returns last inserted Id on success.
func AddProject ¶
AddProject insert a new Project into database and returns last inserted Id on success.
func AddRecord ¶
AddRecord insert a new Record into database and returns last inserted Id on success.
func AddSession ¶
AddSession insert a new Session into database and returns last inserted Id on success.
func AddTaskErrLog ¶
func AddTaskErrLog(m *TaskErrLog) (id int64, err error)
AddTaskErrLog insert a new TaskErrLog into database and returns last inserted Id on success.
func DeleteApiSystem ¶
DeleteApiSystem deletes ApiSystem by Id and returns error if the record to be deleted doesn't exist
func DeleteGroup ¶
DeleteGroup deletes Group by Id and returns error if the record to be deleted doesn't exist
func DeleteMigration ¶
DeleteMigration deletes Migration by Id and returns error if the record to be deleted doesn't exist
func DeleteProject ¶
DeleteProject deletes Project by Id and returns error if the record to be deleted doesn't exist
func DeleteRecord ¶
DeleteRecord deletes Record by Id and returns error if the record to be deleted doesn't exist
func DeleteSession ¶
DeleteSession deletes Session by Id and returns error if the record to be deleted doesn't exist
func DeleteTask ¶
DeleteTask deletes Task by Id and returns error if the record to be deleted doesn't exist
func DeleteTaskErrLog ¶
DeleteTaskErrLog deletes TaskErrLog by Id and returns error if the record to be deleted doesn't exist
func DeleteUser ¶
DeleteUser deletes User by Id and returns error if the record to be deleted doesn't exist
func GetAllApiSystem ¶
func GetAllApiSystem(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllApiSystem retrieves all ApiSystem matches certain condition. Returns empty list if no records exist
func GetAllGroup ¶
func GetAllGroup(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllGroup retrieves all Group matches certain condition. Returns empty list if no records exist
func GetAllMigration ¶
func GetAllMigration(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllMigration retrieves all Migration matches certain condition. Returns empty list if no records exist
func GetAllProject ¶
func GetAllProject(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllProject retrieves all Project matches certain condition. Returns empty list if no records exist
func GetAllRecord ¶
func GetAllRecord(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllRecord retrieves all Record matches certain condition. Returns empty list if no records exist
func GetAllSession ¶
func GetAllSession(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllSession retrieves all Session matches certain condition. Returns empty list if no records exist
func GetAllTask ¶
func GetAllTask(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllTask retrieves all Task matches certain condition. Returns empty list if no records exist
func GetAllTaskAndPro ¶
func GetAllTaskErrLog ¶
func GetAllTaskErrLog(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllTaskErrLog retrieves all TaskErrLog matches certain condition. Returns empty list if no records exist
func GetAllUser ¶
func GetAllUser(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllUser retrieves all User matches certain condition. Returns empty list if no records exist
func UpdateApiSystemById ¶
UpdateApiSystem updates ApiSystem by Id and returns error if the record to be updated doesn't exist
func UpdateGroupById ¶
UpdateGroup updates Group by Id and returns error if the record to be updated doesn't exist
func UpdateMigrationById ¶
UpdateMigration updates Migration by Id and returns error if the record to be updated doesn't exist
func UpdateProjectById ¶
UpdateProject updates Project by Id and returns error if the record to be updated doesn't exist
func UpdateRecordById ¶
UpdateRecord updates Record by Id and returns error if the record to be updated doesn't exist
func UpdateSessionById ¶
UpdateSession updates Session by Id and returns error if the record to be updated doesn't exist
func UpdateTaskById ¶
UpdateTask updates Task by Id and returns error if the record to be updated doesn't exist
func UpdateTaskErrLogById ¶
func UpdateTaskErrLogById(m *TaskErrLog) (err error)
UpdateTaskErrLog updates TaskErrLog by Id and returns error if the record to be updated doesn't exist
func UpdateUserById ¶
UpdateUser updates User by Id and returns error if the record to be updated doesn't exist
Types ¶
type ApiSystem ¶
type ApiSystem struct {
Id int `orm:"column(AppId);pk"`
AppSecret string `orm:"column(AppSecret);size(255);null"`
SystemName string `orm:"column(SystemName);size(255);null"`
IP string `orm:"column(IP);size(255);null"`
Operator string `orm:"column(Operator);size(255);null"`
}
func GetApiSystemById ¶
GetApiSystemById retrieves ApiSystem by Id. Returns error if Id doesn't exist
type Group ¶
type Group struct {
Id int `orm:"column(id);auto"`
ProjectId uint `orm:"column(project_id)"`
UserId int `orm:"column(user_id)"`
Type int16 `orm:"column(type);null"`
}
func GetGroupById ¶
GetGroupById retrieves Group by Id. Returns error if Id doesn't exist
type Migration ¶
type Migration struct {
Id int `orm:"column(version);pk"`
ApplyTime int `orm:"column(apply_time);null"`
}
func GetMigrationById ¶
GetMigrationById retrieves Migration by Id. Returns error if Id doesn't exist
type Project ¶
type Project struct {
Id int `orm:"column(id);auto"`
UserId uint `orm:"column(user_id)"`
Name string `orm:"column(name);size(100);null"`
Level int16 `orm:"column(level)"`
Status int16 `orm:"column(status)"`
Version string `orm:"column(version);size(32);null"`
RepoUrl string `orm:"column(repo_url);type(text);null"`
RepoUsername string `orm:"column(repo_username);size(50);null"`
RepoPassword string `orm:"column(repo_password);size(100);null"`
RepoMode string `orm:"column(repo_mode);size(50);null"`
RepoType string `orm:"column(repo_type);size(10);null"`
DeployFrom string `orm:"column(deploy_from);size(200)"`
Excludes string `orm:"column(excludes);type(text);null"`
ReleaseUser string `orm:"column(release_user);size(50)"`
ReleaseTo string `orm:"column(release_to);size(200)"`
ReleaseLibrary string `orm:"column(release_library);type(text);size(200)"`
Hosts string `orm:"column(hosts);type(text);null"`
PreDeploy string `orm:"column(pre_deploy);type(text);null"`
PostDeploy string `orm:"column(post_deploy);type(text);null"`
PreRelease string `orm:"column(pre_release);type(text);null"`
PostRelease string `orm:"column(post_release);type(text);null"`
LastDeploy string `orm:"column(last_deploy);type(text);null"`
Audit int16 `orm:"column(audit);null"`
KeepVersionNum int `orm:"column(keep_version_num)"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"`
P2p int16 `orm:"column(p2p)"`
HostGroup string `orm:"column(host_group)"`
Gzip int16 `orm:"column(gzip)"`
IsGroup int16 `orm:"column(is_group)"`
PmsProName string `orm:"column(pms_pro_name);size(200)"`
}
func GetProjectById ¶
GetProjectById retrieves Project by Id. Returns error if Id doesn't exist
type Record ¶
type Record struct {
Id int `orm:"column(id);auto"`
UserId uint `orm:"column(user_id)"`
TaskId int64 `orm:"column(task_id)"`
Status int16 `orm:"column(status)"`
Action uint `orm:"column(action);null"`
Command string `orm:"column(command);type(text);null"`
Duration int `orm:"column(duration);null"`
Memo string `orm:"column(memo);type(text);null"`
CreatedAt int `orm:"column(created_at);null"`
}
func GetRecordById ¶
GetRecordById retrieves Record by Id. Returns error if Id doesn't exist
type Session ¶
type Session struct {
Id int `orm:"column(id);pk"`
Expire uint `orm:"column(expire);null"`
Data string `orm:"column(data);null"`
}
func GetSessionById ¶
GetSessionById retrieves Session by Id. Returns error if Id doesn't exist
type Task ¶
type Task struct {
Id int `orm:"column(id);auto"`
UserId uint `orm:"column(user_id)"`
ProjectId int `orm:"column(project_id)"`
Action int16 `orm:"column(action)"`
Status int16 `orm:"column(status)"`
Title string `orm:"column(title);size(100);null"`
LinkId string `orm:"column(link_id);size(20);null"`
ExLinkId string `orm:"column(ex_link_id);size(20);null"`
CommitId string `orm:"column(commit_id);size(800);null"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null"`
Branch string `orm:"column(branch);size(100);null"`
FileList string `orm:"column(file_list);null"`
EnableRollback int `orm:"column(enable_rollback)"`
PmsBatchId int `orm:"column(pms_batch_id);null"`
PmsUworkId int `orm:"column(pms_uwork_id);null"`
IsRun int `orm:"column(is_run);null"`
FileMd5 string `orm:"column(file_md5);size(200);null"`
Hosts string `orm:"column(hosts);null"`
}
func GetTaskById ¶
GetTaskById retrieves Task by Id. Returns error if Id doesn't exist
type TaskErrLog ¶
type TaskErrLog struct {
Id int `orm:"column(id);auto"`
TaskId int `orm:"column(task_id);null"`
ErrInfo string `orm:"column(err_info);null"`
CreateTime time.Time `orm:"column(create_time);type(timestamp);null;auto_now"`
}
func GetTaskErrLogById ¶
func GetTaskErrLogById(id int) (v *TaskErrLog, err error)
GetTaskErrLogById retrieves TaskErrLog by Id. Returns error if Id doesn't exist
func (*TaskErrLog) TableName ¶
func (t *TaskErrLog) TableName() string
type User ¶
type User struct {
Id int `orm:"column(id);auto"`
Username string `orm:"column(username);size(255)"`
IsEmailVerified int8 `orm:"column(is_email_verified)"`
AuthKey string `orm:"column(auth_key);size(32)"`
PasswordHash string `orm:"column(password_hash);size(255)"`
PasswordResetToken string `orm:"column(password_reset_token);size(255);null"`
EmailConfirmationToken string `orm:"column(email_confirmation_token);size(255);null"`
Email string `orm:"column(email);size(255)"`
Avatar string `orm:"column(avatar);size(100);null"`
Role int16 `orm:"column(role)"`
Status int16 `orm:"column(status)"`
CreatedAt time.Time `orm:"column(created_at);type(datetime)"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime)"`
Realname string `orm:"column(realname);size(32)"`
}
func GetUserById ¶
GetUserById retrieves User by Id. Returns error if Id doesn't exist