Documentation ¶
Index ¶
- func AddTidesToSearchResults(context *Context, results []model.BrokerSearchResult) error
- func CreateMockTidesServer() *httptest.Server
- func GetSingleTidesData(context *Context, target model.BasicBrokerResult) (*model.TidesData, error)
- func GetTides(fc *geojson.FeatureCollection, context *Context) (*geojson.FeatureCollection, error)
- func OutputToTidesData(output Output) []model.TidesData
- type Context
- type Input
- type InputLocation
- type Output
- type OutputData
- type OutputLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTidesToSearchResults ¶
func AddTidesToSearchResults(context *Context, results []model.BrokerSearchResult) error
AddTidesToSearchResults does an *in-place* modification of the input broker search results to augment them with tides data
func CreateMockTidesServer ¶
CreateMockTidesServer creates a mocked Tides server instance This is exported because it is needed in testing the planet module
func GetSingleTidesData ¶
func GetTides ¶
func GetTides(fc *geojson.FeatureCollection, context *Context) (*geojson.FeatureCollection, error)
GetTides returns the tide information for the features provided. Features must have a geometry and an acquiredDate property.
func OutputToTidesData ¶
Types ¶
type Context ¶
type Context struct { TidesURL string // contains filtered or unexported fields }
Context is the context for this operation
func (*Context) LogRootDir ¶
LogRootDir returns an empty string
type Input ¶
type Input struct {
Locations []InputLocation `json:"locations"`
}
func InputForBasicBrokerResults ¶
func InputForBasicBrokerResults(results []model.BasicBrokerResult) (*Input, error)
type InputLocation ¶
type InputLocation struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` Dtg string `json:"dtg"` }
func InputLocationForFeature ¶
func InputLocationForFeature(feature *geojson.Feature, acquiredDate time.Time) InputLocation
type Output ¶
type Output struct {
Locations []OutputLocation `json:"locations"`
}
type OutputData ¶
type OutputLocation ¶
type OutputLocation struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` Dtg string `json:"dtg"` Results OutputData `json:"results"` }
Click to show internal directories.
Click to hide internal directories.