Documentation
¶
Overview ¶
Package build contains types and functions for build cobra sub-command
Index ¶
- func Command(p *params.Params, ioStreams *genericclioptions.IOStreams) *cobra.Command
- type CreateCommand
- type DeleteCommand
- type ListCommand
- type RunCommand
- func (r *RunCommand) Cmd() *cobra.Command
- func (r *RunCommand) Complete(params *params.Params, ioStreams *genericclioptions.IOStreams, args []string) error
- func (r *RunCommand) FollowerReady() bool
- func (r *RunCommand) Run(params *params.Params, ioStreams *genericclioptions.IOStreams) error
- func (r *RunCommand) Validate() error
- type UploadCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateCommand ¶
type CreateCommand struct {
// contains filtered or unexported fields
}
CreateCommand contains data input from user
func (*CreateCommand) Cmd ¶
func (c *CreateCommand) Cmd() *cobra.Command
Cmd returns cobra.Command object of the create subcommand.
func (*CreateCommand) Complete ¶
func (c *CreateCommand) Complete(_ *params.Params, _ *genericclioptions.IOStreams, args []string) error
Complete fills internal subcommand structure for future work with user input
func (*CreateCommand) Run ¶
func (c *CreateCommand) Run(params *params.Params, io *genericclioptions.IOStreams) error
Run executes the creation of a new Build instance using flags to fill up the details.
func (*CreateCommand) Validate ¶
func (c *CreateCommand) Validate() error
Validate is used for user input validation of flags and other data.
type DeleteCommand ¶
type DeleteCommand struct {
// contains filtered or unexported fields
}
DeleteCommand contains data provided by user to the delete subcommand
func (*DeleteCommand) Cmd ¶
func (c *DeleteCommand) Cmd() *cobra.Command
Cmd returns cobra command object of the delete subcommand
func (*DeleteCommand) Complete ¶
func (c *DeleteCommand) Complete(_ *params.Params, _ *genericclioptions.IOStreams, args []string) error
Complete fills DeleteSubCommand structure with data obtained from cobra command
func (*DeleteCommand) Run ¶
func (c *DeleteCommand) Run(params *params.Params, io *genericclioptions.IOStreams) error
Run contains main logic of delete subcommand
func (*DeleteCommand) Validate ¶
func (c *DeleteCommand) Validate() error
Validate is used for validation of user input data
type ListCommand ¶
type ListCommand struct {
// contains filtered or unexported fields
}
ListCommand struct contains user input to the List subcommand of Build
func (*ListCommand) Cmd ¶
func (c *ListCommand) Cmd() *cobra.Command
Cmd returns cobra command object of List subcommand
func (*ListCommand) Complete ¶
func (c *ListCommand) Complete(_ *params.Params, _ *genericclioptions.IOStreams, _ []string) error
Complete fills object with user input data
func (*ListCommand) Run ¶
func (c *ListCommand) Run(params *params.Params, io *genericclioptions.IOStreams) error
Run contains main logic of List subcommand of Build
func (*ListCommand) Validate ¶
func (c *ListCommand) Validate() error
Validate checks user input data
type RunCommand ¶
type RunCommand struct {
// contains filtered or unexported fields
}
RunCommand represents the `build run` sub-command, which creates a unique BuildRun instance to run the build process, informed via arguments.
func (*RunCommand) Cmd ¶
func (r *RunCommand) Cmd() *cobra.Command
Cmd returns cobra.Command object of the create sub-command.
func (*RunCommand) Complete ¶
func (r *RunCommand) Complete(params *params.Params, ioStreams *genericclioptions.IOStreams, args []string) error
Complete picks the build resource name from arguments, and instantiate additional components.
func (*RunCommand) FollowerReady ¶ added in v0.10.0
func (r *RunCommand) FollowerReady() bool
FollowerReady blocks until the any log following connections are established in the Run call. Useful if you have code that calls Run on a separate thread and coordination is needed.
func (*RunCommand) Run ¶
func (r *RunCommand) Run(params *params.Params, ioStreams *genericclioptions.IOStreams) error
Run creates a BuildRun resource based on Build's name informed on arguments.
func (*RunCommand) Validate ¶
func (r *RunCommand) Validate() error
Validate the user must inform the build resource name.
type UploadCommand ¶ added in v0.8.0
type UploadCommand struct {
// contains filtered or unexported fields
}
UploadCommand represents the "build upload" subcommand, implements runner.SubCommand interface.
func (*UploadCommand) Cmd ¶ added in v0.8.0
func (u *UploadCommand) Cmd() *cobra.Command
Cmd exposes the Cobra command instance.
func (*UploadCommand) Complete ¶ added in v0.8.0
func (u *UploadCommand) Complete(p *params.Params, _ *genericclioptions.IOStreams, args []string) error
Complete instantiate the dependencies for the log following and the data streaming.
func (*UploadCommand) Run ¶ added in v0.8.0
func (u *UploadCommand) Run(p *params.Params, ioStreams *genericclioptions.IOStreams) error
Run executes the primary business logic of this subcommand, by starting to watch over the build pod status and react accordingly.
func (*UploadCommand) Validate ¶ added in v0.8.0
func (u *UploadCommand) Validate() error
Validate the current subcommand state, make sure the directory to be uploaded exists.