holidayer

package
v0.0.0-...-a8632a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Holiday

type Holiday struct {
	Dt        string `json:"dt"`
	Name      string `json:"name"`
	Market    string `json:"market"`
	OpenTime  string `json:"openTime"`
	CloseTime string `json:"closeTime"`
	Mic       string `json:"mic"`
}

Holiday describes a single holiday attributes.

type Holidayer

type Holidayer struct {
	// contains filtered or unexported fields
}

func New

func New(logger zerolog.Logger, fname string) *Holidayer

New returns Holidayer.

func (*Holidayer) JSON

func (h *Holidayer) JSON(w io.Writer) error

JSON returns holidays in JSON structure.

func (*Holidayer) Start

func (h *Holidayer) Start(ctx context.Context) error

type Response

type Response struct {
	Today            string    `json:"today"`
	Dates            []Holiday `json:"dates"`
	IsHolidayToday   bool      `json:"isHolidayToday"`
	IsUpdateRequired bool      `json:"isUpdateRequired"`
	ServerTime       string    `json:"serverTime"`
}

Response defines REST API response structure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL