Documentation ¶
Index ¶
- Constants
- func IsErrNoSuchImage(err error) bool
- func IsErrNoSuchSubscription(err error) bool
- func IsErrNoSuchUser(err error) bool
- type ContentType
- type Coordinates
- type ErrNoSuchImage
- type ErrNoSuchSubscription
- type ErrNoSuchUser
- type Event
- type Forecast
- type Image
- type ImageID
- type Location
- type RainfallMilliMeterPerHour
- type Recipient
- type Subscription
- type SubscriptionID
- type User
- type UserID
- type Weather
- type YahooClientID
Constants ¶
View Source
const PNGContentType = ContentType("image/png")
Variables ¶
This section is empty.
Functions ¶
func IsErrNoSuchImage ¶
func IsErrNoSuchSubscription ¶
func IsErrNoSuchUser ¶
Types ¶
type ContentType ¶
type ContentType string
type Coordinates ¶
type ErrNoSuchImage ¶
type ErrNoSuchImage struct {
ID ImageID
}
func (ErrNoSuchImage) Error ¶
func (e ErrNoSuchImage) Error() string
type ErrNoSuchSubscription ¶
type ErrNoSuchSubscription struct { UserID UserID SubscriptionID SubscriptionID }
func (ErrNoSuchSubscription) Error ¶
func (e ErrNoSuchSubscription) Error() string
type ErrNoSuchUser ¶
type ErrNoSuchUser struct {
ID UserID
}
func (ErrNoSuchUser) Error ¶
func (e ErrNoSuchUser) Error() string
type Event ¶
type Event struct { Time time.Time Rainfall RainfallMilliMeterPerHour }
type Image ¶
type Image struct { ID ImageID ContentType ContentType Bytes []byte Time time.Time }
func NewPNGImage ¶
type Location ¶
type Location struct { Name string Coordinates Coordinates }
type RainfallMilliMeterPerHour ¶
type RainfallMilliMeterPerHour float64
func (RainfallMilliMeterPerHour) String ¶
func (r RainfallMilliMeterPerHour) String() string
type Subscription ¶
type Subscription struct { ID SubscriptionID Location Location Recipient Recipient }
func NewSubscription ¶
func NewSubscription(location Location) Subscription
func (Subscription) String ¶
func (subscription Subscription) String() string
type SubscriptionID ¶
type SubscriptionID string
type User ¶
type User struct { ID UserID YahooClientID YahooClientID }
type Weather ¶
func (Weather) FindRainStarts ¶
FindRainStarts returns the first event which it and next are non-zero.
func (Weather) FindRainStops ¶
FindRainStops returns the first event which it and next are zero.
func (Weather) IsRainingNow ¶
IsRainingNow returns true if the last observation is positive.
type YahooClientID ¶
type YahooClientID string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.