downloader

package
v0.0.0-...-768a36a Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package downloader parses an s3 URI and downloads the specified file to the filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

Downloader tracks the region and Session and only recreates the Session if the region has changed

func New

func New() *Downloader

func (*Downloader) DownloadFile

func (d *Downloader) DownloadFile(s3Uri string, path string) (string, error)

DownloadFile pulls the file from an S3 bucket and writes it to the specified path

func (*Downloader) GetFileAttributes

func (d *Downloader) GetFileAttributes(s3Uri string) (string, int64, error)

GetFileAttributes queries the object in S3 and returns the timestamp and size in the format expected by apt

Jump to

Keyboard shortcuts

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