request.go 534 B

12345678910111213141516171819202122
  1. package autocomplete
  2. import (
  3. "github.com/opencost/opencost/core/pkg/filter"
  4. "github.com/opencost/opencost/core/pkg/opencost"
  5. )
  6. // Request is the shared autocomplete request shape used by allocation, asset, and cloud cost APIs.
  7. type Request struct {
  8. TenantID string
  9. Search string
  10. Field string
  11. Limit int
  12. Window opencost.Window
  13. Filter filter.Filter
  14. LabelConfig *opencost.LabelConfig
  15. }
  16. // Response is the shared autocomplete response shape.
  17. type Response struct {
  18. Data []string `json:"data"`
  19. }