Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatasetClient ¶
type DatasetClient interface {
GetVersion(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceToken, collectionID, datasetID, edition, version string) (m dataset.Version, err error)
}
DatasetClient is an interface to represent methods called to action on the dataset api
type Downloader ¶
type Downloader struct { FilterCli FilterClient DatasetCli DatasetClient ImageCli ImageClient }
Downloader is a struct that contains the clients to request metadata about the downloads
func (Downloader) Get ¶
func (d Downloader) Get(ctx context.Context, p Parameters, fileType FileType) (Model, error)
Get requests the required metadata using a client depending on the provided paramters
type FileType ¶ added in v1.10.0
type FileType int
FileType - iota enum of possible file types that can be download
type FilterClient ¶
type FilterClient interface {
GetOutput(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceToken, collectionID, filterOutputID string) (m filter.Model, err error)
}
FilterClient is an interface to represent methods called to action on the filter api
type ImageClient ¶ added in v1.10.0
type ImageClient interface {
GetImage(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, imageID string) (m image.Image, err error)
}
ImageClient is an interface to represent methods called to action on the image api
type Info ¶
Info contains the public and private URLs to download file, of a generic type (filter, dataset version, image, ...)
type Model ¶
Model is a struct that contains all the required information to download a file. Available is a map of available downloads for the model.
func (Model) IsPublicLinkAvailable ¶
IsPublicLinkAvailable return true if public URI for the requested extension is available and the object is published
type Parameters ¶
type Parameters struct { UserAuthToken string ServiceAuthToken string DownloadServiceToken string CollectionID string FilterOutputID string DatasetID string Edition string Version string ImageID string Variant string Name string Ext string }
Parameters is the union of required paramters to perform all downloads