73 lines
2.0 KiB
Go
73 lines
2.0 KiB
Go
package media_shard
|
|
|
|
import "time"
|
|
|
|
type Spec struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Mode string `json:"mode"`
|
|
ControlAPI string `json:"controlAPI"`
|
|
Capacity int `json:"capacity"`
|
|
}
|
|
|
|
type Summary struct {
|
|
Total int `json:"total"`
|
|
Available int `json:"available"`
|
|
Failed int `json:"failed"`
|
|
Configured int `json:"configuredCapacity"`
|
|
Assigned int `json:"assignedPaths"`
|
|
Impacted int `json:"impactedPaths"`
|
|
}
|
|
|
|
type Response struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Mode string `json:"mode"`
|
|
Status string `json:"status"`
|
|
Detail string `json:"detail"`
|
|
Capacity int `json:"capacity"`
|
|
AssignedPaths int `json:"assignedPaths"`
|
|
Remaining int `json:"remaining"`
|
|
LastProbeAt *time.Time `json:"lastProbeAt,omitempty"`
|
|
Stale bool `json:"stale"`
|
|
}
|
|
|
|
type Impact struct {
|
|
RouteID string `json:"routeId"`
|
|
DeviceID string `json:"deviceId"`
|
|
DeviceName string `json:"deviceName"`
|
|
Location string `json:"location"`
|
|
ProfileToken string `json:"profileToken"`
|
|
Path string `json:"path"`
|
|
Desired string `json:"desired"`
|
|
Actual string `json:"actual"`
|
|
}
|
|
|
|
type DetailResponse struct {
|
|
Response
|
|
Impact []Impact `json:"impact"`
|
|
}
|
|
|
|
type PageResponse struct {
|
|
Summary Summary `json:"summary"`
|
|
List []Response `json:"list"`
|
|
Count int64 `json:"count"`
|
|
}
|
|
|
|
type Check struct {
|
|
Name string `json:"name"`
|
|
Passed bool `json:"passed"`
|
|
Detail string `json:"detail"`
|
|
}
|
|
|
|
type PreflightResponse struct {
|
|
SourceShardID string `json:"sourceShardId"`
|
|
TargetShardID string `json:"targetShardId,omitempty"`
|
|
TargetShardName string `json:"targetShardName,omitempty"`
|
|
ImpactedPaths int `json:"impactedPaths"`
|
|
Ready bool `json:"ready"`
|
|
ExecutionAuthorized bool `json:"executionAuthorized"`
|
|
RequiresIssue bool `json:"requiresSeparateHighRiskIssue"`
|
|
Checks []Check `json:"checks"`
|
|
}
|