cmd

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GeneratedByNamespace = "openshift.io/generated-by"
	GeneratedForJob      = "openshift.io/generated-job"
	GeneratedForJobFor   = "openshift.io/generated-job.for"
	GeneratedByNewApp    = "OpenShiftNewApp"
	GeneratedByNewBuild  = "OpenShiftNewBuild"
)

Variables

View Source
var ErrNoDockerfileDetected = fmt.Errorf("No Dockerfile was found in the repository and the requested build strategy is 'docker'")

ErrNoDockerfileDetected is the error returned when the requested build strategy is Docker and no Dockerfile is detected in the repository.

View Source
var ErrNoInputs = fmt.Errorf("no inputs provided")

ErrNoInputs is returned when no inputs are specified

Functions

func Resolve added in v1.1.3

func Resolve(components app.ComponentReferences) error

Resolve the references to ensure they are all valid, and identify any images that don't match user input.

func Search(components app.ComponentReferences) error

Search searches on all references

Types

type AppConfig

type AppConfig struct {
	SourceRepositories []string
	ContextDir         string

	Components    []string
	ImageStreams  []string
	DockerImages  []string
	Templates     []string
	TemplateFiles []string

	TemplateParameters []string
	Groups             []string
	Environment        []string
	Labels             map[string]string

	AddEnvironmentToBuild bool

	Dockerfile string

	Name             string
	To               string
	Strategy         string
	InsecureRegistry bool
	OutputDocker     bool
	NoOutput         bool

	ExpectToBuild      bool
	BinaryBuild        bool
	AllowMissingImages bool

	Deploy           bool
	AsTestDeployment bool

	SourceImage     string
	SourceImagePath string

	SkipGeneration        bool
	AllowGenerationErrors bool

	AllowSecretUse bool
	SecretAccessor app.SecretAccessor

	Secrets []string

	AsSearch bool
	AsList   bool
	DryRun   bool

	Out    io.Writer
	ErrOut io.Writer

	KubeClient kclient.Interface

	RefBuilder *app.ReferenceBuilder

	DockerSearcher                  app.Searcher
	ImageStreamSearcher             app.Searcher
	ImageStreamByAnnotationSearcher app.Searcher
	TemplateSearcher                app.Searcher
	TemplateFileSearcher            app.Searcher

	Detector app.Detector

	Typer        runtime.ObjectTyper
	Mapper       meta.RESTMapper
	ClientMapper resource.ClientMapper

	OSClient        client.Interface
	OriginNamespace string
}

AppConfig contains all the necessary configuration for an application

func NewAppConfig

func NewAppConfig() *AppConfig

NewAppConfig returns a new AppConfig, but you must set your typer, mapper, and clientMapper after the command has been run and flags have been parsed.

func (*AppConfig) AddArguments

func (c *AppConfig) AddArguments(args []string) []string

AddArguments converts command line arguments into the appropriate bucket based on what they look like

func (*AppConfig) DetectSource added in v1.1.3

func (c *AppConfig) DetectSource(repositories []*app.SourceRepository) error

DetectSource runs a code detector on the passed in repositories to obtain a SourceRepositoryInfo

func (*AppConfig) DockerRegistrySearcher added in v1.1.3

func (c *AppConfig) DockerRegistrySearcher() app.Searcher

func (*AppConfig) GetBuildEnvironment added in v1.0.6

func (c *AppConfig) GetBuildEnvironment(environment app.Environment) app.Environment

func (*AppConfig) HasArguments added in v1.0.5

func (c *AppConfig) HasArguments() bool

func (*AppConfig) Querying added in v1.0.5

func (c *AppConfig) Querying() bool

func (*AppConfig) Run

func (c *AppConfig) Run() (*AppResult, error)

Run executes the provided config to generate objects.

func (*AppConfig) RunQuery added in v1.0.5

func (c *AppConfig) RunQuery() (*QueryResult, error)

RunQuery executes the provided config and returns the result of the resolution.

func (*AppConfig) SetOpenShiftClient

func (c *AppConfig) SetOpenShiftClient(osclient client.Interface, OriginNamespace string, dockerclient *docker.Client)

SetOpenShiftClient sets the passed OpenShift client in the application configuration

type AppResult

type AppResult struct {
	List *kapi.List

	Name      string
	HasSource bool
	Namespace string

	GeneratedJobs bool
}

AppResult contains the results of an application

type ErrRequiresExplicitAccess added in v1.0.7

type ErrRequiresExplicitAccess struct {
	Match app.ComponentMatch
	Input app.GeneratorInput
}

func (ErrRequiresExplicitAccess) Error added in v1.0.7

type QueryResult added in v1.0.5

type QueryResult struct {
	Matches app.ComponentMatches
	List    *kapi.List
}

QueryResult contains the results of a query (search or list)

type UsageError

type UsageError interface {
	UsageError(commandName string) string
}

UsageError is an interface for printing usage errors

Jump to

Keyboard shortcuts

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