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, downloadServiceAuthToken, collectionID, datasetID, edition, version string) (m dataset.Version, err error) GetInstance(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, instanceID, ifMatch string) (m dataset.Instance, eTag string, err error) Checker(ctx context.Context, check *healthcheck.CheckState) 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, variant string) (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 FilesClient ¶ added in v1.16.1
type FilesClient interface { GetFile(ctx context.Context, path string, authToken string) (files.FileMetaData, error) Checker(ctx context.Context, state *healthcheck.CheckState) error }
FilesClient is interface to the files api
type FilterClient ¶
type FilterClient interface { GetOutput(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceToken, collectionID, filterOutputID string) (m filter.Model, err error) Checker(ctx context.Context, check *healthcheck.CheckState) 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 { GetDownloadVariant(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, imageID, variant string) (m image.ImageDownload, err error) Checker(ctx context.Context, check *healthcheck.CheckState) error }
ImageClient is an interface to represent methods called to action on the image api
type Model ¶
Model is a struct that contains all the required information to download a file.
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 InstanceID string DatasetID string Edition string Version string ImageID string Variant string Filename string }
Parameters is the union of required parameters to perform all downloads