Documentation
¶
Index ¶
- Variables
- func Now() time.Time
- type LastMonthdayPattern
- func (pattern *LastMonthdayPattern) AtHour(hour int) *MinutesPattern
- func (pattern *LastMonthdayPattern) AtMinute(minute int) *SecondsPattern
- func (pattern *LastMonthdayPattern) AtSecond(second int) *RecurringPattern
- func (pattern *LastMonthdayPattern) Build() *RecurringPattern
- func (pattern *LastMonthdayPattern) OnWorkday() *TimePattern
- type MinutesPattern
- type Monthday
- type MonthdayPattern
- func (pattern *MonthdayPattern) AtHour(hour int) *MinutesPattern
- func (pattern *MonthdayPattern) AtMinute(minute int) *SecondsPattern
- func (pattern *MonthdayPattern) AtSecond(second int) *RecurringPattern
- func (pattern *MonthdayPattern) Build() *RecurringPattern
- func (pattern *MonthdayPattern) FromLastDay() *LastMonthdayPattern
- func (pattern *MonthdayPattern) OnWorkday() *TimePattern
- type MonthlyPattern
- func (pattern *MonthlyPattern) AtHour(hour int) *MinutesPattern
- func (pattern *MonthlyPattern) AtMinute(minute int) *SecondsPattern
- func (pattern *MonthlyPattern) AtSecond(second int) *RecurringPattern
- func (pattern *MonthlyPattern) Build() *RecurringPattern
- func (pattern *MonthlyPattern) FromLastDay() *LastMonthdayPattern
- func (pattern *MonthlyPattern) OnDay(day int) *MonthdayPattern
- func (pattern *MonthlyPattern) OnLastWeek(dayOfWeek time.Weekday) *TimePattern
- func (pattern *MonthlyPattern) OnWeek(weekOfMonth int, dayOfWeek time.Weekday) *TimePattern
- func (pattern *MonthlyPattern) OnWorkday() *TimePattern
- type Pattern
- type PatternBuilder
- type RecurSettings
- type RecurringPattern
- func (pattern *RecurringPattern) Build() *RecurringPattern
- func (recurPattern *RecurringPattern) GetWaitTime() *time.Duration
- func (recurPattern *RecurringPattern) IsMatching(chkTime time.Time) bool
- func (pattern *RecurringPattern) MarshalJSON() ([]byte, error)
- func (recurPattern *RecurringPattern) NextTime() time.Time
- func (recurPattern *RecurringPattern) SetWeeklyOffDays(offDays ...time.Weekday) error
- func (recurPattern *RecurringPattern) String() string
- func (pattern *RecurringPattern) UnmarshalJSON(data []byte) error
- type SecondsPattern
- type TimePattern
- type Weekday
- type WeeklyPattern
- type YearlyPattern
- func (pattern *YearlyPattern) Build() *RecurringPattern
- func (pattern *YearlyPattern) Daily() *TimePattern
- func (pattern *YearlyPattern) DailyWithin(from time.Weekday, to time.Weekday) *TimePattern
- func (pattern *YearlyPattern) Every(delay time.Duration) *RecurringPattern
- func (pattern *YearlyPattern) EveryDays(days int) *TimePattern
- func (pattern *YearlyPattern) EveryHours(hours int) *MinutesPattern
- func (pattern *YearlyPattern) EveryMinutes(minutes int) *SecondsPattern
- func (pattern *YearlyPattern) EveryMonths(months int) *MonthlyPattern
- func (pattern *YearlyPattern) EverySeconds(seconds int) *RecurringPattern
- func (pattern *YearlyPattern) EveryWeeks(weeks int) *WeeklyPattern
- func (pattern *YearlyPattern) Monthly() *MonthlyPattern
- func (pattern *YearlyPattern) OnMonths(months ...int) *MonthlyPattern
- func (pattern *YearlyPattern) Weekly() *WeeklyPattern
Constants ¶
This section is empty.
Variables ¶
View Source
var Settings = RecurSettings{DateTimeKind: time.UTC, /* contains filtered or unexported fields */}
Functions ¶
Types ¶
type LastMonthdayPattern ¶
type LastMonthdayPattern struct {
// contains filtered or unexported fields
}
func (*LastMonthdayPattern) AtHour ¶
func (pattern *LastMonthdayPattern) AtHour(hour int) *MinutesPattern
func (*LastMonthdayPattern) AtMinute ¶
func (pattern *LastMonthdayPattern) AtMinute(minute int) *SecondsPattern
func (*LastMonthdayPattern) AtSecond ¶
func (pattern *LastMonthdayPattern) AtSecond(second int) *RecurringPattern
func (*LastMonthdayPattern) Build ¶
func (pattern *LastMonthdayPattern) Build() *RecurringPattern
func (*LastMonthdayPattern) OnWorkday ¶
func (pattern *LastMonthdayPattern) OnWorkday() *TimePattern
type MinutesPattern ¶
type MinutesPattern struct {
// contains filtered or unexported fields
}
func EveryHours ¶
func EveryHours(hours int) *MinutesPattern
func (*MinutesPattern) AtMinute ¶
func (pattern *MinutesPattern) AtMinute(minute int) *SecondsPattern
func (*MinutesPattern) AtSecond ¶
func (pattern *MinutesPattern) AtSecond(second int) *RecurringPattern
func (*MinutesPattern) Build ¶
func (pattern *MinutesPattern) Build() *RecurringPattern
type MonthdayPattern ¶
type MonthdayPattern struct {
// contains filtered or unexported fields
}
func (*MonthdayPattern) AtHour ¶
func (pattern *MonthdayPattern) AtHour(hour int) *MinutesPattern
func (*MonthdayPattern) AtMinute ¶
func (pattern *MonthdayPattern) AtMinute(minute int) *SecondsPattern
func (*MonthdayPattern) AtSecond ¶
func (pattern *MonthdayPattern) AtSecond(second int) *RecurringPattern
func (*MonthdayPattern) Build ¶
func (pattern *MonthdayPattern) Build() *RecurringPattern
func (*MonthdayPattern) FromLastDay ¶
func (pattern *MonthdayPattern) FromLastDay() *LastMonthdayPattern
func (*MonthdayPattern) OnWorkday ¶
func (pattern *MonthdayPattern) OnWorkday() *TimePattern
type MonthlyPattern ¶
type MonthlyPattern struct {
// contains filtered or unexported fields
}
func EveryMonths ¶
func EveryMonths(months int) *MonthlyPattern
func Monthly ¶
func Monthly() *MonthlyPattern
func OnMonths ¶
func OnMonths(months ...int) *MonthlyPattern
func (*MonthlyPattern) AtHour ¶
func (pattern *MonthlyPattern) AtHour(hour int) *MinutesPattern
func (*MonthlyPattern) AtMinute ¶
func (pattern *MonthlyPattern) AtMinute(minute int) *SecondsPattern
func (*MonthlyPattern) AtSecond ¶
func (pattern *MonthlyPattern) AtSecond(second int) *RecurringPattern
func (*MonthlyPattern) Build ¶
func (pattern *MonthlyPattern) Build() *RecurringPattern
func (*MonthlyPattern) FromLastDay ¶
func (pattern *MonthlyPattern) FromLastDay() *LastMonthdayPattern
func (*MonthlyPattern) OnDay ¶
func (pattern *MonthlyPattern) OnDay(day int) *MonthdayPattern
func (*MonthlyPattern) OnLastWeek ¶
func (pattern *MonthlyPattern) OnLastWeek(dayOfWeek time.Weekday) *TimePattern
func (*MonthlyPattern) OnWeek ¶
func (pattern *MonthlyPattern) OnWeek(weekOfMonth int, dayOfWeek time.Weekday) *TimePattern
func (*MonthlyPattern) OnWorkday ¶
func (pattern *MonthlyPattern) OnWorkday() *TimePattern
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
func (*Pattern) Build ¶
func (pattern *Pattern) Build() *RecurringPattern
func (*Pattern) EveryYears ¶
func (pattern *Pattern) EveryYears(years int) *YearlyPattern
func (*Pattern) Yearly ¶
func (pattern *Pattern) Yearly() *YearlyPattern
type PatternBuilder ¶
type PatternBuilder interface {
Build() *RecurringPattern
}
type RecurSettings ¶
func (*RecurSettings) GetWeeklyOffDays ¶
func (settings *RecurSettings) GetWeeklyOffDays() []time.Weekday
func (*RecurSettings) SetWeeklyOffDays ¶
func (settings *RecurSettings) SetWeeklyOffDays(offDays ...time.Weekday) error
type RecurringPattern ¶
type RecurringPattern struct {
Start time.Time
WaitSeconds *int `json:",omitempty"`
WaitMonths *int `json:",omitempty"`
WaitYears *int `json:",omitempty"`
AllowedWeekdays []Weekday `json:",omitempty"`
Weeks []int `json:",omitempty"`
AllowedDays []Monthday `json:",omitempty"`
AllowedMonths []int `json:",omitempty"`
WeeklyOffDays []time.Weekday
// contains filtered or unexported fields
}
func Every ¶
func Every(delay time.Duration) *RecurringPattern
func EverySeconds ¶
func EverySeconds(seconds int) *RecurringPattern
func NewRecurringPattern ¶
func NewRecurringPattern() *RecurringPattern
func (*RecurringPattern) Build ¶
func (pattern *RecurringPattern) Build() *RecurringPattern
func (*RecurringPattern) GetWaitTime ¶
func (recurPattern *RecurringPattern) GetWaitTime() *time.Duration
func (*RecurringPattern) IsMatching ¶
func (recurPattern *RecurringPattern) IsMatching(chkTime time.Time) bool
func (*RecurringPattern) MarshalJSON ¶
func (pattern *RecurringPattern) MarshalJSON() ([]byte, error)
func (*RecurringPattern) NextTime ¶
func (recurPattern *RecurringPattern) NextTime() time.Time
func (*RecurringPattern) SetWeeklyOffDays ¶
func (recurPattern *RecurringPattern) SetWeeklyOffDays(offDays ...time.Weekday) error
func (*RecurringPattern) String ¶
func (recurPattern *RecurringPattern) String() string
func (*RecurringPattern) UnmarshalJSON ¶
func (pattern *RecurringPattern) UnmarshalJSON(data []byte) error
type SecondsPattern ¶
type SecondsPattern struct {
// contains filtered or unexported fields
}
func EveryMinutes ¶
func EveryMinutes(minutes int) *SecondsPattern
func (*SecondsPattern) AtSecond ¶
func (pattern *SecondsPattern) AtSecond(second int) *RecurringPattern
func (*SecondsPattern) Build ¶
func (pattern *SecondsPattern) Build() *RecurringPattern
type TimePattern ¶
type TimePattern struct {
// contains filtered or unexported fields
}
func Daily ¶
func Daily() *TimePattern
func DailyWithin ¶
func DailyWithin(from time.Weekday, to time.Weekday) *TimePattern
func EveryDays ¶
func EveryDays(days int) *TimePattern
func (*TimePattern) AtHour ¶
func (pattern *TimePattern) AtHour(hour int) *MinutesPattern
func (*TimePattern) AtMinute ¶
func (pattern *TimePattern) AtMinute(minute int) *SecondsPattern
func (*TimePattern) AtSecond ¶
func (pattern *TimePattern) AtSecond(second int) *RecurringPattern
func (*TimePattern) Build ¶
func (pattern *TimePattern) Build() *RecurringPattern
type WeeklyPattern ¶
type WeeklyPattern struct {
// contains filtered or unexported fields
}
func EveryWeeks ¶
func EveryWeeks(weeks int) *WeeklyPattern
func Weekly ¶
func Weekly() *WeeklyPattern
func (*WeeklyPattern) Build ¶
func (pattern *WeeklyPattern) Build() *RecurringPattern
func (*WeeklyPattern) OnDayOfWeek ¶
func (pattern *WeeklyPattern) OnDayOfWeek(dayOfWeek time.Weekday) *TimePattern
type YearlyPattern ¶
type YearlyPattern struct {
// contains filtered or unexported fields
}
func EveryYears ¶
func EveryYears(years int) *YearlyPattern
func Yearly ¶
func Yearly() *YearlyPattern
func (*YearlyPattern) Build ¶
func (pattern *YearlyPattern) Build() *RecurringPattern
func (*YearlyPattern) Daily ¶
func (pattern *YearlyPattern) Daily() *TimePattern
func (*YearlyPattern) DailyWithin ¶
func (pattern *YearlyPattern) DailyWithin(from time.Weekday, to time.Weekday) *TimePattern
func (*YearlyPattern) Every ¶
func (pattern *YearlyPattern) Every(delay time.Duration) *RecurringPattern
func (*YearlyPattern) EveryDays ¶
func (pattern *YearlyPattern) EveryDays(days int) *TimePattern
func (*YearlyPattern) EveryHours ¶
func (pattern *YearlyPattern) EveryHours(hours int) *MinutesPattern
func (*YearlyPattern) EveryMinutes ¶
func (pattern *YearlyPattern) EveryMinutes(minutes int) *SecondsPattern
func (*YearlyPattern) EveryMonths ¶
func (pattern *YearlyPattern) EveryMonths(months int) *MonthlyPattern
func (*YearlyPattern) EverySeconds ¶
func (pattern *YearlyPattern) EverySeconds(seconds int) *RecurringPattern
func (*YearlyPattern) EveryWeeks ¶
func (pattern *YearlyPattern) EveryWeeks(weeks int) *WeeklyPattern
func (*YearlyPattern) Monthly ¶
func (pattern *YearlyPattern) Monthly() *MonthlyPattern
func (*YearlyPattern) OnMonths ¶
func (pattern *YearlyPattern) OnMonths(months ...int) *MonthlyPattern
func (*YearlyPattern) Weekly ¶
func (pattern *YearlyPattern) Weekly() *WeeklyPattern
Click to show internal directories.
Click to hide internal directories.