dexec

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2016 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildVolumeArgs

func BuildVolumeArgs(path string, targets []string) []string

BuildVolumeArgs takes a base path and returns an array of Docker volume arguments. The array takes the form {"-v", "/foo:/bar:[rw|ro]", ...} for each source or include.

func ExtractBasenameAndPermission

func ExtractBasenameAndPermission(path string) (string, string)

ExtractBasenameAndPermission takes an include string and splits it into its file or folder name and the permission string if present or the empty string if not.

func FetchImage

func FetchImage(name string, tag string, update bool, client *docker.Client) error

FetchImage guarantees a Docker image is availabe in the local repository or returns an error.

Types

type Image

type Image struct {
	Name      string
	Extension string
	Image     string
	Version   string
}

Image consists of the file extension, Docker image name and Docker image version to use for a given Docker Exec image.

func ImageFromOptions

func ImageFromOptions(options map[cli.OptionType][]string) (image *Image, err error)

ImageFromOptions returns an image from a set of options.

func LookupImageByExtension

func LookupImageByExtension(key string) (*Image, error)

LookupImageByExtension returns the image for a given extension.

func LookupImageByName

func LookupImageByName(name string) (*Image, error)

LookupImageByName returns the image for a given image name.

func LookupImageByOverride

func LookupImageByOverride(image string, extension string) (*Image, error)

LookupImageByOverride takes an image that has been specified by the user to use instead of the one in the extension map. This function returns a DexecImage struct containing the image name & version, as well as the file extension that was passed in.

Jump to

Keyboard shortcuts

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