package prayer import ( "errors" "time" ) var ErrInvalidLocation = errors.New("invalid location") type Coordinates struct { Latitude float64 Longitude float64 } type Location struct { ID int `json:"id"` Name string `json:"name"` ASCIIName string `json:"ascii_name"` AlternateNames string `json:"alternate_names"` CountryCode string `json:"country_code"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Timezone string `json:"timezone,omitempty"` } type Times struct { Date time.Time `json:"date"` DateHijri string `json:"date_hijri"` Fajr time.Time `json:"fajr"` Sunrise time.Time `json:"sunrise"` Dhuhr time.Time `json:"dhuhr"` Asr time.Time `json:"asr"` Sunset time.Time `json:"sunset,omitempty"` Maghrib time.Time `json:"maghrib"` Isha time.Time `json:"isha"` } type TimesResult struct { Location Location `json:"location"` Times []Times `json:"prayertimes"` }