generate

package
v0.14.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMaintainer

func AddMaintainer(fs afero.Fs, path string, m *v1beta1.Maintainer) error

AddMaintainer adds a maintainer to the operator.yaml

func AddParameter

func AddParameter(fs afero.Fs, path string, p *packages.Parameter) error

AddParameter writes a parameter to the params.yaml file

func AddPlan

func AddPlan(fs afero.Fs, path string, planName string, plan *v1beta1.Plan) error

AddPlan adds a plan to the operator.yaml file

func AddTask

func AddTask(fs afero.Fs, path string, task *v1beta1.Task) error

AddTask adds a task to the operator.yaml file

func CanGenerateOperator

func CanGenerateOperator(fs afero.Fs, dir string, overwrite bool) error

CanGenerateOperator checks to see if operator generation makes sense (we don't generate over an operator or existing folder) fails if folder exits (non-destructive) if "operator.yaml" exists in current dir, we assume it's a mistake an error

func EnsureResource

func EnsureResource(fs afero.Fs, dir string, resource string) error

EnsureResource ensures that resource is in templates folder

func EnsureTaskResources

func EnsureTaskResources(fs afero.Fs, path string, task *v1beta1.Task) error

EnsureTaskResources ensures that all resources used by the given task exist

func MaintainerList

func MaintainerList(fs afero.Fs, path string) ([]*v1beta1.Maintainer, error)

MaintainerList provides a list of operator maintainers

func Operator

func Operator(fs afero.Fs, dir string, op *packages.OperatorFile, overwrite bool) error

Operator generates an initial operator folder with a operator.yaml

func OperatorPath

func OperatorPath(fs afero.Fs) (string, error)

OperatorPath determines the path to use as operator path for generators the path is either current "", or a dir with operator.yaml (if 1) else an error and is determined based on location of operator.yaml

func ParameterNameList

func ParameterNameList(fs afero.Fs, path string) (paramNames []string, err error)

func PlanList

func PlanList(fs afero.Fs, path string) (map[string]v1beta1.Plan, error)

PlanList provides a list of operator plans

func PlanNameList

func PlanNameList(fs afero.Fs, path string) ([]string, error)

PlanNameList provides a list of operator plan names

func TaskInList

func TaskInList(fs afero.Fs, path, taskName string) (bool, error)

func TaskKinds

func TaskKinds() []string

TaskKinds provides a list of task kinds what are supported via generators

func TaskList

func TaskList(fs afero.Fs, path string) ([]v1beta1.Task, error)

TaskList provides a list of operator tasks

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL