download

package
v0.0.0-...-da75f93 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package download knows how to download a file from an HTTP URL, an S3 URL or from the local filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Location     string
	Body         []byte
	ETag         string
	LastModified time.Time
	IsLocal      bool
}

File represents a file that has been downloaded from HTTP, S3 or the local filesystem.

func Get

func Get(location string) (*File, error)

Get returns a file from the specified location, including the body.

func Head(location string) (*File, error)

Head returns a file without the body. It can be used to determine if the file has changed.

Jump to

Keyboard shortcuts

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