define WeatherEvent
This commit is contained in:
17
internal/pkg/domain/weather_event.go
Normal file
17
internal/pkg/domain/weather_event.go
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package domain
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type Celsius float64
|
||||||
|
|
||||||
|
type Temperature struct {
|
||||||
|
Value Celsius
|
||||||
|
}
|
||||||
|
|
||||||
|
type WeatherEvent struct {
|
||||||
|
Date time.Time
|
||||||
|
Condition WeatherCondition `json:"condition"`
|
||||||
|
Temperature *Temperature `json:"temperature"`
|
||||||
|
High *Temperature `json:"high,omitempty"`
|
||||||
|
Low *Temperature `json:"low,omitempty"`
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user