cmd

package
v0.0.0-...-ea77a8b Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: Apache-2.0 Imports: 29 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

This section is empty.

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

	SkipGeneration        bool
	AllowGenerationErrors bool

	AllowSecretUse bool
	SecretAccessor app.SecretAccessor

	AsSearch bool
	AsList   bool
	DryRun   bool

	Out    io.Writer
	ErrOut io.Writer

	KubeClient kclient.Interface
	// contains filtered or unexported fields
}

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) GetBuildEnvironment

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

func (*AppConfig) HasArguments

func (c *AppConfig) HasArguments() bool

func (*AppConfig) Querying

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

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

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

func (*AppConfig) SetClientMapper

func (c *AppConfig) SetClientMapper(clientMapper resource.ClientMapper)

func (*AppConfig) SetDockerClient

func (c *AppConfig) SetDockerClient(dockerclient *docker.Client)

SetDockerClient sets the passed Docker client in the application configuration

func (*AppConfig) SetMapper

func (c *AppConfig) SetMapper(mapper meta.RESTMapper)

func (*AppConfig) SetOpenShiftClient

func (c *AppConfig) SetOpenShiftClient(osclient client.Interface, originNamespace string)

SetOpenShiftClient sets the passed OpenShift client in the application configuration

func (*AppConfig) SetTyper

func (c *AppConfig) SetTyper(typer runtime.ObjectTyper)

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

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

func (ErrRequiresExplicitAccess) Error

type QueryResult

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