Documentation
¶
Index ¶
- func ParseSeconds(s string) (int64, int64, error)
- func ParseUnixTime(seconds string) (time.Time, error)
- func Route(r chi.Router, runOpts *options.ServerConfig)
- func RouteStopped(r chi.Router, runOpts *options.ServerConfig)
- func SecondsToInts(seconds float64) (int64, int64)
- type HTTPError
- type KillMsg
- type PyResult
- type Repo
- type ReposResponse
- type WrappedReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSeconds ¶
ParseSeconds turns a string of fractional seconds into Seconds and Nanoseconds
func ParseUnixTime ¶
ParseUnixTime turns a string of fractional seconds into time.Time
func Route ¶
func Route(r chi.Router, runOpts *options.ServerConfig)
Route will set up the API and such
func RouteStopped ¶
func RouteStopped(r chi.Router, runOpts *options.ServerConfig)
RouteStopped is for testing
func SecondsToInts ¶
SecondsToInts turns a float64 Second into Seconds and Nanoseconds
Types ¶
type HTTPError ¶
type HTTPError struct {
Success bool `json:"success"`
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Detail string `json:"detail,omitempty"`
}
HTTPError for http errors
type PyResult ¶
type PyResult struct {
Created float64 `json:"created"`
Duration float64 `json:"duration"`
ExitCode int `json:"exitcode"`
Root string `json:"root"`
/*
Environment struct {
Python string `json:"Python"`
Platform string `json:"Platform"`
Packages struct {
Pytest string `json:"pytest"`
Py string `json:"py"`
Pluggy string `json:"pluggy"`
} `json:"Packages"`
Plugins struct {
HTML string `json:"html"`
Metadata string `json:"metadata"`
JSONReport string `json:"json-report"`
} `json:"Plugins"`
} `json:"environment"`
Summary struct {
Passed int `json:"passed"`
Total int `json:"total"`
Collected int `json:"collected"`
} `json:"summary"`
Collectors []struct {
Nodeid string `json:"nodeid"`
Outcome string `json:"outcome"`
Result []struct {
Nodeid string `json:"nodeid"`
Type string `json:"type"`
} `json:"result"`
} `json:"collectors"`
*/
Tests []struct {
NodeID string `json:"nodeid"`
LineNo int `json:"lineno"`
Outcome string `json:"outcome"`
Keywords []string `json:"keywords"`
Setup struct {
Duration float64 `json:"duration"`
Outcome string `json:"outcome"`
} `json:"setup"`
Call struct {
Duration float64 `json:"duration"`
Outcome string `json:"outcome"`
} `json:"call"`
Teardown struct {
Duration float64 `json:"duration"`
Outcome string `json:"outcome"`
} `json:"teardown"`
} `json:"tests"`
}
PyResult is the pytest report
type Repo ¶
type Repo struct {
ID string `json:"id"`
CloneURL string `json:"clone_url"`
Promotions []string `json:"_promotions"`
}
Repo is one of the elements of /api/repos
type ReposResponse ¶
ReposResponse is the successful response to /api/repos
type WrappedReport ¶
WrappedReport wraps results
func PyResultToReport ¶
func PyResultToReport(pyresult PyResult) WrappedReport
PyResultToReport converts from pytest's result.json to the GitDeploy report format
Click to show internal directories.
Click to hide internal directories.