Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvKeyJobName = "JOB_NAME" EnvKeyPodName = "POD_NAME" )
View Source
const ( // Job is the `job` Endpoint map key Job = "job" // JobUpdate is the `job` PUT Endpoint map key JobUpdate = "jobUpdate" // Statistic is the `result` Endpoint map key Statistic = "statistic" // Timing is the `timing` Endpoint map key Timing = "timing" // Status is the `status` Endpoint map key Status = "status" )
Variables ¶
View Source
var Endpoints = map[string]string{ Job: "/job", JobUpdate: "/job/:id", Statistic: "/result", Timing: "/timing", Status: "/status", }
Examples of endpoints for accessing the test results DB
View Source
var HTTPClient *http.Client
HTTPClient is the http.Client to use for all REST API requests
Functions ¶
func GuardProduction ¶
GuardProduction will cause a test to fail if the URL looks like a production URL. Use this as the first line in a Test to prevent accidentally saving library tests results in production DB.
Types ¶
type Db ¶
type Db struct {
GcpProjectID string
}
Represents a DB client
func (*Db) SaveJobStart ¶
Writes the initial job record to DB and returns the row ID This marks the start of a test run
type MySQLTime ¶
MySQLTime is a wrapper on time.Time that will marshall to MySQL timestamp format for Json
func (MySQLTime) MarshalJSON ¶
type ServerResponse ¶
Click to show internal directories.
Click to hide internal directories.