Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSpecWithSpinner ¶
func GenerateSpecWithSpinner( project *v1.Project, stack *v1.Stack, workspace *v1.Workspace, parameters map[string]string, ui *terminal.UI, noStyle bool, ) (*v1.Spec, error)
GenerateSpecWithSpinner calls generator to generate versioned Spec. Add a method wrapper for testing purposes.
func NewCmdGenerate ¶
NewCmdGenerate creates the `generate` command.
Types ¶
type GenerateFlags ¶
type GenerateFlags struct { MetaFlags *meta.MetaFlags Output string Values []string NoStyle bool UI *terminal.UI genericiooptions.IOStreams }
GenerateFlags directly reflect the information that CLI is gathering via flags. They will be converted to GenerateOptions, which reflect the runtime requirements for the command.
This structure reduces the transformation to wiring and makes the logic itself easy to unit test.
func NewGenerateFlags ¶
func NewGenerateFlags(ui *terminal.UI, streams genericiooptions.IOStreams) *GenerateFlags
NewGenerateFlags returns a default GenerateFlags
func (*GenerateFlags) AddFlags ¶
func (flags *GenerateFlags) AddFlags(cmd *cobra.Command)
AddFlags registers flags for a cli.
func (*GenerateFlags) ToOptions ¶
func (flags *GenerateFlags) ToOptions() (*GenerateOptions, error)
ToOptions converts from CLI inputs to runtime inputs.
type GenerateOptions ¶
type GenerateOptions struct { *meta.MetaOptions Output string Values []string NoStyle bool UI *terminal.UI genericiooptions.IOStreams }
GenerateOptions defines flags and other configuration parameters for the `generate` command.
func (*GenerateOptions) Run ¶
func (o *GenerateOptions) Run() error
Run executes the `generate` command.