Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EarthquakeData ¶
type EarthquakeData struct { Mag float64 `json:"mag"` MagType string `json:"magtype"` Depth float64 `json:"depth"` Time time.Time `json:"time"` Lat float64 `json:"lat"` Lon float64 `json:"lon"` Location string `json:"location"` DetailsURL string `json:"details_url"` SourceID ID `json:"source"` EventID string `json:"event_id"` }
EarthquakeData represents a narrow set of attributes that expresses a single earthquake.
type EmscEvent ¶
type EmscEvent struct { Action string `json:"action"` Data struct { Geometry struct { Type string `json:"type"` Coordinates []float64 `json:"coordinates"` } `json:"geometry"` Type string `json:"type"` ID string `json:"id"` Properties struct { LastUpdate time.Time `json:"lastupdate"` MagType string `json:"magtype"` EvType string `json:"evtype"` Lon float64 `json:"lon"` Auth string `json:"auth"` Lat float64 `json:"lat"` Depth float64 `json:"depth"` UnID string `json:"unid"` Mag float64 `json:"mag"` Time time.Time `json:"time"` SourceID string `json:"source_id"` SourceCatalog string `json:"source_catalog"` FlynnRegion string `json:"flynn_region"` } `json:"properties"` } `json:"data"` }
type EmscRest ¶
type EmscRest struct {
FdsnWs
}
func NewEmscRest ¶
func NewEmscRest() EmscRest
func (EmscRest) Listen ¶
func (s EmscRest) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type EmscRestResponse ¶
type EmscRestResponse struct { Type string `json:"type"` Metadata struct { Totalcount int `json:"totalCount"` } `json:"metadata"` Features []struct { Geometry struct { Type string `json:"type"` Coordinates []float64 `json:"coordinates"` } `json:"geometry"` Type string `json:"type"` ID string `json:"id"` Properties struct { Lastupdate time.Time `json:"lastupdate"` Magtype string `json:"magtype"` Evtype string `json:"evtype"` Lon float64 `json:"lon"` Auth string `json:"auth"` Lat float64 `json:"lat"` Depth float64 `json:"depth"` Unid string `json:"unid"` Mag float64 `json:"mag"` Time time.Time `json:"time"` SourceID string `json:"source_id"` SourceCatalog string `json:"source_catalog"` FlynnRegion string `json:"flynn_region"` } `json:"properties"` } `json:"features"` }
type EmscWs ¶
type EmscWs struct {
// contains filtered or unexported fields
}
func (EmscWs) Listen ¶
func (s EmscWs) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type FdsnWs ¶
type FdsnWs struct {
// contains filtered or unexported fields
}
FdsnWs is a base for implementing a feed from [FDSNWS](https://www.fdsn.org/webservices/) event source.
func (FdsnWs) Listen ¶
func (s FdsnWs) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type Geofon ¶
type Geofon struct {
FdsnWs
}
func (Geofon) Listen ¶
func (s Geofon) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type GeofonResponse ¶
type GeofonResponse struct { XMLName xml.Name `xml:"quakeml"` Text string `xml:",chardata"` Xmlns string `xml:"xmlns,attr"` Q string `xml:"q,attr"` EventParameters struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Event []struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Description struct { Chardata string `xml:",chardata"` Text string `xml:"text"` Type string `xml:"type"` } `xml:"description"` CreationInfo struct { Text string `xml:",chardata"` AgencyID string `xml:"agencyID"` CreationTime string `xml:"creationTime"` } `xml:"creationInfo"` Magnitude struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` StationCount string `xml:"stationCount"` CreationInfo struct { Text string `xml:",chardata"` AgencyID string `xml:"agencyID"` CreationTime string `xml:"creationTime"` } `xml:"creationInfo"` Mag struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"mag"` Type string `xml:"type"` OriginID string `xml:"originID"` MethodID string `xml:"methodID"` } `xml:"magnitude"` Origin struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Time struct { Text string `xml:",chardata"` Value geofonTime `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"time"` Longitude struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"longitude"` Latitude struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"latitude"` Quality struct { Text string `xml:",chardata"` AssociatedPhaseCount string `xml:"associatedPhaseCount"` UsedPhaseCount string `xml:"usedPhaseCount"` AssociatedStationCount string `xml:"associatedStationCount"` UsedStationCount string `xml:"usedStationCount"` StandardError string `xml:"standardError"` AzimuthalGap string `xml:"azimuthalGap"` MaximumDistance string `xml:"maximumDistance"` MinimumDistance string `xml:"minimumDistance"` MedianDistance string `xml:"medianDistance"` DepthPhaseCount string `xml:"depthPhaseCount"` } `xml:"quality"` EvaluationMode string `xml:"evaluationMode"` CreationInfo struct { Text string `xml:",chardata"` AgencyID string `xml:"agencyID"` CreationTime string `xml:"creationTime"` } `xml:"creationInfo"` Depth struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"depth"` MethodID string `xml:"methodID"` EarthModelID string `xml:"earthModelID"` DepthType string `xml:"depthType"` OriginUncertainty struct { Text string `xml:",chardata"` MinHorizontalUncertainty string `xml:"minHorizontalUncertainty"` MaxHorizontalUncertainty string `xml:"maxHorizontalUncertainty"` AzimuthMaxHorizontalUncertainty string `xml:"azimuthMaxHorizontalUncertainty"` PreferredDescription string `xml:"preferredDescription"` } `xml:"originUncertainty"` EvaluationStatus string `xml:"evaluationStatus"` } `xml:"origin"` PreferredOriginID string `xml:"preferredOriginID"` PreferredMagnitudeID string `xml:"preferredMagnitudeID"` } `xml:"event"` } `xml:"eventParameters"` }
type ID ¶
type ID string
const EmscRestID ID = "EMSC"
const EmscWsID ID = "EMSCWS"
const GeofonID ID = "GEOFON"
const IrisID ID = "IRIS"
const UsgsID ID = "USGS"
const UspBrID ID = "USPBR"
type Iris ¶
type Iris struct {
FdsnWs
}
func (Iris) Listen ¶
func (s Iris) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type IrisResponse ¶
type IrisResponse struct { XMLName xml.Name `xml:"quakeml"` Text string `xml:",chardata"` Q string `xml:"q,attr"` Iris string `xml:"iris,attr"` Xmlns string `xml:"xmlns,attr"` Xsi string `xml:"xsi,attr"` SchemaLocation string `xml:"schemaLocation,attr"` EventParameters struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Event []struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Type string `xml:"type"` Description struct { Chardata string `xml:",chardata"` Iris string `xml:"iris,attr"` FEcode string `xml:"FEcode,attr"` Type string `xml:"type"` Text string `xml:"text"` } `xml:"description"` PreferredMagnitudeID string `xml:"preferredMagnitudeID"` PreferredOriginID string `xml:"preferredOriginID"` Origin struct { Text string `xml:",chardata"` Iris string `xml:"iris,attr"` PublicID string `xml:"publicID,attr"` ContributorOriginId string `xml:"contributorOriginId,attr"` Contributor string `xml:"contributor,attr"` ContributorEventId string `xml:"contributorEventId,attr"` Catalog string `xml:"catalog,attr"` Time struct { Text string `xml:",chardata"` Value fdsnwsTime `xml:"value"` } `xml:"time"` CreationInfo struct { Text string `xml:",chardata"` Author string `xml:"author"` } `xml:"creationInfo"` Latitude struct { Text string `xml:",chardata"` Value float64 `xml:"value"` } `xml:"latitude"` Longitude struct { Text string `xml:",chardata"` Value float64 `xml:"value"` } `xml:"longitude"` Depth struct { Text string `xml:",chardata"` Value float64 `xml:"value"` } `xml:"depth"` } `xml:"origin"` Magnitude struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Mag struct { Text string `xml:",chardata"` Value float64 `xml:"value"` } `xml:"mag"` Type string `xml:"type"` CreationInfo struct { Text string `xml:",chardata"` Author string `xml:"author"` } `xml:"creationInfo"` } `xml:"magnitude"` } `xml:"event"` } `xml:"eventParameters"` }
type LocateTransformer ¶
type LocateTransformer interface { Transformer Locator }
type Transformer ¶
type Transformer interface {
Transform(r io.Reader) ([]EarthquakeData, error)
}
type Usgs ¶
type Usgs struct {
// contains filtered or unexported fields
}
func (Usgs) Listen ¶
func (s Usgs) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type UsgsGeoJsonResponse ¶
type UsgsGeoJsonResponse struct { Type string `json:"type"` Metadata struct { Generated int64 `json:"generated"` URL string `json:"url"` Title string `json:"title"` Status int `json:"status"` API string `json:"api"` Count int `json:"count"` } `json:"metadata"` Features []struct { Type string `json:"type"` Properties struct { Mag float64 `json:"mag"` Place string `json:"place"` Time int64 `json:"time"` Updated int64 `json:"updated"` Tz interface{} `json:"tz"` URL string `json:"url"` Detail string `json:"detail"` Felt interface{} `json:"felt"` Cdi interface{} `json:"cdi"` Mmi interface{} `json:"mmi"` Alert interface{} `json:"alert"` Status string `json:"status"` Tsunami int `json:"tsunami"` Sig int `json:"sig"` Net string `json:"net"` Code string `json:"code"` Ids string `json:"ids"` Sources string `json:"sources"` Types string `json:"types"` Nst int `json:"nst"` Dmin float64 `json:"dmin"` Rms float64 `json:"rms"` Gap float64 `json:"gap"` Magtype string `json:"magType"` Type string `json:"type"` Title string `json:"title"` } `json:"properties"` Geometry struct { Type string `json:"type"` Coordinates []float64 `json:"coordinates"` } `json:"geometry"` ID string `json:"id"` } `json:"features"` Bbox []float64 `json:"bbox"` }
type UspBr ¶
type UspBr struct {
FdsnWs
}
func (UspBr) Listen ¶
func (s UspBr) Listen( ctx context.Context, lt LocateTransformer, output chan<- EarthquakeData, )
type UspBrResponse ¶
type UspBrResponse struct { XMLName xml.Name `xml:"quakeml"` Text string `xml:",chardata"` Xmlns string `xml:"xmlns,attr"` Q string `xml:"q,attr"` EventParameters struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Event []struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Description struct { Chardata string `xml:",chardata"` Text string `xml:"text"` Type string `xml:"type"` } `xml:"description"` TypeCertainty string `xml:"typeCertainty"` CreationInfo struct { Text string `xml:",chardata"` AgencyID string `xml:"agencyID"` Author string `xml:"author"` CreationTime string `xml:"creationTime"` } `xml:"creationInfo"` Magnitude struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` StationCount string `xml:"stationCount"` CreationInfo struct { Text string `xml:",chardata"` AgencyID string `xml:"agencyID"` Author string `xml:"author"` CreationTime string `xml:"creationTime"` } `xml:"creationInfo"` Mag struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"mag"` Type string `xml:"type"` OriginID string `xml:"originID"` MethodID string `xml:"methodID"` EvaluationStatus string `xml:"evaluationStatus"` } `xml:"magnitude"` Origin struct { Text string `xml:",chardata"` PublicID string `xml:"publicID,attr"` Time struct { Text string `xml:",chardata"` Value geofonTime `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"time"` Longitude struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"longitude"` Latitude struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"latitude"` Quality struct { Text string `xml:",chardata"` AssociatedPhaseCount string `xml:"associatedPhaseCount"` UsedPhaseCount string `xml:"usedPhaseCount"` AssociatedStationCount string `xml:"associatedStationCount"` UsedStationCount string `xml:"usedStationCount"` DepthPhaseCount string `xml:"depthPhaseCount"` StandardError string `xml:"standardError"` AzimuthalGap string `xml:"azimuthalGap"` MaximumDistance string `xml:"maximumDistance"` MinimumDistance string `xml:"minimumDistance"` MedianDistance string `xml:"medianDistance"` } `xml:"quality"` EvaluationMode string `xml:"evaluationMode"` CreationInfo struct { Text string `xml:",chardata"` AgencyID string `xml:"agencyID"` Author string `xml:"author"` CreationTime string `xml:"creationTime"` } `xml:"creationInfo"` Depth struct { Text string `xml:",chardata"` Value float64 `xml:"value"` Uncertainty string `xml:"uncertainty"` } `xml:"depth"` OriginUncertainty struct { Text string `xml:",chardata"` MinHorizontalUncertainty string `xml:"minHorizontalUncertainty"` MaxHorizontalUncertainty string `xml:"maxHorizontalUncertainty"` AzimuthMaxHorizontalUncertainty string `xml:"azimuthMaxHorizontalUncertainty"` PreferredDescription string `xml:"preferredDescription"` } `xml:"originUncertainty"` MethodID string `xml:"methodID"` EarthModelID string `xml:"earthModelID"` EvaluationStatus string `xml:"evaluationStatus"` DepthType string `xml:"depthType"` } `xml:"origin"` PreferredOriginID string `xml:"preferredOriginID"` PreferredMagnitudeID string `xml:"preferredMagnitudeID"` Type string `xml:"type"` } `xml:"event"` } `xml:"eventParameters"` }
Click to show internal directories.
Click to hide internal directories.