cmd

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2016 License: Apache-2.0 Imports: 30 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
	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
	// 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 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) SetClientMapper added in v1.0.7

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 added in v1.0.7

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 added in v1.0.7

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