67 lines
2.3 KiB
Go
67 lines
2.3 KiB
Go
package protocol
|
|
|
|
type ResourceInspection struct {
|
|
Resource string `json:"resource"`
|
|
Owner *ResourceOwner `json:"owner,omitempty"`
|
|
Waiters []ResourceWaiter `json:"waiters,omitempty"`
|
|
Audits []ResourceRecoveryAudit `json:"audits,omitempty"`
|
|
Pool *ResourcePool `json:"pool,omitempty"`
|
|
}
|
|
|
|
// ResourceTarget is bounded, non-secret metadata for the concrete member that
|
|
// was selected. Credentials and capabilities are intentionally absent.
|
|
type ResourceTarget struct {
|
|
Member string `json:"member"`
|
|
Metadata map[string]string `json:"metadata,omitempty"`
|
|
}
|
|
|
|
type ResourcePoolMember struct {
|
|
Member string `json:"member"`
|
|
Metadata map[string]string `json:"metadata,omitempty"`
|
|
Enabled bool `json:"enabled"`
|
|
Quarantined bool `json:"quarantined,omitempty"`
|
|
}
|
|
|
|
type ResourcePool struct {
|
|
Name string `json:"name"`
|
|
Members []ResourcePoolMember `json:"members"`
|
|
}
|
|
type ResourceOwner struct {
|
|
RunID int64 `json:"run_id"`
|
|
Stage string `json:"stage"`
|
|
Sequence int `json:"sequence"`
|
|
CleanupConfirmed bool `json:"cleanup_confirmed"`
|
|
Quarantined bool `json:"quarantined"`
|
|
AgentActive bool `json:"agent_active"`
|
|
}
|
|
type ResourceWaiter struct {
|
|
RunID int64 `json:"run_id"`
|
|
Stage string `json:"stage"`
|
|
Sequence int `json:"sequence"`
|
|
QueuedAt string `json:"queued_at"`
|
|
}
|
|
type ResourceRecoveryAudit struct {
|
|
Resource string `json:"resource"`
|
|
RunID int64 `json:"run_id"`
|
|
Stage string `json:"stage"`
|
|
Sequence int `json:"sequence"`
|
|
Actor string `json:"actor"`
|
|
Source string `json:"source"`
|
|
Evidence string `json:"evidence"`
|
|
Result string `json:"result"`
|
|
CreatedAt string `json:"created_at"`
|
|
}
|
|
type ResourceRecoveryEvidence struct {
|
|
CleanupConfirmed bool `json:"cleanup_confirmed"`
|
|
NoMutatingAction bool `json:"no_mutating_action"`
|
|
Summary string `json:"summary"`
|
|
}
|
|
type ResourceRecoveryRequest struct {
|
|
Resource string `json:"resource"`
|
|
RunID int64 `json:"run_id"`
|
|
Stage string `json:"stage"`
|
|
Sequence int `json:"sequence"`
|
|
Evidence *ResourceRecoveryEvidence `json:"evidence,omitempty"`
|
|
Actor string `json:"actor"`
|
|
}
|