filedownloader

package
v0.0.0-...-c6cd810 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureDownloader

type AzureDownloader struct {
	Credential        *azblob.SharedKeyCredential
	StorageAccountURL *url.URL
	ContainerURL      azblob.ContainerURL
}

AzureDownloader contains data needed to list or dowload blobs from azure.

func NewAzureDownloader

func NewAzureDownloader(accountName string, accountKey string, containerName string) *AzureDownloader

NewAzureDownloader creates and returns data a DownloaderData.

func (*AzureDownloader) DownloadFile

func (downloader *AzureDownloader) DownloadFile(fileName string) io.ReadCloser

DownloadFile downloads the blob with the given name from azure.

func (*AzureDownloader) ListFileNames

func (downloader *AzureDownloader) ListFileNames() []string

ListFileNames lists the blobs in the azure container.

type FileDownloader

type FileDownloader interface {
	ListFileNames() []string
	DownloadFile(fileName string) io.ReadCloser
}

FileDownloader interface describes the methods needed to list and download files to process.

Jump to

Keyboard shortcuts

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