Documentation ¶
Index ¶
- func ExternalInterval(interval model.Interval) gqlmodel.StatsInterval
- func InternalInterval(interval gqlmodel.StatsInterval) model.Interval
- func ParseTime(now time.Time, value string, startOf bool, weekday time.Weekday) (time.Time, error)
- func Validate(value string) error
- type RelativeRange
- type StaticRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExternalInterval ¶
func ExternalInterval(interval model.Interval) gqlmodel.StatsInterval
ExternalInterval converts internal to gqlmodel
func InternalInterval ¶
func InternalInterval(interval gqlmodel.StatsInterval) model.Interval
InternalInterval converts gqlmodel to internal
Types ¶
type RelativeRange ¶
RelativeRange represents a relative range.
type StaticRange ¶
StaticRange represents a concrete range.
func ParseRange ¶
func ParseRange(now time.Time, r RelativeRange, interval model.Interval, startOf, endOf time.Weekday) ([]StaticRange, error)
ParseRange parses a range and converts it to static ranges.
Click to show internal directories.
Click to hide internal directories.