handler

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadHandler

func DownloadHandler(ctx *cli.Context,
	piece string,
	api string,
	config map[string]string,
	outDir string,
	concurrency int,
) error

DownloadHandler fetches the metadata for a specified piece from a remote API and downloads the associated content. The content is then saved to a .car file in the specified directory.

Parameters: - ctx: The context for the operation. - piece: The identifier of the content piece to be downloaded. - api: The base URL of the API from which metadata is to be fetched. - config: A map containing configuration settings for various storage types. - outDir: The directory where the downloaded content should be saved. - concurrency: The number of concurrent operations allowed during the download.

Returns: - An error, if any occurred during the download process.

Types

This section is empty.

Directories

Path Synopsis
Code generated.
Code generated.
gen

Jump to

Keyboard shortcuts

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