Documentation ¶
Index ¶
- Constants
- Variables
- type AppConfig
- func (c *AppConfig) AddArguments(args []string) []string
- func (c *AppConfig) GetBuildEnvironment(environment app.Environment) app.Environment
- func (c *AppConfig) HasArguments() bool
- func (c *AppConfig) Querying() bool
- func (c *AppConfig) Run() (*AppResult, error)
- func (c *AppConfig) RunQuery() (*QueryResult, error)
- func (c *AppConfig) SetClientMapper(clientMapper resource.ClientMapper)
- func (c *AppConfig) SetDockerClient(dockerclient *docker.Client)
- func (c *AppConfig) SetMapper(mapper meta.RESTMapper)
- func (c *AppConfig) SetOpenShiftClient(osclient client.Interface, originNamespace string)
- func (c *AppConfig) SetTyper(typer runtime.ObjectTyper)
- type AppResult
- type ErrRequiresExplicitAccess
- type QueryResult
- type UsageError
Constants ¶
const ( GeneratedByNamespace = "openshift.io/generated-by" GeneratedForJob = "openshift.io/generated-job" GeneratedForJobFor = "openshift.io/generated-job.for" GeneratedByNewApp = "OpenShiftNewApp" GeneratedByNewBuild = "OpenShiftNewBuild" )
Variables ¶
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.
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 ¶
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 (*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 ¶
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 ¶
func (e ErrRequiresExplicitAccess) Error() string
type QueryResult ¶
type QueryResult struct { Matches app.ComponentMatches List *kapi.List }
QueryResult contains the results of a query (search or list)
type UsageError ¶
UsageError is an interface for printing usage errors