table.go 725 B

123456789101112131415161718192021222324
  1. package report
  2. // Table is the type for a table in the UI.
  3. type Table struct {
  4. ID string `json:"id"`
  5. Label string `json:"label"`
  6. Type string `json:"type"`
  7. Columns []Column `json:"columns"`
  8. Rows []Row `json:"rows"`
  9. TruncationCount int `json:"truncationCount,omitempty"`
  10. }
  11. // Column is the type for multi-column tables in the UI.
  12. type Column struct {
  13. ID string `json:"id"`
  14. Label string `json:"label"`
  15. DataType string `json:"dataType"`
  16. }
  17. // Row is the type that holds the table data for the UI. Entries map from column ID to cell value.
  18. type Row struct {
  19. ID string `json:"id"`
  20. Entries map[string]string `json:"entries"`
  21. }