Documentation ¶
Index ¶
Constants ¶
const PluginKey = "operatorBuilder"
Variables ¶
var ( ErrParseConfig = errors.New("error parsing workload config") ErrParseComponentConfig = errors.New("error parsing workload component config") ErrConvertComponent = errors.New("error converting workload to component workload") ErrConvertCollection = errors.New("error converting workload to collection") ErrCollectionRequired = errors.New("a WorkloadCollection is required when using WorkloadComponents") ErrMultipleConfigs = errors.New("multiple configs found - please provide only one standalone or collection workload") ErrMissingWorkload = errors.New("could not find either standalone or collection workload, please provide one") ErrMissingDependencies = errors.New("missing dependencies - no workload config provided") )
var ( ErrUniqueNames = errors.New("each workload name must be unique") ErrUniqueKinds = errors.New("each kind within a group must be unique") )
var ErrConfigMustExist = errors.New("no workload config provided - workload config required")
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { WorkloadConfigPath string `json:"workloadConfigPath" yaml:"workloadConfigPath"` CliRootCommandName string `json:"cliRootCommandName" yaml:"cliRootCommandName"` ControllerImg string `json:"controllerImg" yaml:"controllerImg"` EnableOLM bool `json:"enableOlm" yaml:"enableOlm"` }
Plugin contains the project config values which are stored in the PROJECT file under plugins.operatorBuilder.
type Processor ¶
type Processor struct { Path string // Workload represents the top-level configuration (e.g. as passed in via the --workload-config) flag // from the command line, while Children represents subordinate configurations that the parent files such // as the componentFiles field. Workload kinds.WorkloadBuilder Children []*Processor }
Processor is an object that stores information necessary for generating object source code.
func NewProcessor ¶
NewProcessor will return a new workload config processor given a path. An error is returned if the workload config does not exist at a path.
func Parse ¶
Parse will parse and individual workload config given the path at which it exists. It also returns the processor and all of its attributes that were parsed and set during parsing.
func (*Processor) GetProcessors ¶
GetProcessors gets all of the processors to include the parent and children processors.
func (*Processor) GetWorkloads ¶
func (processor *Processor) GetWorkloads() []kinds.WorkloadBuilder
GetWorkloads gets all of the workloads for a config processor in a flattened fashion.