Documentation
¶
Overview ¶
Package openholidays provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.2.0 DO NOT EDIT.
Package openholidays provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.2.0 DO NOT EDIT.
Index ¶
- func NewGetCountriesRequest(server string, params *GetCountriesParams) (*http.Request, error)
- func NewGetLanguagesRequest(server string, params *GetLanguagesParams) (*http.Request, error)
- func NewGetPublicHolidaysByDateRequest(server string, params *GetPublicHolidaysByDateParams) (*http.Request, error)
- func NewGetPublicHolidaysRequest(server string, params *GetPublicHolidaysParams) (*http.Request, error)
- func NewGetSchoolHolidaysByDateRequest(server string, params *GetSchoolHolidaysByDateParams) (*http.Request, error)
- func NewGetSchoolHolidaysRequest(server string, params *GetSchoolHolidaysParams) (*http.Request, error)
- func NewGetStatisticsPublicHolidaysRequest(server string, params *GetStatisticsPublicHolidaysParams) (*http.Request, error)
- func NewGetStatisticsSchoolHolidaysRequest(server string, params *GetStatisticsSchoolHolidaysParams) (*http.Request, error)
- func NewGetSubdivisionsRequest(server string, params *GetSubdivisionsParams) (*http.Request, error)
- type Client
- func (c *Client) GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetLanguages(ctx context.Context, params *GetLanguagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPublicHolidays(ctx context.Context, params *GetPublicHolidaysParams, ...) (*http.Response, error)
- func (c *Client) GetPublicHolidaysByDate(ctx context.Context, params *GetPublicHolidaysByDateParams, ...) (*http.Response, error)
- func (c *Client) GetSchoolHolidays(ctx context.Context, params *GetSchoolHolidaysParams, ...) (*http.Response, error)
- func (c *Client) GetSchoolHolidaysByDate(ctx context.Context, params *GetSchoolHolidaysByDateParams, ...) (*http.Response, error)
- func (c *Client) GetStatisticsPublicHolidays(ctx context.Context, params *GetStatisticsPublicHolidaysParams, ...) (*http.Response, error)
- func (c *Client) GetStatisticsSchoolHolidays(ctx context.Context, params *GetStatisticsSchoolHolidaysParams, ...) (*http.Response, error)
- func (c *Client) GetSubdivisions(ctx context.Context, params *GetSubdivisionsParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error)
- func (c *ClientWithResponses) GetLanguagesWithResponse(ctx context.Context, params *GetLanguagesParams, reqEditors ...RequestEditorFn) (*GetLanguagesResponse, error)
- func (c *ClientWithResponses) GetPublicHolidaysByDateWithResponse(ctx context.Context, params *GetPublicHolidaysByDateParams, ...) (*GetPublicHolidaysByDateResponse, error)
- func (c *ClientWithResponses) GetPublicHolidaysWithResponse(ctx context.Context, params *GetPublicHolidaysParams, ...) (*GetPublicHolidaysResponse, error)
- func (c *ClientWithResponses) GetSchoolHolidaysByDateWithResponse(ctx context.Context, params *GetSchoolHolidaysByDateParams, ...) (*GetSchoolHolidaysByDateResponse, error)
- func (c *ClientWithResponses) GetSchoolHolidaysWithResponse(ctx context.Context, params *GetSchoolHolidaysParams, ...) (*GetSchoolHolidaysResponse, error)
- func (c *ClientWithResponses) GetStatisticsPublicHolidaysWithResponse(ctx context.Context, params *GetStatisticsPublicHolidaysParams, ...) (*GetStatisticsPublicHolidaysResponse, error)
- func (c *ClientWithResponses) GetStatisticsSchoolHolidaysWithResponse(ctx context.Context, params *GetStatisticsSchoolHolidaysParams, ...) (*GetStatisticsSchoolHolidaysResponse, error)
- func (c *ClientWithResponses) GetSubdivisionsWithResponse(ctx context.Context, params *GetSubdivisionsParams, ...) (*GetSubdivisionsResponse, error)
- type ClientWithResponsesInterface
- type CountryReference
- type CountryResponse
- type GetCountriesParams
- type GetCountriesResponse
- type GetLanguagesParams
- type GetLanguagesResponse
- type GetPublicHolidaysByDateParams
- type GetPublicHolidaysByDateResponse
- type GetPublicHolidaysParams
- type GetPublicHolidaysResponse
- type GetSchoolHolidaysByDateParams
- type GetSchoolHolidaysByDateResponse
- type GetSchoolHolidaysParams
- type GetSchoolHolidaysResponse
- type GetStatisticsPublicHolidaysParams
- type GetStatisticsPublicHolidaysResponse
- type GetStatisticsSchoolHolidaysParams
- type GetStatisticsSchoolHolidaysResponse
- type GetSubdivisionsParams
- type GetSubdivisionsResponse
- type HolidayByDateResponse
- type HolidayResponse
- type HolidayType
- type HttpRequestDoer
- type LanguageResponse
- type LocalizedText
- type ProblemDetails
- type RegionalScope
- type RequestEditorFn
- type StatisticsResponse
- type SubdivisionReference
- type SubdivisionResponse
- type TemporalScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetCountriesRequest ¶
func NewGetCountriesRequest(server string, params *GetCountriesParams) (*http.Request, error)
NewGetCountriesRequest generates requests for GetCountries
func NewGetLanguagesRequest ¶
func NewGetLanguagesRequest(server string, params *GetLanguagesParams) (*http.Request, error)
NewGetLanguagesRequest generates requests for GetLanguages
func NewGetPublicHolidaysByDateRequest ¶
func NewGetPublicHolidaysByDateRequest(server string, params *GetPublicHolidaysByDateParams) (*http.Request, error)
NewGetPublicHolidaysByDateRequest generates requests for GetPublicHolidaysByDate
func NewGetPublicHolidaysRequest ¶
func NewGetPublicHolidaysRequest(server string, params *GetPublicHolidaysParams) (*http.Request, error)
NewGetPublicHolidaysRequest generates requests for GetPublicHolidays
func NewGetSchoolHolidaysByDateRequest ¶
func NewGetSchoolHolidaysByDateRequest(server string, params *GetSchoolHolidaysByDateParams) (*http.Request, error)
NewGetSchoolHolidaysByDateRequest generates requests for GetSchoolHolidaysByDate
func NewGetSchoolHolidaysRequest ¶
func NewGetSchoolHolidaysRequest(server string, params *GetSchoolHolidaysParams) (*http.Request, error)
NewGetSchoolHolidaysRequest generates requests for GetSchoolHolidays
func NewGetStatisticsPublicHolidaysRequest ¶
func NewGetStatisticsPublicHolidaysRequest(server string, params *GetStatisticsPublicHolidaysParams) (*http.Request, error)
NewGetStatisticsPublicHolidaysRequest generates requests for GetStatisticsPublicHolidays
func NewGetStatisticsSchoolHolidaysRequest ¶
func NewGetStatisticsSchoolHolidaysRequest(server string, params *GetStatisticsSchoolHolidaysParams) (*http.Request, error)
NewGetStatisticsSchoolHolidaysRequest generates requests for GetStatisticsSchoolHolidays
func NewGetSubdivisionsRequest ¶
func NewGetSubdivisionsRequest(server string, params *GetSubdivisionsParams) (*http.Request, error)
NewGetSubdivisionsRequest generates requests for GetSubdivisions
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetCountries ¶
func (c *Client) GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetLanguages ¶
func (c *Client) GetLanguages(ctx context.Context, params *GetLanguagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPublicHolidays ¶
func (c *Client) GetPublicHolidays(ctx context.Context, params *GetPublicHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPublicHolidaysByDate ¶
func (c *Client) GetPublicHolidaysByDate(ctx context.Context, params *GetPublicHolidaysByDateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSchoolHolidays ¶
func (c *Client) GetSchoolHolidays(ctx context.Context, params *GetSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSchoolHolidaysByDate ¶
func (c *Client) GetSchoolHolidaysByDate(ctx context.Context, params *GetSchoolHolidaysByDateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetStatisticsPublicHolidays ¶
func (c *Client) GetStatisticsPublicHolidays(ctx context.Context, params *GetStatisticsPublicHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetStatisticsSchoolHolidays ¶
func (c *Client) GetStatisticsSchoolHolidays(ctx context.Context, params *GetStatisticsSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSubdivisions ¶
func (c *Client) GetSubdivisions(ctx context.Context, params *GetSubdivisionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetCountries request
GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLanguages request
GetLanguages(ctx context.Context, params *GetLanguagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPublicHolidays request
GetPublicHolidays(ctx context.Context, params *GetPublicHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPublicHolidaysByDate request
GetPublicHolidaysByDate(ctx context.Context, params *GetPublicHolidaysByDateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSchoolHolidays request
GetSchoolHolidays(ctx context.Context, params *GetSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSchoolHolidaysByDate request
GetSchoolHolidaysByDate(ctx context.Context, params *GetSchoolHolidaysByDateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStatisticsPublicHolidays request
GetStatisticsPublicHolidays(ctx context.Context, params *GetStatisticsPublicHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStatisticsSchoolHolidays request
GetStatisticsSchoolHolidays(ctx context.Context, params *GetStatisticsSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSubdivisions request
GetSubdivisions(ctx context.Context, params *GetSubdivisionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetCountriesWithResponse ¶
func (c *ClientWithResponses) GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error)
GetCountriesWithResponse request returning *GetCountriesResponse
func (*ClientWithResponses) GetLanguagesWithResponse ¶
func (c *ClientWithResponses) GetLanguagesWithResponse(ctx context.Context, params *GetLanguagesParams, reqEditors ...RequestEditorFn) (*GetLanguagesResponse, error)
GetLanguagesWithResponse request returning *GetLanguagesResponse
func (*ClientWithResponses) GetPublicHolidaysByDateWithResponse ¶
func (c *ClientWithResponses) GetPublicHolidaysByDateWithResponse(ctx context.Context, params *GetPublicHolidaysByDateParams, reqEditors ...RequestEditorFn) (*GetPublicHolidaysByDateResponse, error)
GetPublicHolidaysByDateWithResponse request returning *GetPublicHolidaysByDateResponse
func (*ClientWithResponses) GetPublicHolidaysWithResponse ¶
func (c *ClientWithResponses) GetPublicHolidaysWithResponse(ctx context.Context, params *GetPublicHolidaysParams, reqEditors ...RequestEditorFn) (*GetPublicHolidaysResponse, error)
GetPublicHolidaysWithResponse request returning *GetPublicHolidaysResponse
func (*ClientWithResponses) GetSchoolHolidaysByDateWithResponse ¶
func (c *ClientWithResponses) GetSchoolHolidaysByDateWithResponse(ctx context.Context, params *GetSchoolHolidaysByDateParams, reqEditors ...RequestEditorFn) (*GetSchoolHolidaysByDateResponse, error)
GetSchoolHolidaysByDateWithResponse request returning *GetSchoolHolidaysByDateResponse
func (*ClientWithResponses) GetSchoolHolidaysWithResponse ¶
func (c *ClientWithResponses) GetSchoolHolidaysWithResponse(ctx context.Context, params *GetSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*GetSchoolHolidaysResponse, error)
GetSchoolHolidaysWithResponse request returning *GetSchoolHolidaysResponse
func (*ClientWithResponses) GetStatisticsPublicHolidaysWithResponse ¶
func (c *ClientWithResponses) GetStatisticsPublicHolidaysWithResponse(ctx context.Context, params *GetStatisticsPublicHolidaysParams, reqEditors ...RequestEditorFn) (*GetStatisticsPublicHolidaysResponse, error)
GetStatisticsPublicHolidaysWithResponse request returning *GetStatisticsPublicHolidaysResponse
func (*ClientWithResponses) GetStatisticsSchoolHolidaysWithResponse ¶
func (c *ClientWithResponses) GetStatisticsSchoolHolidaysWithResponse(ctx context.Context, params *GetStatisticsSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*GetStatisticsSchoolHolidaysResponse, error)
GetStatisticsSchoolHolidaysWithResponse request returning *GetStatisticsSchoolHolidaysResponse
func (*ClientWithResponses) GetSubdivisionsWithResponse ¶
func (c *ClientWithResponses) GetSubdivisionsWithResponse(ctx context.Context, params *GetSubdivisionsParams, reqEditors ...RequestEditorFn) (*GetSubdivisionsResponse, error)
GetSubdivisionsWithResponse request returning *GetSubdivisionsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetCountriesWithResponse request
GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error)
// GetLanguagesWithResponse request
GetLanguagesWithResponse(ctx context.Context, params *GetLanguagesParams, reqEditors ...RequestEditorFn) (*GetLanguagesResponse, error)
// GetPublicHolidaysWithResponse request
GetPublicHolidaysWithResponse(ctx context.Context, params *GetPublicHolidaysParams, reqEditors ...RequestEditorFn) (*GetPublicHolidaysResponse, error)
// GetPublicHolidaysByDateWithResponse request
GetPublicHolidaysByDateWithResponse(ctx context.Context, params *GetPublicHolidaysByDateParams, reqEditors ...RequestEditorFn) (*GetPublicHolidaysByDateResponse, error)
// GetSchoolHolidaysWithResponse request
GetSchoolHolidaysWithResponse(ctx context.Context, params *GetSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*GetSchoolHolidaysResponse, error)
// GetSchoolHolidaysByDateWithResponse request
GetSchoolHolidaysByDateWithResponse(ctx context.Context, params *GetSchoolHolidaysByDateParams, reqEditors ...RequestEditorFn) (*GetSchoolHolidaysByDateResponse, error)
// GetStatisticsPublicHolidaysWithResponse request
GetStatisticsPublicHolidaysWithResponse(ctx context.Context, params *GetStatisticsPublicHolidaysParams, reqEditors ...RequestEditorFn) (*GetStatisticsPublicHolidaysResponse, error)
// GetStatisticsSchoolHolidaysWithResponse request
GetStatisticsSchoolHolidaysWithResponse(ctx context.Context, params *GetStatisticsSchoolHolidaysParams, reqEditors ...RequestEditorFn) (*GetStatisticsSchoolHolidaysResponse, error)
// GetSubdivisionsWithResponse request
GetSubdivisionsWithResponse(ctx context.Context, params *GetSubdivisionsParams, reqEditors ...RequestEditorFn) (*GetSubdivisionsResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CountryReference ¶
type CountryReference struct {
// IsoCode Country ISO code
IsoCode string `json:"isoCode"`
}
CountryReference Representation of a country reference
type CountryResponse ¶
type CountryResponse struct {
// IsoCode ISO 3166-1 country code
IsoCode string `json:"isoCode"`
// Name Localized country names
Name []LocalizedText `json:"name"`
// OfficialLanguages Official ISO-639-1 language codes
OfficialLanguages []string `json:"officialLanguages"`
}
CountryResponse Representation of a country as defined in ISO 3166-1
type GetCountriesParams ¶
type GetCountriesParams struct {
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
}
GetCountriesParams defines parameters for GetCountries.
type GetCountriesResponse ¶
type GetCountriesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]CountryResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetCountriesResponse ¶
func ParseGetCountriesResponse(rsp *http.Response) (*GetCountriesResponse, error)
ParseGetCountriesResponse parses an HTTP response from a GetCountriesWithResponse call
func (GetCountriesResponse) Status ¶
func (r GetCountriesResponse) Status() string
Status returns HTTPResponse.Status
func (GetCountriesResponse) StatusCode ¶
func (r GetCountriesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetLanguagesParams ¶
type GetLanguagesParams struct {
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
}
GetLanguagesParams defines parameters for GetLanguages.
type GetLanguagesResponse ¶
type GetLanguagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]LanguageResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetLanguagesResponse ¶
func ParseGetLanguagesResponse(rsp *http.Response) (*GetLanguagesResponse, error)
ParseGetLanguagesResponse parses an HTTP response from a GetLanguagesWithResponse call
func (GetLanguagesResponse) Status ¶
func (r GetLanguagesResponse) Status() string
Status returns HTTPResponse.Status
func (GetLanguagesResponse) StatusCode ¶
func (r GetLanguagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPublicHolidaysByDateParams ¶
type GetPublicHolidaysByDateParams struct {
// Date Date of interest
Date openapi_types.Date `form:"date" json:"date"`
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
}
GetPublicHolidaysByDateParams defines parameters for GetPublicHolidaysByDate.
type GetPublicHolidaysByDateResponse ¶
type GetPublicHolidaysByDateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]HolidayByDateResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetPublicHolidaysByDateResponse ¶
func ParseGetPublicHolidaysByDateResponse(rsp *http.Response) (*GetPublicHolidaysByDateResponse, error)
ParseGetPublicHolidaysByDateResponse parses an HTTP response from a GetPublicHolidaysByDateWithResponse call
func (GetPublicHolidaysByDateResponse) Status ¶
func (r GetPublicHolidaysByDateResponse) Status() string
Status returns HTTPResponse.Status
func (GetPublicHolidaysByDateResponse) StatusCode ¶
func (r GetPublicHolidaysByDateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPublicHolidaysParams ¶
type GetPublicHolidaysParams struct {
// CountryIsoCode ISO 3166-1 code of the country
CountryIsoCode string `form:"countryIsoCode" json:"countryIsoCode"`
// ValidFrom Start of the date range
ValidFrom openapi_types.Date `form:"validFrom" json:"validFrom"`
// ValidTo End of the date range
ValidTo openapi_types.Date `form:"validTo" json:"validTo"`
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
// SubdivisionCode Code of the subdivision or empty
SubdivisionCode *string `form:"subdivisionCode,omitempty" json:"subdivisionCode,omitempty"`
}
GetPublicHolidaysParams defines parameters for GetPublicHolidays.
type GetPublicHolidaysResponse ¶
type GetPublicHolidaysResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]HolidayResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetPublicHolidaysResponse ¶
func ParseGetPublicHolidaysResponse(rsp *http.Response) (*GetPublicHolidaysResponse, error)
ParseGetPublicHolidaysResponse parses an HTTP response from a GetPublicHolidaysWithResponse call
func (GetPublicHolidaysResponse) Status ¶
func (r GetPublicHolidaysResponse) Status() string
Status returns HTTPResponse.Status
func (GetPublicHolidaysResponse) StatusCode ¶
func (r GetPublicHolidaysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSchoolHolidaysByDateParams ¶
type GetSchoolHolidaysByDateParams struct {
// Date Date of interest
Date openapi_types.Date `form:"date" json:"date"`
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
}
GetSchoolHolidaysByDateParams defines parameters for GetSchoolHolidaysByDate.
type GetSchoolHolidaysByDateResponse ¶
type GetSchoolHolidaysByDateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]HolidayByDateResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetSchoolHolidaysByDateResponse ¶
func ParseGetSchoolHolidaysByDateResponse(rsp *http.Response) (*GetSchoolHolidaysByDateResponse, error)
ParseGetSchoolHolidaysByDateResponse parses an HTTP response from a GetSchoolHolidaysByDateWithResponse call
func (GetSchoolHolidaysByDateResponse) Status ¶
func (r GetSchoolHolidaysByDateResponse) Status() string
Status returns HTTPResponse.Status
func (GetSchoolHolidaysByDateResponse) StatusCode ¶
func (r GetSchoolHolidaysByDateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSchoolHolidaysParams ¶
type GetSchoolHolidaysParams struct {
// CountryIsoCode ISO 3166-1 code of the country
CountryIsoCode string `form:"countryIsoCode" json:"countryIsoCode"`
// ValidFrom Start of the date range
ValidFrom openapi_types.Date `form:"validFrom" json:"validFrom"`
// ValidTo End of the date range
ValidTo openapi_types.Date `form:"validTo" json:"validTo"`
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
// SubdivisionCode Code of the subdivision or empty
SubdivisionCode *string `form:"subdivisionCode,omitempty" json:"subdivisionCode,omitempty"`
}
GetSchoolHolidaysParams defines parameters for GetSchoolHolidays.
type GetSchoolHolidaysResponse ¶
type GetSchoolHolidaysResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]HolidayResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetSchoolHolidaysResponse ¶
func ParseGetSchoolHolidaysResponse(rsp *http.Response) (*GetSchoolHolidaysResponse, error)
ParseGetSchoolHolidaysResponse parses an HTTP response from a GetSchoolHolidaysWithResponse call
func (GetSchoolHolidaysResponse) Status ¶
func (r GetSchoolHolidaysResponse) Status() string
Status returns HTTPResponse.Status
func (GetSchoolHolidaysResponse) StatusCode ¶
func (r GetSchoolHolidaysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetStatisticsPublicHolidaysParams ¶
type GetStatisticsPublicHolidaysParams struct {
// CountryIsoCode ISO 3166-1 code of the country
CountryIsoCode string `form:"countryIsoCode" json:"countryIsoCode"`
// SubdivisionCode Code of the subdivision or empty
SubdivisionCode *string `form:"subdivisionCode,omitempty" json:"subdivisionCode,omitempty"`
}
GetStatisticsPublicHolidaysParams defines parameters for GetStatisticsPublicHolidays.
type GetStatisticsPublicHolidaysResponse ¶
type GetStatisticsPublicHolidaysResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]StatisticsResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetStatisticsPublicHolidaysResponse ¶
func ParseGetStatisticsPublicHolidaysResponse(rsp *http.Response) (*GetStatisticsPublicHolidaysResponse, error)
ParseGetStatisticsPublicHolidaysResponse parses an HTTP response from a GetStatisticsPublicHolidaysWithResponse call
func (GetStatisticsPublicHolidaysResponse) Status ¶
func (r GetStatisticsPublicHolidaysResponse) Status() string
Status returns HTTPResponse.Status
func (GetStatisticsPublicHolidaysResponse) StatusCode ¶
func (r GetStatisticsPublicHolidaysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetStatisticsSchoolHolidaysParams ¶
type GetStatisticsSchoolHolidaysParams struct {
// CountryIsoCode ISO 3166-1 code of the country
CountryIsoCode string `form:"countryIsoCode" json:"countryIsoCode"`
// SubdivisionCode Code of the subdivision or empty
SubdivisionCode *string `form:"subdivisionCode,omitempty" json:"subdivisionCode,omitempty"`
}
GetStatisticsSchoolHolidaysParams defines parameters for GetStatisticsSchoolHolidays.
type GetStatisticsSchoolHolidaysResponse ¶
type GetStatisticsSchoolHolidaysResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]StatisticsResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetStatisticsSchoolHolidaysResponse ¶
func ParseGetStatisticsSchoolHolidaysResponse(rsp *http.Response) (*GetStatisticsSchoolHolidaysResponse, error)
ParseGetStatisticsSchoolHolidaysResponse parses an HTTP response from a GetStatisticsSchoolHolidaysWithResponse call
func (GetStatisticsSchoolHolidaysResponse) Status ¶
func (r GetStatisticsSchoolHolidaysResponse) Status() string
Status returns HTTPResponse.Status
func (GetStatisticsSchoolHolidaysResponse) StatusCode ¶
func (r GetStatisticsSchoolHolidaysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSubdivisionsParams ¶
type GetSubdivisionsParams struct {
// CountryIsoCode ISO 3166-1 code of the country
CountryIsoCode string `form:"countryIsoCode" json:"countryIsoCode"`
// LanguageIsoCode ISO-639-1 code of a language or empty
LanguageIsoCode *string `form:"languageIsoCode,omitempty" json:"languageIsoCode,omitempty"`
}
GetSubdivisionsParams defines parameters for GetSubdivisions.
type GetSubdivisionsResponse ¶
type GetSubdivisionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]SubdivisionResponse
ApplicationproblemJSON400 *ProblemDetails
ApplicationproblemJSON500 *ProblemDetails
}
func ParseGetSubdivisionsResponse ¶
func ParseGetSubdivisionsResponse(rsp *http.Response) (*GetSubdivisionsResponse, error)
ParseGetSubdivisionsResponse parses an HTTP response from a GetSubdivisionsWithResponse call
func (GetSubdivisionsResponse) Status ¶
func (r GetSubdivisionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetSubdivisionsResponse) StatusCode ¶
func (r GetSubdivisionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HolidayByDateResponse ¶
type HolidayByDateResponse struct {
// Comment Additional localized comments
Comment *[]LocalizedText `json:"comment"`
// Country Representation of a country reference
Country *CountryReference `json:"country,omitempty"`
// Id Unqiue holiday id
Id openapi_types.UUID `json:"id"`
// Name Localized names of the holiday
Name []LocalizedText `json:"name"`
// Nationwide Is the holiday nationwide?
Nationwide bool `json:"nationwide"`
// RegionalScope Regional scope of a holdiay
RegionalScope *RegionalScope `json:"regionalScope,omitempty"`
// Subdivisions List of subdivision references
Subdivisions []SubdivisionReference `json:"subdivisions"`
// TemporalScope Temporal scope of a holdiay
TemporalScope *TemporalScope `json:"temporalScope,omitempty"`
// Type Type of holiday
Type *HolidayType `json:"type,omitempty"`
}
HolidayByDateResponse Representation of a holiday by date
type HolidayResponse ¶
type HolidayResponse struct {
// Comment Additional localized comments
Comment *[]LocalizedText `json:"comment"`
// EndDate End date of the holiday
EndDate openapi_types.Date `json:"endDate"`
// Id Unqiue holiday id
Id openapi_types.UUID `json:"id"`
// Name Localized names of the holiday
Name []LocalizedText `json:"name"`
// Nationwide Is the holiday nationwide?
Nationwide bool `json:"nationwide"`
// RegionalScope Regional scope of a holdiay
RegionalScope *RegionalScope `json:"regionalScope,omitempty"`
// StartDate Start date of the holiday
StartDate openapi_types.Date `json:"startDate"`
// Subdivisions List of subdivision references
Subdivisions []SubdivisionReference `json:"subdivisions"`
// TemporalScope Temporal scope of a holdiay
TemporalScope *TemporalScope `json:"temporalScope,omitempty"`
// Type Type of holiday
Type *HolidayType `json:"type,omitempty"`
}
HolidayResponse Representation of a holiday
type HolidayType ¶
type HolidayType string
HolidayType Type of holiday
const ( BackToSchool HolidayType = "BackToSchool" Bank HolidayType = "Bank" EndOfLessons HolidayType = "EndOfLessons" Optional HolidayType = "Optional" Public HolidayType = "Public" School HolidayType = "School" )
Defines values for HolidayType.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type LanguageResponse ¶
type LanguageResponse struct {
// IsoCode ISO-639-1 language code
IsoCode string `json:"isoCode"`
// Name Localized language names
Name []LocalizedText `json:"name"`
}
LanguageResponse Representation of a language as defined in ISO-639-1
type LocalizedText ¶
type LocalizedText struct {
// Language ISO-639-1 language code
Language string `json:"language"`
// Text The localized text
Text string `json:"text"`
}
LocalizedText A localized text string
type ProblemDetails ¶
type ProblemDetails struct {
Detail *string `json:"detail"`
Instance *string `json:"instance"`
Status *int32 `json:"status"`
Title *string `json:"title"`
Type *string `json:"type"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ProblemDetails defines model for ProblemDetails.
func (ProblemDetails) Get ¶
func (a ProblemDetails) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ProblemDetails. Returns the specified element and whether it was found
func (ProblemDetails) MarshalJSON ¶
func (a ProblemDetails) MarshalJSON() ([]byte, error)
Override default JSON handling for ProblemDetails to handle AdditionalProperties
func (*ProblemDetails) Set ¶
func (a *ProblemDetails) Set(fieldName string, value interface{})
Setter for additional properties for ProblemDetails
func (*ProblemDetails) UnmarshalJSON ¶
func (a *ProblemDetails) UnmarshalJSON(b []byte) error
Override default JSON handling for ProblemDetails to handle AdditionalProperties
type RegionalScope ¶
type RegionalScope string
RegionalScope Regional scope of a holdiay
const ( Local RegionalScope = "Local" National RegionalScope = "National" Regional RegionalScope = "Regional" )
Defines values for RegionalScope.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type StatisticsResponse ¶
type StatisticsResponse struct {
// OldestStartDate The oldest holiday start date in the database
OldestStartDate openapi_types.Date `json:"oldestStartDate"`
// YoungestStartDate The youngest holiday start date in the database
YoungestStartDate openapi_types.Date `json:"youngestStartDate"`
}
StatisticsResponse Statistical data of the holidays database
type SubdivisionReference ¶
type SubdivisionReference struct {
// Code Subdivision code
Code string `json:"code"`
// ShortName Short name for display
ShortName string `json:"shortName"`
}
SubdivisionReference Representation of a subdivision reference
type SubdivisionResponse ¶
type SubdivisionResponse struct {
// Category Localized categories of the subdivision
Category []LocalizedText `json:"category"`
// Children Child subdivisions
Children *[]SubdivisionResponse `json:"children"`
// Code Subdivision code
Code string `json:"code"`
// Comment Localized comments of the subdivision
Comment []LocalizedText `json:"comment"`
// IsoCode ISO 3166-2 subdivision code (if defined)
IsoCode *string `json:"isoCode"`
// Name Localized names of the subdivision
Name []LocalizedText `json:"name"`
// OfficialLanguages Official languages as ISO-639-1 codes
OfficialLanguages []string `json:"officialLanguages"`
// ShortName Short name for display
ShortName string `json:"shortName"`
}
SubdivisionResponse Representation of a subdivision
type TemporalScope ¶
type TemporalScope string
TemporalScope Temporal scope of a holdiay
const ( FullDay TemporalScope = "FullDay" HalfDay TemporalScope = "HalfDay" )
Defines values for TemporalScope.