Documentation ¶
Index ¶
- type Event
- func (e *Event) AsTime() (time.Time, bool)
- func (e *Event) Field(typeValue TypeValue) *Value
- func (e *Event) GetAllInBetween(start, end time.Time) []time.Time
- func (e *Event) Input() string
- func (e *Event) IsDaily() bool
- func (e *Event) IsMonthly() bool
- func (e *Event) IsWeekly() bool
- func (e *Event) Next(from time.Time) time.Time
- func (e *Event) Parse(input string) error
- func (e *Event) String() string
- type Range
- type TypeValue
- type Value
- func (v *Value) AddRange(start int, end int) error
- func (v *Value) AddValue(value int) error
- func (v *Value) GetRangeValues() []int
- func (v *Value) GetRanges() []Range
- func (v *Value) GetType() TypeValue
- func (v *Value) HasContiguousRange() bool
- func (v *Value) HasLongContiguousRange() bool
- func (v *Value) HasRange() bool
- func (v *Value) HasSingleValue() bool
- func (v *Value) HasValue() bool
- func (v *Value) IsInRange(ref int) bool
- func (v *Value) MustAddRange(min int, max int)
- func (v *Value) MustAddValue(value int)
- func (v *Value) Parse(input string, postProcess ...postProcessFunc) error
- func (v *Value) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { WeekDay *Value Year *Value Month *Value Day *Value Hour *Value Minute *Value Second *Value // contains filtered or unexported fields }
Event represents a calendar event. It can be one specific point in time, or a recurring event
func (*Event) AsTime ¶
AsTime returns a time.Time representation of the event if possible, if not possible the second value will be false
func (*Event) GetAllInBetween ¶
GetAllInBetween returns all activation times of the event in between these two dates. the minimum increment is 1 minute
func (*Event) IsDaily ¶
IsDaily means all events are within a day (from once to multiple times a day)
func (*Event) IsMonthly ¶
IsMonthly means all events runs on specific days of the month, and/or specific months.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is represented by either no value, a single value, or a range of values
func NewValueFromType ¶
NewValueFromType creates a new value from a predefined type
func (*Value) GetRangeValues ¶
GetRangeValues returns a list of values
func (*Value) GetRanges ¶
GetRanges returns a list or range of values (from Range.Start to Range.End)
func (*Value) HasContiguousRange ¶
HasContiguousRange is true when two or more values are contiguous
func (*Value) HasLongContiguousRange ¶
HasLongContiguousRange is true when three or more values are contiguous
func (*Value) HasSingleValue ¶
HasSingleValue is true when a exactly one value has been set
func (*Value) MustAddRange ¶
MustAddRange adds a range of values from min to max and panics if an error occurs
func (*Value) MustAddValue ¶
MustAddValue adds a new value and panics if an error arises