Documentation ¶
Index ¶
- type Parser
- func (p *Parser) GetDate() time.Time
- func (p *Parser) GetDays() []int
- func (p *Parser) GetInterval() time.Duration
- func (p *Parser) GetNextAllowedDay() int
- func (p Parser) New(ctf string) *Parser
- func (p *Parser) Parse() error
- func (p *Parser) SetDate(t time.Time)
- func (p *Parser) SetInterval(i time.Duration)
- func (p *Parser) SetNextDate(a int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is responsible for parsing the CTF string and assign the right variables such as Interval and the Date to the Parser. Now each task is assigned a Parser meaning that a parser is always present for the scheduler to ask for the Interval and date variables inside the struct.
This design decision is intentional and it is used to rebuild the task from the cloak bolt db database.
func (*Parser) GetInterval ¶
func (*Parser) GetNextAllowedDay ¶
func (*Parser) Parse ¶
Parse will trigger the parsing of the CTF passed while creating new instance of parser
func (*Parser) SetInterval ¶
func (*Parser) SetNextDate ¶
SetNextDate checks the differnce between today's day and the next allowed day component
Click to show internal directories.
Click to hide internal directories.