status.go 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. package kubecost
  2. import "time"
  3. // ETLStatus describes ETL metadata
  4. type ETLStatus struct {
  5. Coverage Window `json:"coverage"`
  6. LastRun time.Time `json:"lastRun"`
  7. Progress float64 `json:"progress"`
  8. RefreshRate string `json:"refreshRate"`
  9. StartTime time.Time `json:"startTime"`
  10. UTCOffset string `json:"utcOffset"`
  11. Backup *DirectoryStatus `json:"backup,omitempty"`
  12. }
  13. // DirectoryStatus describes metadata of a directory of files
  14. type DirectoryStatus struct {
  15. Path string `json:"path"`
  16. Size string `json:"size"`
  17. LastModified time.Time `json:"lastModified"`
  18. FileCount int `json:"fileCount"`
  19. Files []FileStatus `json:"files"`
  20. }
  21. // FileStatus describes the metadata of a single file
  22. type FileStatus struct {
  23. Name string `json:"name"`
  24. Size string `json:"size"`
  25. LastModified time.Time `json:"lastModified"`
  26. Details map[string]string `json:"details,omitempty"`
  27. Errors []string `json:"errors,omitempty"`
  28. Warnings []string `json:"warnings,omitempty"`
  29. }