Documentation
¶
Index ¶
Constants ¶
View Source
const (
// a short time format; like time.Kitchen but with 24-hour notation.
Kitchen24 = "15:04"
// a time format that just cares about the day and month.
YearDay = "Jan_2"
)
Variables ¶
This section is empty.
Functions ¶
func NewPod ¶ added in v0.7.0
func NewPod(namespace, name string, phase v1.PodPhase) v1.Pod
NewPod returns a new pod instance for testing purposes.
func ParseWeekdays ¶ added in v0.7.0
func ParseWeekdays(weekdays string) []time.Weekday
ParseWeekdays takes a comma-separated list of abbreviated weekdays (e.g. sat,sun) and turns them into a slice of time.Weekday. It ignores any whitespace and any invalid weekdays.
Types ¶
type TimePeriod ¶ added in v0.8.0
type TimePeriod struct {
From time.Time
To time.Time
}
TimePeriod represents a time period with a single beginning and end.
func NewTimePeriod ¶ added in v0.8.0
func NewTimePeriod(from, to time.Time) TimePeriod
NewTimePeriod returns a normalized TimePeriod given a start and end time.
func ParseTimePeriods ¶ added in v0.8.0
func ParseTimePeriods(timePeriods string) ([]TimePeriod, error)
ParseTimePeriods takes a comma-separated list of time periods in Kitchen24 format and turns them into a slice of TimePeriods. It ignores any whitespace.
Click to show internal directories.
Click to hide internal directories.