26 lines
662 B
Go
26 lines
662 B
Go
package protocol
|
|
|
|
type RunCounts struct {
|
|
Total int `json:"total"`
|
|
Succeeded int `json:"succeeded"`
|
|
Failed int `json:"failed"`
|
|
Canceled int `json:"canceled"`
|
|
Interrupted int `json:"interrupted"`
|
|
Active int `json:"active"`
|
|
AverageSeconds float64 `json:"average_seconds"`
|
|
}
|
|
type PipelineUsage struct {
|
|
PipelineID int64 `json:"pipeline_id"`
|
|
Name string `json:"name"`
|
|
RunCounts
|
|
}
|
|
type DailyUsage struct {
|
|
Date string `json:"date"`
|
|
Runs int `json:"runs"`
|
|
}
|
|
type UsageStats struct {
|
|
RunCounts
|
|
Pipelines []PipelineUsage `json:"pipelines"`
|
|
Days []DailyUsage `json:"days"`
|
|
}
|