Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClimateReport ¶
type ClimateReport struct { Maximum Measurement `json:"maximum"` Minimum Measurement `json:"minimum"` Precipitations Precipitations `json:"precipitations"` }
type ClimateStation ¶
type ClimateStation struct { Code int `json:"code"` Name string `json:"name"` Operational bool `json:"operational"` LastReport *time.Time `json:"last_report,omitempty"` Temperature float64 `json:"temperature,omitempty"` Humidity float64 `json:"humidity,omitempty"` PressureHPA float64 `json:"pressure_hpa,omitempty"` Today *ClimateReport `json:"today,omitempty"` Yesterday *ClimateReport `json:"yesterday,omitempty"` }
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
func NewDefaultService ¶
func NewDefaultService() *DefaultService
func (*DefaultService) GetClimateStations ¶
func (s *DefaultService) GetClimateStations() ([]*ClimateStation, error)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) Stations ¶
func (h *Handler) Stations() gin.HandlerFunc
type Measurement ¶
type Precipitations ¶
type Service ¶
type Service interface {
GetClimateStations() ([]*ClimateStation, error)
}
Click to show internal directories.
Click to hide internal directories.