scripts

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPReader

func NewHTTPReader() schemeReader

NewHTTPReader creates an instance of the HttpURLReader

Types

type Downloader

type Downloader interface {
	Download(url *url.URL, target string) error
}

Downloader downloads the specified URL to the target file location

func NewDownloader

func NewDownloader() Downloader

NewDownloader creates an instance of the default Downloader implementation

type FileURLReader

type FileURLReader struct{}

FileURLReader opens a specified file and returns its stream

func (*FileURLReader) Read

func (*FileURLReader) Read(url *url.URL) (io.ReadCloser, error)

Read produces an io.Reader from a file URL

type HttpURLReader

type HttpURLReader struct {
	Get func(url string) (*http.Response, error)
}

HttpURLReader retrieves a response from a given http(s) URL

func (*HttpURLReader) Read

func (h *HttpURLReader) Read(url *url.URL) (io.ReadCloser, error)

Read produces an io.Reader from an http(s) URL.

type ImageReader

type ImageReader struct{}

ImageReader just returns information the URL is from inside the image

func (*ImageReader) Read

func (*ImageReader) Read(url *url.URL) (io.ReadCloser, error)

Read throws Not implemented error

type Installer

type Installer interface {
	InstallRequired(scripts []string, dstDir string) ([]api.InstallResult, error)
	InstallOptional(scripts []string, dstDir string) []api.InstallResult
}

Installer interface is responsible for installing scripts needed to run the build

func NewInstaller

func NewInstaller(image string, scriptsURL string, docker docker.Docker) Installer

NewInstaller returns a new instance of the default Installer implementation

Jump to

Keyboard shortcuts

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