Documentation
¶
Index ¶
Constants ¶
View Source
const ( BasePath = "https://geobigdata.io/" TokenPath = "auth/v1/oauth/token" SearchPath = "catalog/v2/search" )
Paths to the GBDX api endpoints
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CatalogSearch ¶
type CatalogSearch struct {
// contains filtered or unexported fields
}
CatalogSearch retrieves data from the gbdx endpoint
func NewCatalogSearch ¶
func NewCatalogSearch(client *http.Client, wkt string) (c *CatalogSearch, err error)
NewCatalogSearch takes a oauth2 client and a WKT string of a single polygon and gets results from the catalog search endpoint for all matching records (max 1000) inside the WKT I'd probably split this up in IRL and definitely clean up the error handling
func (*CatalogSearch) EncodeJSON ¶
func (c *CatalogSearch) EncodeJSON(w io.Writer) error
EncodeJSON writes the results to an io.Writer as unescaped json. The client is responsible for setting any headers including the return code if required
Click to show internal directories.
Click to hide internal directories.