scripts

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertEnvironment

func ConvertEnvironment(env []Environment) (result []string)

ConvertEnvironment converts the []Environment to "key=val" strings

func ConvertEnvironmentToDocker

func ConvertEnvironmentToDocker(env []Environment) (result string)

ConvertEnvironmentToDocker converts the []Environment into Dockerfile format

func NewHTTPReader

func NewHTTPReader() schemeReader

NewHTTPReader creates an instance of the HttpURLReader

Types

type Downloader

type Downloader interface {
	Download(url *url.URL, target string) (*api.SourceInfo, 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 Environment

type Environment struct {
	Name  string
	Value string
}

Environment represents a single environment variable definition

func GetEnvironment

func GetEnvironment(config *api.Config) ([]Environment, error)

GetEnvironment gets the .sti/environment file located in the sources and parse it into []environment

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, auth dockerClient.AuthConfiguration) 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