Versions in this module Expand all Collapse all v1 v1.2.2 Sep 8, 2017 Changes in this version type Task + Tag string v1.2.1 Sep 6, 2017 Changes in this version type Host + CertFile string + Selected bool + Token string type Migration + func (migration *Migration) Install(dbName string) error + func (migration *Migration) Upgrade(oldVersionId int) type Status + const Waiting type Task + DependencyStatus TaskDependencyStatus + DependencyTaskId string + Hosts []TaskHostDetail + Level TaskLevel + func (task *Task) GetDependencyTaskList(ids string) ([]Task, error) + func (task *Task) GetStatus(id int) (Status, error) + type TaskDependencyStatus int8 + const TaskDependencyStatusStrong + const TaskDependencyStatusWeak type TaskHost + HostId int16 + Id int + TaskId int + func (th *TaskHost) Add(taskId int, hostIds []int) error + func (th *TaskHost) GetHostIdsByTaskId(taskId int) ([]TaskHostDetail, error) + func (th *TaskHost) GetTaskIdsByHostId(hostId int16) ([]interface{}, error) + func (th *TaskHost) HostIdExist(hostId int16) (bool, error) + func (th *TaskHost) Remove(taskId int) error + type TaskHostDetail struct + Alias string + CertFile string + Name string + Port int + Token string + func (TaskHostDetail) TableName() string + type TaskLevel int8 + const TaskLevelChild + const TaskLevelParent type TaskProtocol + const TaskRPC v0 v0.1.1 May 13, 2017 Changes in this version + const DefaultTimeFormat + const MailCode + const MailServerKey + const MailUserKey + const MaxPageSize + const Page + const PageSize + const PasswordSaltLength + const SlackChannelKey + const SlackCode + const SlackUrlKey + var Db *xorm.Engine + var TablePrefix string = "" + func CreateDb() *xorm.Engine + func CreateTmpDb(config map[string]string) (*xorm.Engine, error) + type BaseModel struct + Page int + PageSize int + type Channel struct + Id int + Name string + type CommonMap map[string]interface + type Host struct + Alias string + AuthType ssh.HostAuthType + Id int16 + Name string + Port int + Remark string + Username string + func (h *Host) GetPasswordByHost(host string) (string, error) + func (h *Host) GetPrivateKeyByHost(host string) (string, error) + func (host *Host) AllList() ([]Host, error) + func (host *Host) Create() (insertId int16, err error) + func (host *Host) Delete(id int) (int64, error) + func (host *Host) Find(id int) error + func (host *Host) List(params CommonMap) ([]Host, error) + func (host *Host) NameExists(name string, id int16) (bool, error) + func (host *Host) Total(params CommonMap) (int64, error) + func (host *Host) Update(id int, data CommonMap) (int64, error) + func (host *Host) UpdateBean(id int16) (int64, error) + type LoginLog struct + Created time.Time + Id int + Ip string + Username string + func (log *LoginLog) Create() (insertId int, err error) + func (log *LoginLog) List(params CommonMap) ([]LoginLog, error) + func (log *LoginLog) Total() (int64, error) + type Mail struct + Host string + MailUsers []MailUser + Password string + Port int + User string + type MailUser struct + Email string + Id int + Username string + type Migration struct + func (migration *Migration) Exec(dbName string) error + type Setting struct + Code string + Id int + Key string + Value string + func (setting *Setting) CreateChannel(channel string) (int64, error) + func (setting *Setting) CreateMailUser(username, email string) (int64, error) + func (setting *Setting) InitBasicField() + func (setting *Setting) IsChannelExist(channel string) bool + func (setting *Setting) Mail() (Mail, error) + func (setting *Setting) RemoveChannel(id int) (int64, error) + func (setting *Setting) RemoveMailUser(id int) (int64, error) + func (setting *Setting) Slack() (Slack, error) + func (setting *Setting) UpdateMailServer(config string) (int64, error) + func (setting *Setting) UpdateSlackUrl(url string) (int64, error) + type Slack struct + Channels []Channel + Url string + type Status int8 + const Background + const Cancel + const Disabled + const Enabled + const Failure + const Finish + const Running + type Task struct + Command string + Created time.Time + Deleted time.Time + HostId int16 + Id int + Multi int8 + Name string + NotifyReceiverId string + NotifyStatus int8 + NotifyType int8 + Protocol TaskProtocol + Remark string + RetryTimes int8 + Spec string + Status Status + Timeout int + func (task *Task) ActiveList() ([]TaskHost, error) + func (task *Task) ActiveListByHostId(hostId int16) ([]TaskHost, error) + func (task *Task) Create() (insertId int, err error) + func (task *Task) CreateTestTask() + func (task *Task) Delete(id int) (int64, error) + func (task *Task) Detail(id int) (TaskHost, error) + func (task *Task) Disable(id int) (int64, error) + func (task *Task) Enable(id int) (int64, error) + func (task *Task) HostIdExist(hostId int16) (bool, error) + func (task *Task) List(params CommonMap) ([]TaskHost, error) + func (task *Task) NameExist(name string, id int) (bool, error) + func (task *Task) Total(params CommonMap) (int64, error) + func (task *Task) Update(id int, data CommonMap) (int64, error) + func (task *Task) UpdateBean(id int) (int64, error) + type TaskHost struct + Alias string + AuthType ssh.HostAuthType + Name string + Port int + Username string + func (TaskHost) TableName() string + type TaskLog struct + Command string + EndTime time.Time + Hostname string + Id int64 + Name string + NotifyId string + Protocol TaskProtocol + Result string + RetryTimes int8 + Spec string + StartTime time.Time + Status Status + TaskId int + Timeout int + TotalTime int + func (taskLog *TaskLog) Clear() (int64, error) + func (taskLog *TaskLog) Create() (insertId int64, err error) + func (taskLog *TaskLog) GetTaskIdByNotifyId(notifyId string) (taskId int, err error) + func (taskLog *TaskLog) List(params CommonMap) ([]TaskLog, error) + func (taskLog *TaskLog) Remove(id int) (int64, error) + func (taskLog *TaskLog) Total(params CommonMap) (int64, error) + func (taskLog *TaskLog) Update(id int64, data CommonMap) (int64, error) + func (taskLog *TaskLog) UpdateStatus(notifyId string, status Status, result string) (int64, error) + type TaskProtocol int8 + const TaskHTTP + const TaskLocalCommand + const TaskSSH + type TaskType int8 + type User struct + Created time.Time + Deleted time.Time + Email string + Id int + IsAdmin int8 + Name string + Password string + Salt string + Status Status + Updated time.Time + func (user *User) Create() (insertId int, err error) + func (user *User) Delete(id int) (int64, error) + func (user *User) Disable(id int) (int64, error) + func (user *User) EmailExists(email string) (int64, error) + func (user *User) Enable(id int) (int64, error) + func (user *User) List() ([]User, error) + func (user *User) Match(username, password string) bool + func (user *User) Total() (int64, error) + func (user *User) Update(id int, data CommonMap) (int64, error) + func (user *User) UpdatePassword(id int, password string) (int64, error) + func (user *User) UsernameExists(username string) (int64, error)