Documentation
¶
Index ¶
- Variables
- func NewHolidaysEndpoints() []*api.Endpoint
- func RegisterHolidaysHandler(s server.Server, hdlr HolidaysHandler, opts ...server.HandlerOption) error
- type CountriesRequest
- type CountriesResponse
- func (*CountriesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CountriesResponse) GetCountries() []*Country
- func (*CountriesResponse) ProtoMessage()
- func (x *CountriesResponse) ProtoReflect() protoreflect.Message
- func (x *CountriesResponse) Reset()
- func (x *CountriesResponse) String() string
- type Country
- type Holiday
- func (*Holiday) Descriptor() ([]byte, []int)deprecated
- func (x *Holiday) GetCountryCode() string
- func (x *Holiday) GetDate() string
- func (x *Holiday) GetLocalName() string
- func (x *Holiday) GetName() string
- func (x *Holiday) GetRegions() []string
- func (x *Holiday) GetTypes() []string
- func (*Holiday) ProtoMessage()
- func (x *Holiday) ProtoReflect() protoreflect.Message
- func (x *Holiday) Reset()
- func (x *Holiday) String() string
- type HolidaysHandler
- type HolidaysService
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetCountryCode() string
- func (x *ListRequest) GetYear() int64
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type ListResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_holidays_proto protoreflect.FileDescriptor
Functions ¶
func NewHolidaysEndpoints ¶
func RegisterHolidaysHandler ¶
func RegisterHolidaysHandler(s server.Server, hdlr HolidaysHandler, opts ...server.HandlerOption) error
Types ¶
type CountriesRequest ¶
type CountriesRequest struct {
// contains filtered or unexported fields
}
Get the list of countries that are supported by this API
func (*CountriesRequest) Descriptor
deprecated
func (*CountriesRequest) Descriptor() ([]byte, []int)
Deprecated: Use CountriesRequest.ProtoReflect.Descriptor instead.
func (*CountriesRequest) ProtoMessage ¶
func (*CountriesRequest) ProtoMessage()
func (*CountriesRequest) ProtoReflect ¶
func (x *CountriesRequest) ProtoReflect() protoreflect.Message
func (*CountriesRequest) Reset ¶
func (x *CountriesRequest) Reset()
func (*CountriesRequest) String ¶
func (x *CountriesRequest) String() string
type CountriesResponse ¶
type CountriesResponse struct { Countries []*Country `protobuf:"bytes,1,rep,name=countries,proto3" json:"countries,omitempty"` // contains filtered or unexported fields }
func (*CountriesResponse) Descriptor
deprecated
func (*CountriesResponse) Descriptor() ([]byte, []int)
Deprecated: Use CountriesResponse.ProtoReflect.Descriptor instead.
func (*CountriesResponse) GetCountries ¶
func (x *CountriesResponse) GetCountries() []*Country
func (*CountriesResponse) ProtoMessage ¶
func (*CountriesResponse) ProtoMessage()
func (*CountriesResponse) ProtoReflect ¶
func (x *CountriesResponse) ProtoReflect() protoreflect.Message
func (*CountriesResponse) Reset ¶
func (x *CountriesResponse) Reset()
func (*CountriesResponse) String ¶
func (x *CountriesResponse) String() string
type Country ¶
type Country struct { // The 2 letter country code (as defined in ISO 3166-1 alpha-2) Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // The English name of the country Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Country) Descriptor
deprecated
func (*Country) ProtoMessage ¶
func (*Country) ProtoMessage()
func (*Country) ProtoReflect ¶
func (x *Country) ProtoReflect() protoreflect.Message
type Holiday ¶
type Holiday struct { // date of the holiday in yyyy-mm-dd format Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` // the name of the holiday in English Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // the local name of the holiday LocalName string `protobuf:"bytes,3,opt,name=local_name,json=localName,proto3" json:"local_name,omitempty"` // the country this holiday occurs in CountryCode string `protobuf:"bytes,4,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"` // the regions within the country that observe this holiday (if not all of them) Regions []string `protobuf:"bytes,5,rep,name=regions,proto3" json:"regions,omitempty"` // the type of holiday Public, Bank, School, Authorities, Optional, Observance Types []string `protobuf:"bytes,6,rep,name=types,proto3" json:"types,omitempty"` // contains filtered or unexported fields }
func (*Holiday) Descriptor
deprecated
func (*Holiday) GetCountryCode ¶
func (*Holiday) GetLocalName ¶
func (*Holiday) GetRegions ¶
func (*Holiday) ProtoMessage ¶
func (*Holiday) ProtoMessage()
func (*Holiday) ProtoReflect ¶
func (x *Holiday) ProtoReflect() protoreflect.Message
type HolidaysHandler ¶
type HolidaysHandler interface { Countries(context.Context, *CountriesRequest, *CountriesResponse) error List(context.Context, *ListRequest, *ListResponse) error }
type HolidaysService ¶
type HolidaysService interface { Countries(ctx context.Context, in *CountriesRequest, opts ...client.CallOption) (*CountriesResponse, error) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) }
func NewHolidaysService ¶
func NewHolidaysService(name string, c client.Client) HolidaysService
type ListRequest ¶
type ListRequest struct { // The 2 letter country code (as defined in ISO 3166-1 alpha-2) CountryCode string `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"` // The year to list holidays for Year int64 `protobuf:"varint,2,opt,name=year,proto3" json:"year,omitempty"` // contains filtered or unexported fields }
List the holiday dates for a given country and year
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetCountryCode ¶
func (x *ListRequest) GetCountryCode() string
func (*ListRequest) GetYear ¶
func (x *ListRequest) GetYear() int64
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { Holidays []*Holiday `protobuf:"bytes,1,rep,name=holidays,proto3" json:"holidays,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetHolidays ¶
func (x *ListResponse) GetHolidays() []*Holiday
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
Click to show internal directories.
Click to hide internal directories.