Validate validates the time window checking From and To are set
()
| 67 | |
| 68 | // Validate validates the time window checking From and To are set |
| 69 | func (tw *TimeWindow) Validate() error { |
| 70 | if tw.From.IsZero() || tw.To.IsZero() { |
| 71 | return NewErrInvalidTimeWindowStr("from and to time must be set in time window") |
| 72 | } |
| 73 | |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | func NewOrgMetricsUseCase(r OrgMetricsRepo, orgRepo OrganizationRepo, wfUseCase *WorkflowUseCase, l log.Logger) (*OrgMetricsUseCase, error) { |
| 78 | return &OrgMetricsUseCase{ |