Documentation ¶
Index ¶
- Constants
- func Browse(cid string, size string, json bool, w io.Writer) error
- func BrowseMetadata(cid string, w io.Writer) error
- func CatalogHeartbeat() error
- func OrderingHeartbeat() error
- func Thumbnail(cid string, dim int, orientation string, w io.Writer) error
- type Acquisition
- type Api
- func (a *Api) GetRecords(inVal []string) (*Result_Parent, error)
- func (a *Api) ListBucket(requestedPrefix string, recursive bool, w io.Writer) (err error)
- func (a *Api) NewOrder(IDs ...string) (*Order, error)
- func (a *Api) OrderLocation(IDs ...string) (*Order, error)
- func (a *Api) OrderStatus(orderID string) (*Order, error)
- func (a *Api) RecordStatus(catID string) (*Record, error)
- func (a *Api) Token() (*oauth2.Token, error)
- type Config
- type Order
- type Record
- type Record_Struct
- type Result_Parent
- type Search_Json
Constants ¶
const GBDX_HTTP_TIMEOUT = 60 * time.Second
GBDX_HTTP_TIMEOUT is the default timeout used by the context in http requests.
Variables ¶
This section is empty.
Functions ¶
func BrowseMetadata ¶
BrowseMetadata writes the GeoJSON metadata of the catalog id cid to w.
func CatalogHeartbeat ¶
func CatalogHeartbeat() error
CatalogHeartbeat checks if the catalog endpoint is alive and well.
func OrderingHeartbeat ¶
func OrderingHeartbeat() error
OrderingHeartbeat checks if the ordering endpoint is alive and well.
Types ¶
type Acquisition ¶
type Acquisition struct { ID string `json:"acquisition_id"` State string `json:"state"` Location string `json:"location"` }
Acquisition holds the ID, ordering state, and location (an s3 path) of an order.
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
Api holds GBDX authorized http clients and tokens.
func (*Api) GetRecords ¶
func (a *Api) GetRecords(inVal []string) (*Result_Parent, error)
func (*Api) ListBucket ¶
ListBucket writes a listing of contents of the GBDX customer bucket to w.
func (*Api) OrderLocation ¶
OrderLocation returns the location of orders in AWS.
func (*Api) OrderStatus ¶
OrderStatus returns the status of the order given the string identifying it.
func (*Api) RecordStatus ¶
RecordStatus returns the status of the imagery given the string identifying it.
type Config ¶
type Config struct { Username string `mapstructure:"gbdx_username" toml:"gbdx_username"` Password string `mapstructure:"gbdx_password" toml:"gbdx_password"` //ClientID string `mapstructure:"gbdx_client_id" toml:"gbdx_client_id"` //ClientSecret string `mapstructure:"gbdx_client_secret" toml:"gbdx_client_secret"` Token *oauth2.Token `mapstructure:"gbdx_token" toml:"gbdx_token"` }
Config holds the various configuation items we need to interact with GBDX.
type Order ¶
type Order struct { ID string `json:"order_id"` Acquisitions []Acquisition `json:"acquisitions"` }
Order holds the ID and all the associated Acquisitions of a submitted order.
type Record ¶
type Record struct { Owner string `json:"owner"` ID string `json:"identifier"` Type string `json:"type"` Props Record_Struct `json:"properties"` }
Catalog holds the ID and all the associated Acquisitions of requested imagery.
type Record_Struct ¶
type Record_Struct struct { Ordered string `json:"ordered"` Type string `json:"type"` Sun_Elevation string `json:"sunElevation"` Targert_Azimuth string `json:"targetAzimuth"` Sensor_Platform_Name string `json:"sensorPlatformName"` Sun_Azimuth string `json:"sunAzimuth"` Browse_URL string `json:"browseURL"` Available string `json:"available"` Cloud_Cover string `json:"cloudCover"` Multi_Resolution string `json:"multiResolution"` Vendor_Name string `json:"vendorName"` Off_Nadir_Angle string `json:"offNadirAngle"` Pan_Resolution string `json:"panResolution"` Catalog_ID string `json:"catalogID"` Image_Bands string `json:"imageBands"` FootprintWkt string `json:"footprintWkt"` Timestamp string `json:"timestamp"` }
Acquisition holds the ID, state, and location (an s3 path) of the catalog id.
type Result_Parent ¶
type Result_Parent struct { Records []Record `json:"results"` SearchTag string `json:"searchTag,omitempty"` }
Results from search holds results, searchTag and stats.
type Search_Json ¶
type Search_Json struct { SearchAreaWkt string `json:"searchAreaWkt,omitempty"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` Types []string `json:"types,omitempty"` Filters []string `json:"filters,omitempty"` Limit int `json:"limit,omitempty"` }
Search criteria holds stardDate, endDate, types and AOI.