Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calendar ¶
type Calendar struct {
// contains filtered or unexported fields
}
func NewCalendar ¶
func (*Calendar) BuildTimesheet ¶
type Holidays ¶
type Holidays []struct { Date string `json:"date"` LocalName string `json:"localName"` Name string `json:"name"` CountryCode string `json:"countryCode"` Fixed bool `json:"fixed"` Global bool `json:"global"` Counties interface{} `json:"counties"` LaunchYear interface{} `json:"launchYear"` Type string `json:"type"` }
Holidays models the response of https://date.nager.at/api/v2/PublicHolidays/2021/RO
type PublicHoliday ¶
type PublicHoliday struct {
// contains filtered or unexported fields
}
func NewPublicHoliday ¶
func NewPublicHoliday(api PublicHolidayAPI, logger log.Logger) *PublicHoliday
func (*PublicHoliday) GetDates ¶
func (l *PublicHoliday) GetDates() []int
func (*PublicHoliday) HasDate ¶
func (ph *PublicHoliday) HasDate(d int) bool
func (*PublicHoliday) Parse ¶
func (ph *PublicHoliday) Parse(cfg Config, ldom int)
Parse processes the data from the API into a slice of day-dates of public holidays
type PublicHolidayAPI ¶
type PublicHolidayAPI struct {
// contains filtered or unexported fields
}
func NewPublicHolidayAPI ¶
func NewPublicHolidayAPI(logger log.Logger) *PublicHolidayAPI
func (*PublicHolidayAPI) Fetch ¶
func (api *PublicHolidayAPI) Fetch(year int) Holidays
Fetch handles the low-level fetching on the API
Click to show internal directories.
Click to hide internal directories.