diagnostic.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. syntax = "proto3";
  2. import "google/protobuf/timestamp.proto";
  3. package kubemodel;
  4. option go_package = "github.com/opencost/opencost/core/pkg/model/pb/kubemodel";
  5. // DiagnosticResult represents the result of a diagnostic run
  6. // This matches the JSON structure from core/pkg/diagnostics/diagnostics.go
  7. message DiagnosticResult {
  8. // Unique Identifier for the diagnostic run result
  9. string id = 1;
  10. // Name of the diagnostic that ran
  11. string name = 2;
  12. // Description of the diagnostic run, human readable description
  13. string description = 3;
  14. // Category of the diagnostic run, used to group similar diagnostics
  15. string category = 4;
  16. // Timestamp when the diagnostic run was executed
  17. google.protobuf.Timestamp timestamp = 5;
  18. // Error message if the diagnostic run failed (optional)
  19. string error = 6;
  20. // Additional custom information about the diagnostic run
  21. // Using string values to match map[string]any from JSON
  22. map<string, string> details = 7;
  23. }
  24. // DiagnosticsRunReport contains the start time and all diagnostic results
  25. // This matches the JSON structure from core/pkg/diagnostics/diagnostics.go
  26. message DiagnosticsRunReport {
  27. // Application name that the diagnostics run belongs to
  28. string application = 1;
  29. // Time when the full diagnostics run started
  30. google.protobuf.Timestamp startTime = 2;
  31. // All results of the diagnostics run
  32. repeated DiagnosticResult results = 3;
  33. }