Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientError ¶
ClientError implements error interface with additional code method
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 Download ¶
type Download struct { DatasetClient DatasetClient VaultClient VaultClient FilterClient FilterClient S3Client S3Client ServiceAuthToken string DownloadServiceToken string SecretKey string VaultPath string IsPublishing bool }
Download represents the configuration for a download handler
func (Download) Do ¶
func (d Download) Do(extension, serviceAuthToken, downloadServiceToken string) http.HandlerFunc
Do handles the retrieval of a requested file, by first calling the datasetID to see if the version has a public link available and redirecting if so, otherwise it decrypts the private file on the fly (if it is published). Authenticated requests will always allow access to the private, whether or not the version is published.
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 IdentityClient ¶
IdentityClient is an interface to represent methods called to action on the identity api
type S3Client ¶
type S3Client interface {
GetWithPSK(key string, psk []byte) (io.ReadCloser, error)
}
S3Client is an interface to represent methods called to retrieve from s3
type VaultClient ¶
VaultClient is an interface to represent methods called to action upon vault