Documentation ¶
Overview ¶
package fdsn is for Federation of Digital Seismic Networks web services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDataSelectPost ¶
func ParseDataSelectPost(r io.Reader, d *[]DataSelect) error
ParesDataSelectGet parses the FDSN dataselect parameters in r from a dataselect POST request.
func WillBeEmpty ¶
Types ¶
type DataSearch ¶
type DataSelect ¶
type DataSelect struct { StartTime Time `schema:"starttime"` // limit to data on or after the specified start time. EndTime Time `schema:"endtime"` // limit to data on or before the specified end time. Network []string `schema:"network"` // network name of data to query Station []string `schema:"station"` // station name of data to query Location []string `schema:"location"` // location name of data to query Channel []string `schema:"channel"` // channel number of data to query Format string `schema:"format"` LongestOnly bool `schema:"longestonly"` NoData int `schema:"nodata"` // Select status code for “no data”, either ‘204’ (default) or ‘404’. }
func ParseDataSelectGet ¶
func ParseDataSelectGet(v url.Values) (DataSelect, error)
ParesDataSelectGet parses the FDSN dataselect parameters in v from a dataselect GET request.
func (*DataSelect) Regexp ¶
func (d *DataSelect) Regexp() (DataSearch, error)
regexp returns DataSearch with regexp strings that represents the search parameters. It converts the '*', '?', ' ' and '--' characters to their regular expression equivalents for pattern matching with Postgres POSIX regexp.
type Time ¶
func (*Time) UnmarshalText ¶
parses the time in text as per the FDSN spec. Pads text for parsing with time.RFC3339Nano. Accepted formats are (UTC):
YYYY-MM-DDTHH:MM:SS.ssssss YYYY-MM-DDTHH:MM:SS YYYY-MM-DD
Implements the encoding.TextUnmarshaler interface.