Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeWindow ¶
type TimeWindow struct {
// contains filtered or unexported fields
}
TimeWindow specifies a set of time windows on each day of the week in which a roller is allowed to upload rolls.
func Parse ¶
func Parse(s string) (*TimeWindow, error)
Parse returns a TimeWindow instance based on the given string. Times are interpreted as GMT. The accepted format is as follows:
FullWindowExpr = SingleDayWindowExpr(;SingleDayWindowExpr)* SingleDayWindowExpr = DayRangesExpr TimeExpr-TimeExpr DayRangesExpr = (*|DayRangeExpr(,DayRangeExpr)*) DayRangeExpr = DayExpr(-DayExpr)? DayExpr = (Su|M|Tu|W|Th|F|Sa) TimeExpr = \d\d:\d\d
Examples:
Day range: M-F 09:00-17:00 Every day: * 00:00-23:59 Multiple days, same time: Sa,M-W 08:00-09:00 Multiple days, different times: Sa 08:00-09:00; M-W 12:00-03:00 Wrap around to next day: M-F 22:00-02:00
Click to show internal directories.
Click to hide internal directories.