usgs

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 ListEarthquakes(magnitude pb.Magnitude, past pb.Past,
	limit int, details bool) (*pb.EarthquakeCollection, error)

func ListEarthquakesFocusBounds

func ListEarthquakesFocusBounds(magnitude pb.Magnitude, past pb.Past,
	limit int, details bool, bounds *pb.GeoBoundsE7) (*pb.EarthquakeCollection, error)

func ListEarthquakesFocusPosition

func ListEarthquakesFocusPosition(magnitude pb.Magnitude, past pb.Past,
	limit int, details bool, pos *pb.GeoPointE7) (*pb.EarthquakeCollection, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL