customcostrequest.go 559 B

1234567891011121314151617181920212223242526272829
  1. package model
  2. import (
  3. "time"
  4. "github.com/opencost/opencost/core/pkg/opencost"
  5. )
  6. type CustomCostRequest struct {
  7. // specifies the window for data to be
  8. // retrieved
  9. TargetWindow *opencost.Window
  10. // the step size to return
  11. Resolution time.Duration
  12. }
  13. func (c CustomCostRequest) GetTargetWindow() *opencost.Window {
  14. return c.TargetWindow
  15. }
  16. func (c CustomCostRequest) GetTargetResolution() time.Duration {
  17. return c.Resolution
  18. }
  19. type CustomCostRequestInterface interface {
  20. GetTargetWindow() *opencost.Window
  21. GetTargetResolution() time.Duration
  22. }