Documentation ¶
Index ¶
- Variables
- func AddLabelToTest(testID string, label string) error
- func CreateGrid(name string, provider string, region string, masterInstance string, ...)
- func CreateTest(test Test, user string) (string, error)
- func CreateTestFiles(testFiles TestFiles, id string, user string) (string, error)
- func DeleteGridByID(id string) error
- func DeleteGridTemplate(id string) error
- func DeleteLabelFromTest(testID string, label string) error
- func DeleteTest(id string)
- func DeleteTestAttachment(ID string) error
- func DeleteTestByID(id string) error
- func DuplicateTest(testID string) (string, error)
- func EditTestDescription(id string, description string) error
- func EditTestResult(id string, result string) error
- func EditTestTitle(id string, title string) error
- func GetAllInstanceTypes() ([]byte, error)
- func GetFirstGrid() (string, error)
- func GetFirstTest(startDate time.Time, endDate time.Time, search string) (string, error)
- func GetGridByID(id string) ([]byte, error)
- func GetGridByTestID(testID string) (string, string, error)
- func GetGridInstances(provider string, region string) ([]byte, error)
- func GetGridProviders() ([]byte, error)
- func GetGridRegion(id string) (string, error)
- func GetGridRegions(provider string) ([]byte, error)
- func GetGridStatus(id string) (string, error)
- func GetGrids(limit int) ([]byte, error)
- func GetGridsByStatus(statusList ...string) ([]byte, error)
- func GetLastGrid() (string, error)
- func GetLastTest(startDate time.Time, endDate time.Time, search string) (string, error)
- func GetNumberOfGrids() (int, error)
- func GetNumberOfTests(startDate time.Time, endDate time.Time, search string) (int, error)
- func GetScriptFilename(id string) (string, string, error)
- func GetScriptInfo(testID string) (string, string, error)
- func GetTestAttachmentName(ID string) (string, error)
- func GetTestAttachments(testID string) ([]byte, error)
- func GetTestByGridID(gridID string) (string, error)
- func GetTestFiles(id string) ([]byte, error)
- func GetTestsByStatus(statusList []string) ([]byte, error)
- func GrafanaSnapshot(testID, snapshotURL, snapshotDeleteURL string) error
- func GridGetPaginateKey(testID string, offset int) (string, error)
- func GridPaginate(testID string, itemsPerPage int) ([]byte, error)
- func InfoForGrafana(testID string) (name, gridID string, startTime, endTime time.Time, err error)
- func LatestTests(limit int, startDate time.Time, endDate time.Time, search string) ([]byte, error)
- func PutTestAttachment(testID string, filename string) error
- func RefreshTestStatus() error
- func Set()
- func TestByID(id string) ([]byte, error)
- func TestGetPaginateKey(testID string, startDate time.Time, endDate time.Time, search string, ...) (string, error)
- func TestPaginate(testID string, startDate time.Time, endDate time.Time, search string, ...) ([]byte, error)
- func UpdateGridStatus(id string, status string) error
- func UpdateGridTemplate(id string, gridTemplate GridTemplate) error
- func UpdateTestIDinGrid(gridID string, testID string) error
- func UpdateTestStatus(id string, status string) error
- func UpdateTestStatusThatUsesGrid(gridid string, status string) (string, error)
- type GridStruct
- type GridTemplate
- type InstanceType
- type Provider
- type Region
- type Test
- type TestFile
- type TestFiles
Constants ¶
This section is empty.
Variables ¶
var SourceName string
SourceName is the database source name
Functions ¶
func AddLabelToTest ¶
func CreateGrid ¶
func CreateTestFiles ¶
func DeleteGridByID ¶
DeleteGridByID should Check the status of the Grid. If a test is deployed on it then special delete process would need to be kicked off. Make db status change to the test. If deployed but no tests are on it then change TTL tag so it gets deleted. Mark as deleted in DB so it doesn't show up anymore in the UI.
current possible grid status: Ready, Error, Deploying, Deployed, Destroyed, Deleted
func DeleteGridTemplate ¶
func DeleteLabelFromTest ¶
func DeleteTest ¶
func DeleteTest(id string)
func DeleteTestAttachment ¶
func DeleteTestByID ¶
DeleteTestByID Mark the test in the DB as deleted so they do not show up in the UI.
Possibly delete all the data associated to the test and remove from the DB?
Possible states a test can be in: Ready, Creating, Uploading, Queued, Deploying, Deployed, Launching, Launched, Running, Stopping, Stopped, Missing info, Upload Failed, Error
func DuplicateTest ¶
func EditTestDescription ¶
func EditTestResult ¶
EditTestResult will edit the test to a specified result
func EditTestTitle ¶
func GetAllInstanceTypes ¶
func GetFirstGrid ¶
func GetFirstTest ¶
func GetGridByID ¶
func GetGridByTestID ¶
GetGridByTestID returns the grid assigned to the test, if no grid is assigned it will return a blank string with no error
func GetGridProviders ¶
func GetGridRegion ¶
GetGridRegion input the grid id and it returns the grid's region
func GetGridRegions ¶
func GetGridStatus ¶
GetGridStatus input the grid id and returns the grid's status
func GetGridsByStatus ¶
GetGridsByStatus returns a list of grids based on status
func GetLastGrid ¶
func GetLastTest ¶
func GetNumberOfGrids ¶
func GetNumberOfTests ¶
func GetTestAttachmentName ¶
func GetTestAttachments ¶
func GetTestByGridID ¶
GetTestByGridID returns the grid assigned to the test, if no grid is assigned it will return a blank string with no error
func GetTestFiles ¶
test file details: filename STRING, filesize INT, last_modified TIMESTAMP,
func GetTestsByStatus ¶
GetTestsByStatus get all tests that have a status within the list
func GrafanaSnapshot ¶
GrafanaSnapshot saves snapshot links into the database
func InfoForGrafana ¶
InfoForGrafana returns the data needed by grafana to create a snapshot.
func LatestTests ¶
func PutTestAttachment ¶
func RefreshTestStatus ¶
func RefreshTestStatus() error
RefreshTestStatus is used to make sure the test are in the correct status
func TestGetPaginateKey ¶
func TestGetPaginateKey(testID string, startDate time.Time, endDate time.Time, search string, offset int) (string, error)
if an offset of -5 is given, then the test key is given that would allow you to make a call for the previous page with an itemcount of 5.
positive offset is typically not used but is provided, not typically used because to go a page forward you just need to provide the last item in the current list.
func TestPaginate ¶
func UpdateGridStatus ¶
func UpdateGridTemplate ¶
func UpdateGridTemplate(id string, gridTemplate GridTemplate) error
func UpdateTestIDinGrid ¶
UpdateTestIDinGrid is used to update the test id that is associated with a grid.
func UpdateTestStatus ¶
UpdateTestStatus should be used whenever updating a test status. It has special logic to add timestamps depending on the status being set.
Types ¶
type GridStruct ¶
type GridTemplate ¶
type GridTemplate struct { ID string Name string TTL int Provider string Region string Master string `json:"MasterType" db:"master_type"` Slave string `json:"SlaveType" db:"slave_type"` Nodes int `json:"SlaveNodes" db:"slave_nodes"` }
func CreateGridTemplate ¶
func CreateGridTemplate(gridTemplate GridTemplate) (GridTemplate, error)
func GetAllGridTemplates ¶
func GetAllGridTemplates() ([]GridTemplate, error)
func GetGridTemplateById ¶
func GetGridTemplateById(id string) (GridTemplate, error)
type InstanceType ¶
type InstanceType struct {
Name string
}
type Region ¶
type Region struct { Name string InstanceTypes []InstanceType }