Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoIncludeRules = errors.New("no include rules specified")
Functions ¶
This section is empty.
Types ¶
type RegexpListItem ¶
func ParseRegexpListItem ¶
func ParseRegexpListItem(val string) (RegexpListItem, error)
func (RegexpListItem) String ¶
func (r RegexpListItem) String() string
type RegexpMatcher ¶
type RegexpMatcher struct {
// contains filtered or unexported fields
}
func NewRegexpMatcher ¶
func NewRegexpMatcher(include, exclude []*regexp.Regexp) (*RegexpMatcher, error)
NewRegexpMatcher returns the RegexpMatcher with given include and exclude rules.
func NewRegexpMatcherFromList ¶
func NewRegexpMatcherFromList(l []RegexpListItem) (*RegexpMatcher, error)
func (*RegexpMatcher) Inverse ¶
func (r *RegexpMatcher) Inverse() *RegexpMatcher
Inverse returns a new RegexpMatcher that inverts the match result.
func (*RegexpMatcher) Match ¶
func (r *RegexpMatcher) Match(s string) bool
Match returns true if the given string matches at least one of the include rules and does not match the exclude rules.
type TimeFrameEntry ¶ added in v1.6.0
type TimeFrameEntry struct {
Weekday time.Weekday // Weekday is 0-6, going from Sunday to Saturday
HourStart int // 24h system
HourEnd int // 24h system
}
func ParseTimeFrameEntry ¶ added in v1.6.0
func ParseTimeFrameEntry(repr string) (TimeFrameEntry, error)
func (*TimeFrameEntry) Match ¶ added in v1.6.0
func (t *TimeFrameEntry) Match(timeToMatch time.Time) bool
func (*TimeFrameEntry) Validate ¶ added in v1.6.0
func (t *TimeFrameEntry) Validate() error
Click to show internal directories.
Click to hide internal directories.