Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Database *bolt.DB
Database bolt database
Functions ¶
func ClearDatabase ¶
func ClearDatabase(dbPath string)
ClearDatabase removes db file and recreates it
func DeleteProjectByID ¶
DeleteProjectByID deletes project by id
func OpenDatabase ¶
func OpenDatabase(dbPath string)
OpenDatabase opens database connection to provided file
Types ¶
type Job ¶
type Job struct { ID int `json:"id,omitempty"` ProjectID int `json:"project_id,omitempty"` Timing string `json:"timing"` Command string `json:"command"` Arguments []string `json:"arguments"` ExpectedResult map[string]string `json:"expected_result"` }
Job struct that defines a job
func GetJobByID ¶
GetJobByID gets single job id from database
type Project ¶
type Project struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` }
Project struct that defines a project
func GetProjectByID ¶
GetProjectByID gets single project id from database
func GetProjects ¶
GetProjects gets all projects from database
func (*Project) SaveProject ¶
SaveProject saves a project to database
Click to show internal directories.
Click to hide internal directories.