generator

package
v0.3.3 Latest Latest
Warning

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

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

Documentation

Overview

Package generator contains generators of reference objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildStrategyRefGenerator

type BuildStrategyRefGenerator struct {
	// contains filtered or unexported fields
}

BuildStrategyRefGenerator generates BuildStrategyRef

func NewBuildStrategyRefGenerator

func NewBuildStrategyRefGenerator(sourceDetectors source.Detectors, resolver app.Resolver) *BuildStrategyRefGenerator

NewBuildStrategyRefGenerator creates a BuildStrategyRefGenerator

func (*BuildStrategyRefGenerator) FromDockerContextAndParent

func (g *BuildStrategyRefGenerator) FromDockerContextAndParent(parentRef *app.ImageRef) (*app.BuildStrategyRef, error)

FromContextAndParent generates a build strategy ref from a context path and parent image name

func (*BuildStrategyRefGenerator) FromSTIBuilderImage

func (g *BuildStrategyRefGenerator) FromSTIBuilderImage(image *app.ImageRef) (*app.BuildStrategyRef, error)

FromSTIBuilderImage generates a build strategy from a builder image ref

func (*BuildStrategyRefGenerator) FromSourceRef

func (g *BuildStrategyRefGenerator) FromSourceRef(srcRef app.SourceRef) (*app.BuildStrategyRef, error)

FromSourceRef creates a build strategy from a source reference

func (*BuildStrategyRefGenerator) FromSourceRefAndDockerContext

func (g *BuildStrategyRefGenerator) FromSourceRefAndDockerContext(srcRef app.SourceRef, context string) (*app.BuildStrategyRef, error)

FromSourceRefAndDockerContext generates a BuildStrategyRef from a source ref and context path

type ImageRefGenerator

type ImageRefGenerator interface {
	FromName(name string) (*app.ImageRef, error)
	FromNameAndPorts(name string, ports []string) (*app.ImageRef, error)
	FromNameAndResolver(name string, resolver app.Resolver) (*app.ImageRef, error)
	FromRepository(repo *imageapi.ImageRepository, tag string) (*app.ImageRef, error)
	FromDockerfile(name string, dir string, context string) (*app.ImageRef, error)
}

ImageRefGenerator generates ImageRefs

func NewImageRefGenerator

func NewImageRefGenerator() ImageRefGenerator

NewImageRefGenerator creates a new ImageRefGenerator

type SourceRefGenerator

type SourceRefGenerator struct {
	// contains filtered or unexported fields
}

SourceRefGenerator generates new SourceRefs either from a URL or a Directory

func NewSourceRefGenerator

func NewSourceRefGenerator() *SourceRefGenerator

NewSourceRefGenerator creates a new SourceRefGenerator

func (*SourceRefGenerator) FromDirectory

func (g *SourceRefGenerator) FromDirectory(directory string) (*app.SourceRef, error)

SourceRefForDirectory creates a SourceRef from a directory that contains a git repository. The URL is obtained from the origin remote branch, and the reference is taken from the currently checked out branch.

func (*SourceRefGenerator) FromGitURL

func (g *SourceRefGenerator) FromGitURL(location string) (*app.SourceRef, error)

SourceRefForGitURL creates a SourceRef from a Git URL. If the URL includes a hash, it is used for the SourceRef's branch reference. Otherwise, 'master' is assumed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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