Documentation ¶
Overview ¶
*
- @license
- Copyright (C) 2018 Dinko Korunic, InfoMAR *
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2 of the License, or (at your
- option) any later version. *
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details. *
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Index ¶
Constants ¶
View Source
const ( // URL is a country-local holiday calendar in ICS format. URL = "https://www.officeholidays.com/ics/ics_country_iso.php?tbl_country=%s" // DefaultTimeout is a default ICS fetch HTTP timeout. DefaultTimeout = 10 * time.Second )
Variables ¶
View Source
var ErrNilBody = errors.New("client body is nil")
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.7.0
Client is an ICS HTTP client for remote fetching/parsing ICS calendar.
func NewClientWithContext ¶ added in v0.7.0
NewClientWithContext creates a HTTP client structure for ICS fetch/parse with ctx Context.
func (*Client) GetResponse ¶ added in v0.7.0
GetResponse fetches a HTTP response from officeholldays site with country-local ICS as a body.
Click to show internal directories.
Click to hide internal directories.