{"modulePath":"github.com/data-preservation-programs/singularity","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package handler\n\n## Functions\n\n```go\nfunc DownloadHandler(ctx *cli.Context,\n\tpiece string,\n\tapi string,\n\tconfig map[string]string,\n\tclientConfig model.ClientConfig,\n\toutDir string,\n\tconcurrency int,\n) error\n```\nDownloadHandler 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.\n\nParameters:\n\n  - ctx: The context for the operation.\n  - piece: The identifier of the content piece to be downloaded.\n  - api: The base URL of the API from which metadata is to be fetched.\n  - config: A map containing configuration settings for various storage types.\n  - outDir: The directory where the downloaded content should be saved.\n  - concurrency: The number of concurrent operations allowed during the download.\n\nReturns:\n\n  - An error, if any occurred during the download process.\n\n","path":"github.com/data-preservation-programs/singularity/handler","name":"handler","synopsis":"","isRedistributable":true}
