Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdGenerate ¶
func NewCmdGenerate(ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdGenerate creates the `generate` command.
Types ¶
type GenerateFlags ¶
type GenerateFlags struct { WorkDir string Backend string Workspace string 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(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 { WorkDir string Project *v1.Project Stack *v1.Stack Workspace *v1.Workspace SpecStorage spec.Storage Generator generator.Generator }
GenerateOptions defines flags and other configuration parameters for the `generate` command.
func (*GenerateOptions) Run ¶
func (o *GenerateOptions) Run() error
Run executes the `generate` command.
Click to show internal directories.
Click to hide internal directories.