Documentation ¶
Index ¶
- func GetDownloadParameters(req *http.Request, serviceAuthToken, downloadServiceToken string) downloads.Parameters
- type ClientError
- type Download
- func (d Download) DoDatasetVersion(extension, serviceAuthToken, downloadServiceToken string) http.HandlerFunc
- func (d Download) DoFilterOutput(extension, serviceAuthToken, downloadServiceToken string) http.HandlerFunc
- func (d Download) DoImage(serviceAuthToken, downloadServiceToken string) http.HandlerFunc
- type Downloader
- type IdentityClient
- type S3Content
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDownloadParameters ¶ added in v1.10.0
func GetDownloadParameters(req *http.Request, serviceAuthToken, downloadServiceToken string) downloads.Parameters
GetDownloadParameters extracts the query parameters and context values for the provided request, then returns a struct with all the available parameters, including the explicitly provided service and downloadService tokens
Types ¶
type ClientError ¶
ClientError implements error interface with additional code method
type Download ¶
type Download struct { Downloader Downloader S3Content S3Content ServiceAuthToken string DownloadServiceToken string SecretKey string IsPublishing bool }
Download represents the configuration for a download handler
func (Download) DoDatasetVersion ¶ added in v1.10.0
func (d Download) DoDatasetVersion(extension, serviceAuthToken, downloadServiceToken string) http.HandlerFunc
DoDatasetVersion handles dataset version file download requests.
func (Download) DoFilterOutput ¶ added in v1.10.0
func (d Download) DoFilterOutput(extension, serviceAuthToken, downloadServiceToken string) http.HandlerFunc
DoFilterOutput handles filter outpout download requests.
type Downloader ¶ added in v1.10.0
type Downloader interface {
Get(ctx context.Context, p downloads.Parameters, fileType downloads.FileType, variant string) (downloads.Model, error)
}
Downloader is an interface to represent methods called to obtain the download metadata for any possible download type (dataset, image, etc)
type IdentityClient ¶
IdentityClient is an interface to represent methods called to action on the identity api