Documentation ¶
Index ¶
- Variables
- func GetEarthquake(id string) (*pb.Earthquake, error)
- func ListEarthquakes(magnitude pb.Magnitude, past pb.Past, limit int, details bool) (*pb.EarthquakeCollection, error)
- func ListEarthquakesFocusBounds(magnitude pb.Magnitude, past pb.Past, limit int, details bool, ...) (*pb.EarthquakeCollection, error)
- func ListEarthquakesFocusPosition(magnitude pb.Magnitude, past pb.Past, limit int, details bool, ...) (*pb.EarthquakeCollection, error)
- func ToEarthquakeCollection(data []byte, details bool) (*pb.EarthquakeCollection, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCacheFailure = errors.New("failure on caching earthquake collection")
ErrCacheFailure is returned on cache failures
View Source
var ErrInvalidGeoJSON = errors.New("JSON data is not valid GeoJSON")
ErrInvalidGeoJSON can be returned by the parser
View Source
var ErrInvalidJSON = errors.New("invalid JSON data")
ErrInvalidJSON can be returned by the parser
View Source
var ErrNotFound = errors.New("earthquake not found")
ErrNotFound is returned when identified earthquake was not found
View Source
var ErrUnknownDataRequest = errors.New("unknown earthquake data request")
ErrUnknownDataRequest is returned by a parser when could not formulate a request
Functions ¶
func GetEarthquake ¶
func GetEarthquake(id string) (*pb.Earthquake, error)
func ListEarthquakes ¶
func ToEarthquakeCollection ¶
func ToEarthquakeCollection(data []byte, details bool) (*pb.EarthquakeCollection, error)
ToEarthquakeCollection parses GeoJSON data from USGS to earthquake objects.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.