Documentation ¶
Index ¶
- Constants
- type ASFImageProvider
- type CreoDiasImageProvider
- type ErrProductNotFound
- type FTPImageProvider
- type GSImageProvider
- type ImageProvider
- type LocalImageProvider
- type MundiImageProvider
- type ONDADiasImageProvider
- type OneAtlasProvider
- type PEPSDiasImageProvider
- type Progress
- type ScihubImageProvider
- type SoblooImageProvider
- type WriteCounter
Constants ¶
const ( ASFDownloadProductSLC = "https://datapool.asf.alaska.edu/SLC/S{MISSION_VERSION}/{SCENE}.zip" ASFDownloadProductGRD = "https://datapool.asf.alaska.edu/GRD-HD/S{MISSION_VERSION}/{SCENE}.zip" )
const ( CreodiasToken = "https://auth.creodias.eu/auth/realms/DIAS/protocol/openid-connect/token" CreodiasSearch = "https://finder.creodias.eu/resto/api/collections/%s/search.json?productIdentifier=%%25%s%%25" )
const ( MundiDownloadProductS1 = "https://mundiwebservices.com/dp/s1-l%s-%s-%04d-q%d/%04d/%02d/%02d/%s/%s/%s.zip" MundiDownloadProductS2 = "https://mundiwebservices.com/dp/s2-%s-%04d-q%d/%s/%s/%s/%04d/%02d/%02d/%s.zip" )
const ( OndaQueryProduct = "https://catalogue.onda-dias.eu/dias-catalogue/Products(%s)" OndaOrderProduct = "https://catalogue.onda-dias.eu/dias-catalogue/Products(%s)/Ens.Order" OndaDownloadProduct = "https://catalogue.onda-dias.eu/dias-catalogue/Products(%s)/$value" )
const ( SoblooHost = "https://sobloo.eu" SoblooSearch = "/api/v1/services/search?" SoblooDownloadOrder = "/api/v1/services/order/products/orders/%d/deliveries/%s/download" SoblooDownloadProduct = "/api/v1/services/download/%s" SoblooGetOrder = "/api/v1/services/order/products/orders/%d" )
const (
PEPSSearch = "https://peps.cnes.fr/resto/api/collections/search.json?"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASFImageProvider ¶ added in v1.0.0
type ASFImageProvider struct {
// contains filtered or unexported fields
}
ASFImageProvider implements ImageProvider for Alaska Satellite Facility
func NewASFImageProvider ¶ added in v1.0.0
func NewASFImageProvider(token string) *ASFImageProvider
NewASFImageProvider creates a new ImageProvider from ASF
func (*ASFImageProvider) Download ¶ added in v1.0.0
func (ip *ASFImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*ASFImageProvider) Name ¶ added in v1.0.0
func (ip *ASFImageProvider) Name() string
Name implements ImageProvider
type CreoDiasImageProvider ¶
type CreoDiasImageProvider struct {
// contains filtered or unexported fields
}
CreoDiasImageProvider implements ImageProvider for CreoDias
func NewCreoDiasImageProvider ¶
func NewCreoDiasImageProvider(user, pword string) *CreoDiasImageProvider
NewCreoDiasImageProvider creates a new ImageProvider from CreoDias
func (*CreoDiasImageProvider) Download ¶
func (ip *CreoDiasImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*CreoDiasImageProvider) LoadCreoDiasToken ¶
func (ip *CreoDiasImageProvider) LoadCreoDiasToken() error
LoadCreoDiasToken loads the download token
func (*CreoDiasImageProvider) Name ¶
func (ip *CreoDiasImageProvider) Name() string
Name implements ImageProvider
type ErrProductNotFound ¶
type ErrProductNotFound struct {
Product string
}
ErrProductNotFound is an error returned when a product is not found or available
func (ErrProductNotFound) Error ¶
func (e ErrProductNotFound) Error() string
type FTPImageProvider ¶ added in v1.0.1
type FTPImageProvider struct {
// contains filtered or unexported fields
}
FTPImageProvider implements ImageProvider for connection to FTP
func NewFTPImageProvider ¶ added in v1.0.1
func NewFTPImageProvider(pathPattern, user, pword string) *FTPImageProvider
NewFTPImageProvider creates a new ImageProvider for ftp download link Example: hote: "ftp.example.org:21" pathPattern: full ftp path, including hote, port and folder tree. i.e: ftp://ftp.example.org:21/Images/{SCENE}.zip (See github.com/airbusgeo/geocube-ingester/common : FormatBrackets)
func (*FTPImageProvider) Download ¶ added in v1.0.1
func (ip *FTPImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*FTPImageProvider) Name ¶ added in v1.0.1
func (ip *FTPImageProvider) Name() string
Name implements ImageProvider
type GSImageProvider ¶
type GSImageProvider struct {
// contains filtered or unexported fields
}
GSImageProvider implements ImageProvider for Google Storage Sentinel2 and LANDSAT buckets
func NewGSImageProvider ¶
func NewGSImageProvider() *GSImageProvider
NewGSImageProvider creates a new ImageProvider from Google Storage Sentinel2 and LANDSAT buckets
func (*GSImageProvider) AddBucket ¶
func (ip *GSImageProvider) AddBucket(constellation, bucket string) error
AddBucket to the provider constellation must be one of sentinel1, sentinel-1, sentinel2, sentinel-2 bucket can contain several {IDENTIFIER} than will be replaced according to the information found in scenename IDENTIFIER must be one of SCENE, MISSION_ID, PRODUCT_LEVEL, DATE(YEAR/MONTH/DAY), TIME(HOUR/MINUTE/SECOND), PDGS, ORBIT, TILE (LATITUDE_BAND/GRID_SQUARE/GRANULE_ID)
func (*GSImageProvider) Name ¶
func (ip *GSImageProvider) Name() string
Name implements ImageProvider
type ImageProvider ¶
type ImageProvider interface { // Download an image to the given localDir // sceneName is for example S1A_IW_SLC__1SDV_20190103T170131_20190103T170159_025316_02CD10_519D // localDir is the directory where the image will be stored Download(ctx context.Context, scene common.Scene, localDir string) error // Name of the provider Name() string }
ImageProvider is the interface of an image download service
type LocalImageProvider ¶
type LocalImageProvider struct {
// contains filtered or unexported fields
}
LocalImageProvider implements ImageProvider for local storage
func NewLocalImageProvider ¶
func NewLocalImageProvider(path string) *LocalImageProvider
NewLocalImageProvider creates a new ImageProvider from local storage
func (*LocalImageProvider) Download ¶
func (ip *LocalImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*LocalImageProvider) Name ¶
func (ip *LocalImageProvider) Name() string
Name implements ImageProvider
type MundiImageProvider ¶
type MundiImageProvider struct {
// contains filtered or unexported fields
}
MundiImageProvider implements ImageProvider for Mundi
func NewMundiImageProvider ¶
func NewMundiImageProvider(seeedToken string) *MundiImageProvider
NewMundiImageProvider creates a new ImageProvider from Mundi
func (*MundiImageProvider) Download ¶
func (ip *MundiImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*MundiImageProvider) Name ¶
func (ip *MundiImageProvider) Name() string
Name implements ImageProvider
type ONDADiasImageProvider ¶
type ONDADiasImageProvider struct {
// contains filtered or unexported fields
}
ONDADiasImageProvider implements ImageProvider for ONDADias
func NewONDADiasImageProvider ¶
func NewONDADiasImageProvider(user, pword string, orderable bool) *ONDADiasImageProvider
NewONDADiasImageProvider creates a new ImageProvider from ONDADias
func (*ONDADiasImageProvider) Download ¶
func (ip *ONDADiasImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*ONDADiasImageProvider) Name ¶
func (ip *ONDADiasImageProvider) Name() string
Name implements ImageProvider
type OneAtlasProvider ¶ added in v1.0.0
type OneAtlasProvider struct {
// contains filtered or unexported fields
}
func NewOneAtlasProvider ¶ added in v1.0.0
func NewOneAtlasProvider(ctx context.Context, user, apikey, downloadEndpoint, orderEndpoint, authenticationEndpoint string) (*OneAtlasProvider, context.CancelFunc)
func (*OneAtlasProvider) Name ¶ added in v1.0.0
func (o *OneAtlasProvider) Name() string
Name implements ImageProvider
type PEPSDiasImageProvider ¶
type PEPSDiasImageProvider struct {
// contains filtered or unexported fields
}
PEPSDiasImageProvider implements ImageProvider for PEPSDias
func NewPEPSDiasImageProvider ¶
func NewPEPSDiasImageProvider(user, pword string) *PEPSDiasImageProvider
NewPEPSDiasImageProvider creates a new ImageProvider from PEPSDias
func (*PEPSDiasImageProvider) Download ¶
func (ip *PEPSDiasImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*PEPSDiasImageProvider) Name ¶
func (ip *PEPSDiasImageProvider) Name() string
Name implements ImageProvider
type Progress ¶ added in v1.0.1
type Progress struct {
// contains filtered or unexported fields
}
func NewProgress ¶ added in v1.0.1
func (*Progress) UpdateDelta ¶ added in v1.0.1
type ScihubImageProvider ¶
type ScihubImageProvider struct {
// contains filtered or unexported fields
}
ScihubImageProvider implements ImageProvider for Scihub
func NewScihubImageProvider ¶
func NewScihubImageProvider(user, pword string) *ScihubImageProvider
NewScihubImageProvider creates a new ImageProvider from Scihub
func (*ScihubImageProvider) Download ¶
func (ip *ScihubImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*ScihubImageProvider) Name ¶
func (ip *ScihubImageProvider) Name() string
Name implements ImageProvider
type SoblooImageProvider ¶
type SoblooImageProvider struct {
// contains filtered or unexported fields
}
SoblooImageProvider implements ImageProvider for Sobloo
func NewSoblooImageProvider ¶
func NewSoblooImageProvider(apikey string) *SoblooImageProvider
NewSoblooImageProvider creates a new ImageProvider from Sobloo
func (*SoblooImageProvider) Download ¶
func (ip *SoblooImageProvider) Download(ctx context.Context, scene common.Scene, localDir string) error
Download implements ImageProvider
func (*SoblooImageProvider) Name ¶
func (ip *SoblooImageProvider) Name() string
func (*SoblooImageProvider) NewRequestWithAuth ¶
type WriteCounter ¶ added in v1.0.1
type WriteCounter struct {
Progress *Progress
}
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.