Documentation
¶
Index ¶
- Variables
- type All
- type Any
- type CommonExp
- type DayOfMonth
- type DayOfMonthExp
- type DayOfWeek
- type DayOfWeekExp
- type Expression
- type Hours
- type HoursExp
- type Increment
- type Instance
- type LastOfMonth
- type LastOfWeek
- type Minutes
- type MinutesExp
- type Month
- type MonthExp
- type MonthName
- type MonthRange
- type Number
- type NumberRange
- type WeekName
- type WeekRange
- type Weekday
- type Year
- type YearExp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Parser = participle.MustBuild[Expression]( participle.Lexer(cronLexer), ) )
Functions ¶
This section is empty.
Types ¶
type CommonExp ¶
type CommonExp struct {
Increment *Increment `@@`
NumberRange *NumberRange `| @@`
Number *Number `| @@`
All *All `| @@`
}
type DayOfMonth ¶
type DayOfMonth struct {
Exps []*DayOfMonthExp `@@ ( "," @@ )*`
}
func (*DayOfMonth) HasAny ¶
func (v *DayOfMonth) HasAny() bool
func (*DayOfMonth) String ¶
func (v *DayOfMonth) String() string
type DayOfMonthExp ¶
type DayOfMonthExp struct {
Weekday *Weekday `@@ |`
CommonExp
Any *Any `| @@`
Last *LastOfMonth `| @@`
}
day of month
func (*DayOfMonthExp) String ¶
func (v *DayOfMonthExp) String() string
type DayOfWeek ¶
type DayOfWeek struct {
Exps []*DayOfWeekExp `@@ ( "," @@ )*`
}
type DayOfWeekExp ¶
type DayOfWeekExp struct {
Instance *Instance `@@ |`
CommonExp
NameRange *WeekRange `| @@`
Name *WeekName `| @@`
Any *Any `| @@`
Last *LastOfWeek `| @@`
}
day of week
func (*DayOfWeekExp) String ¶
func (v *DayOfWeekExp) String() string
type Expression ¶
type Expression struct {
Minutes *Minutes `@@`
Hours *Hours `SP @@`
DayOfMonth *DayOfMonth `SP @@`
Month *Month `SP @@`
DayOfWeek *DayOfWeek `SP @@`
Year *Year `SP @@`
}
func Parse ¶
func Parse(exp string) (*Expression, error)
func (*Expression) String ¶
func (v *Expression) String() string
type LastOfMonth ¶
type LastOfMonth struct {
Value struct{} `"L"`
}
last of month
func (*LastOfMonth) String ¶
func (v *LastOfMonth) String() string
type LastOfWeek ¶
type LastOfWeek struct {
Value struct{} `"L"`
}
last of week
func (*LastOfWeek) String ¶
func (v *LastOfWeek) String() string
type Minutes ¶
type Minutes struct {
Exps []*MinutesExp `@@ ( "," @@ )*`
}
type MinutesExp ¶
type MinutesExp struct {
CommonExp
}
minutes
func (*MinutesExp) String ¶
func (v *MinutesExp) String() string
type MonthExp ¶
type MonthExp struct {
CommonExp
NameRange *MonthRange `| @@`
Name *MonthName `| @@`
Any *Any `| @@`
}
month
type NumberRange ¶
number range
func (*NumberRange) Match ¶
func (v *NumberRange) Match(x int) bool
func (*NumberRange) String ¶
func (v *NumberRange) String() string
Click to show internal directories.
Click to hide internal directories.