Documentation ¶
Index ¶
- Variables
- func AddJob(j *models.Job) error
- func AddNode(node *models.Node) error
- func AddTask(task *models.Task) error
- func AddUser(u models.User) error
- func DeleteJob(j *models.Job) error
- func DeleteNode(node *models.Node) error
- func GetJob(id string) (*models.Job, bool)
- func GetJobWithFullHistory(id string) (*models.JobWithTasks, bool)
- func GetNode(id string) (*models.Node, bool)
- func GetNodeIDorName(id string, field string) (string, bool)
- func GetTask(id string) (*models.Task, bool)
- func GetUser(u models.User) (string, error)
- func Init() error
- func SaveTask(t *TaskInfo) error
- func UpdateJob(j *models.Job) error
- func UpdateUser(u models.User, uOld models.User) error
- type Query
- type TaskInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DB provides the gorm DB interface. DB *gorm.DB )
Functions ¶
func DeleteNode ¶
DeleteNode deletes a node from the database.
func GetJobWithFullHistory ¶
func GetJobWithFullHistory(id string) (*models.JobWithTasks, bool)
GetJobWithFullHistory returns a job with the tasks substituted for their IDs. Query designed with the help of https://stackoverflow.com/questions/47275606
func GetNodeIDorName ¶
GetNodeIDorName returns the full ID or name for the given node.
Types ¶
type Query ¶
type Query struct { Limit int `form:"limit" validate:"min=1,max=50"` Offset int `form:"offset"` Sort string `form:"sort" validate:"oneof=asc desc"` SortBy string `form:"sortby"` Expand bool `form:"expand"` }
Query parses a URL query and gets the items from the database based on it.
Click to show internal directories.
Click to hide internal directories.