handlers

package
v1.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

type ClientError interface {
	error
	Code() int
}

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.

func (Download) DoImage added in v1.10.0

func (d Download) DoImage(serviceAuthToken, downloadServiceToken string) http.HandlerFunc

DoImage handles download image file 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

type IdentityClient interface {
	CheckRequest(*http.Request, string, string)
}

IdentityClient is an interface to represent methods called to action on the identity api

type S3Content added in v1.9.0

type S3Content interface {
	StreamAndWrite(ctx context.Context, s3Path string, w io.Writer) error
}

S3Content is an interface to represent methods called to action on S3

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL