download

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForConfirmation

func AskForConfirmation(logger *slog.Logger, s string) bool

AskForConfirmation asks user for confirmation before proceed, will wait if user entered garbage

func DownloadMultiple

func DownloadMultiple(
	ctx context.Context,
	g3i g3client.Gen3Interface,
	objects []common.ManifestObject,
	downloadPath string,
	filenameFormat string,
	rename bool,
	noPrompt bool,
	protocol string,
	numParallel int,
	skipCompleted bool,
) error

DownloadMultiple is the public entry point called from g3cmd

func DownloadSingleWithProgress

func DownloadSingleWithProgress(
	ctx context.Context,
	g3i g3client.Gen3Interface,
	guid string,
	downloadPath string,
	protocol string,
) error

DownloadSingleWithProgress downloads a single object while emitting progress events.

func DownloadToPath

func DownloadToPath(
	ctx context.Context,
	g3i g3client.Gen3Interface,
	guid string,
	dstPath string,
) error

DownloadToPath downloads a single object by GUID to a specific destination file path. It bypasses the name lookup from Gen3 and uses the provided dstPath directly.

func GetDownloadResponse

func GetDownloadResponse(ctx context.Context, g3 client.Gen3Interface, fdr *common.FileDownloadResponseObject, protocolText string) error

GetDownloadResponse gets presigned URL and prepares HTTP response

Types

type IndexdResponse

type IndexdResponse struct {
	Name string
	Size int64
}

func AskGen3ForFileInfo

func AskGen3ForFileInfo(
	ctx context.Context,
	g3i g3client.Gen3Interface,
	guid, protocol, downloadPath, filenameFormat string,
	rename bool,
	renamedFiles *[]RenamedOrSkippedFileInfo,
) (*IndexdResponse, error)

type RenamedOrSkippedFileInfo

type RenamedOrSkippedFileInfo struct {
	GUID        string
	OldFilename string
	NewFilename string
}

Jump to

Keyboard shortcuts

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