helpers

package
v0.0.0-...-d5b1bed Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFromDirectory

func BuildFromDirectory(directoryPath string, imageRepository string, contextLogger *log.Entry) (string, error)

BuildFromDirectory send a build request to the docker daemon by sending a tar built with the given directory.

func BuildFromTar

func BuildFromTar(tarPath string, imageRepository string, contextLogger *log.Entry) (string, error)

BuildFromTar send a build request to the docker daemon by sending the given tar.

func EvaluateURL

func EvaluateURL(url string, branch string) string

EvaluateURL evaluates github archive download url

func ExtractRepository

func ExtractRepository(url string, destination string) error

ExtractRepository from an url hosting a tar.gz of this repository with an added root directory that will be flatten

func Ping

func Ping() (string, error)

Ping send a Get _ping request to the docker daemon

func PushImage

func PushImage(imageRepository string) error

PushImage send a push image request to the docker daemon

func ReadURL

func ReadURL(url string) (*tar.Reader, error)

ReadURL reads a tar.gz archive from an URL and return the associated reader

func Version

func Version() (string, error)

Version send a Get version request to the docker daemon

Types

type MessageStream

type MessageStream struct {
	Error       string `json:"error"`
	ErrorDetail struct {
		Message string `json:"message"`
	} `json:"errorDetail"`
	ID             string `json:"id"`
	Progress       string `json:"progress"`
	ProgressDetail struct {
		Current int `json:"current"`
		Total   int `json:"total"`
	} `json:"progressDetail"`
	Status string `json:"status"`
	Stream string `json:"stream"`
}

MessageStream is a JSON struct to be used to parse incomming message from the Doceker daemon

type Specification

type Specification struct {
	Port                  string `default:"3000"`
	LogLevel              string `envconfig:"log_level" default:"debug"`
	WorkingDirectory      string `envconfig:"working_directory"`
	RegistryURL           string `envconfig:"registry_url"`
	RegistryUsername      string `envconfig:"registry_username"`
	RegistryPassword      string `envconfig:"registry_password"`
	RegistryEmail         string `envconfig:"registry_email"`
	APIKey                string `envconfig:"api_key"`
	GitUsername           string `envconfig:"git_username"`
	GitPassword           string `envconfig:"git_password"`
	BitbucketRepositories string `envconfig:"bitbucket_repositories"`
}

Specification to hold the configuration of the application

var (
	// Config make things easier but is bad
	Config *Specification

	// UnleashVersion
	UnleashVersion = "0.1.0"
)

func ParseConfiguration

func ParseConfiguration() (Specification, error)

ParseConfiguration will parse the configuration of Unleash based on environment variables

func (*Specification) Describe

func (specification *Specification) Describe()

Describe will log all variables parsed with envconfig

Jump to

Keyboard shortcuts

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