Documentation ¶
Index ¶
- Constants
- Variables
- func Resolve(components app.ComponentReferences) error
- func Search(components app.ComponentReferences) error
- type AppConfig
- func (c *AppConfig) AddArguments(args []string) []string
- func (c *AppConfig) DetectSource(repositories []*app.SourceRepository) error
- func (c *AppConfig) DockerRegistrySearcher() app.Searcher
- 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) SetOpenShiftClient(osclient client.Interface, OriginNamespace string, dockerclient *docker.Client)
- 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 ¶
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 ¶ added in v1.1.3
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 ¶
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 (*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 (*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.
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
func (e ErrRequiresExplicitAccess) Error() string
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 ¶
UsageError is an interface for printing usage errors