Documentation ¶
Overview ¶
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
- Variables
- func Check(d Date)
- func DateMatches(candidate Date, reference Date) bool
- func Execute()
- func HasRunTodaysUpdates() bool
- func MarkTodaysUpdatesAsRead()
- func PrintEvents(events []Event)
- func PrintKnockEvents(events []KnockEvent)
- type Calendar
- type Date
- type Event
- type EventsFileModel
- type KnockEvent
- type KnockEvents
- type MatchingEvents
Constants ¶
This section is empty.
Variables ¶
var ( Title string Knock string )
Functions ¶
func DateMatches ¶
Preconditions: reference date has no wildcard in year, month or day position
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func HasRunTodaysUpdates ¶
func HasRunTodaysUpdates() bool
Function that checks whether today's update checking has been completed.
func MarkTodaysUpdatesAsRead ¶
func MarkTodaysUpdatesAsRead()
func PrintEvents ¶
func PrintEvents(events []Event)
func PrintKnockEvents ¶
func PrintKnockEvents(events []KnockEvent)
Types ¶
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
func DateAfterAddition ¶
Add the given number of days and return the Date
Preconditions: date contains no wildcard in year, month, or day positions
type Event ¶
type EventsFileModel ¶ added in v1.2.0
type EventsFileModel struct {
Events []Event
}
type KnockEvent ¶
type KnockEvents ¶
type KnockEvents []KnockEvent
This struct is made for to implement sort on slice of knock events
func (KnockEvents) Len ¶
func (k KnockEvents) Len() int
func (KnockEvents) Less ¶
func (k KnockEvents) Less(i, j int) bool
func (KnockEvents) Swap ¶
func (k KnockEvents) Swap(i, j int)
type MatchingEvents ¶
type MatchingEvents struct { Today []Event Knock []KnockEvent }
A collection of matching events
func CheckEventsOnDate ¶
func CheckEventsOnDate(date Date, events []Event) MatchingEvents
Returns matching events for the given date Note that it only matches events on the same calendar This means that if you would like to get matching events from all calendars, you'll have to run this dates with different calendars