Documentation ¶
Index ¶
- Variables
- func AddTask(tmplID uint, content, operator, serviceUID, prevState, namespace string, ...) error
- func AddTaskTmpl(name, content, brief, operator string, vars []model.TaskTmplVar, icon string) (t model.TaskTmpl, e error)
- func AddTaskTmplVar(name, title, comment, dataSource string, taskTmplID, formType uint) (t model.TaskTmplVar, e error)
- func DelTaskTmpl(id int) error
- func DelTaskTmplVar(id int) error
- func DeleteTask(id uint, operator string) error
- func GetTask(name, content, operator, serviceUID string, id uint, ctmin, ctmax int, ...) []model.Task
- func GetTaskTmpl(name, content, operator string, ids []uint, ctmin, ctmax int, ...) []model.TaskTmpl
- func GetTaskTmplVar(name, title, comment, dataSource string, formType, tasktmplID uint, ids []uint) []model.TaskTmplVar
- func Init()
- func UpdateTask(content, operator, serviceUID string, id, tmplID, status uint) error
- func UpdateTaskTmpl(name, content, brief, operator string, id uint, icon string) error
- func UpdateTaskTmplVar(name, title, comment, dataSource string, id, formType uint) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidParams defines invalid params error. ErrInvalidParams = errors.New("invalid params") // ErrSQLExec defines sql execution error. ErrSQLExec = errors.New("sql executed fail") )
Functions ¶
func AddTask ¶
func AddTask(tmplID uint, content, operator, serviceUID, prevState, namespace string, status uint) error
AddTask adds a record into `tasks`.
func AddTaskTmpl ¶
func AddTaskTmpl(name, content, brief, operator string, vars []model.TaskTmplVar, icon string) (t model.TaskTmpl, e error)
AddTaskTmpl adds a record into table `task_tmpls`.
func AddTaskTmplVar ¶
func AddTaskTmplVar(name, title, comment, dataSource string, taskTmplID, formType uint) (t model.TaskTmplVar, e error)
AddTaskTmplVar adds a record into table `task_tmpl_vars`.
func DelTaskTmpl ¶
DelTaskTmpl deletes specific record of table `task_tmpls`.
func DelTaskTmplVar ¶
DelTaskTmplVar deletes specific record of table `task_tmpl_vars`.
func DeleteTask ¶
DeleteTask deletes specific record of `tasks`. Deprecated: the function is already Deprecated.
func GetTask ¶
func GetTask(name, content, operator, serviceUID string, id uint, ctmin, ctmax int, revision uint) []model.Task
GetTask queries records from `tasks` with provided fields.
func GetTaskTmpl ¶
func GetTaskTmpl(name, content, operator string, ids []uint, ctmin, ctmax int, revision, tp uint) []model.TaskTmpl
GetTaskTmpl queries records from table `task_tmpls` with provided conditions.
func GetTaskTmplVar ¶
func GetTaskTmplVar(name, title, comment, dataSource string, formType, tasktmplID uint, ids []uint) []model.TaskTmplVar
GetTaskTmplVar queries records from table `task_tmpl_vars` with provided fields.
func UpdateTask ¶
UpdateTask updates specific record of `tasks`. Deprecated: the function is already Deprecated.
func UpdateTaskTmpl ¶
UpdateTaskTmpl updates specific record of table `task_tmpls`.
func UpdateTaskTmplVar ¶
UpdateTaskTmplVar updates specific record of table `task_tmpl_vars`.
Types ¶
This section is empty.