Documentation ¶
Overview ¶
Package command contains all the logic for different commands within the CLI. It is the main gateway to doing operations against the Phobos API.
Index ¶
- func NewConfigureCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewConfigureDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewConfigureListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewFmtCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewHelpCommandFactory(synopsisText, helpText string) func() (cli.Command, error)
- func NewLoginCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewOrganizationCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewOrganizationDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewOrganizationGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewOrganizationListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewOrganizationUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineCancelCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineTemplateCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineTemplateDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineTemplateGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineTemplateListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPipelineValidateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginDeletePlatformCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginDeleteVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginGetPlatformCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginGetVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginInstallCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginLaunchCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginListPlatformsCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginListVersionsCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewPluginUploadVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewProjectCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewProjectDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewProjectGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewProjectListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewProjectUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseAddParticipantCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseLifecycleCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseLifecycleDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseLifecycleGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseLifecycleListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseLifecycleUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseLifecycleValidateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseListCommand(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseRemoveParticipantCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewReleaseUpdateDeploymentCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- func NewVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
- type BasicCommand
- type BasicOptionsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigureCommandFactory ¶
func NewConfigureCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewConfigureCommandFactory returns a configureCommand struct.
func NewConfigureDeleteCommandFactory ¶
func NewConfigureDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewConfigureDeleteCommandFactory returns a configureDeleteCommand struct.
func NewConfigureListCommandFactory ¶
func NewConfigureListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewConfigureListCommandFactory returns a configureListCommand struct.
func NewFmtCommandFactory ¶
func NewFmtCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewFmtCommandFactory returns an fmtCommand struct.
func NewHelpCommandFactory ¶
NewHelpCommandFactory returns a helpCommand struct.
func NewLoginCommandFactory ¶
func NewLoginCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewLoginCommandFactory returns a loginCommand struct.
func NewOrganizationCreateCommandFactory ¶
func NewOrganizationCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewOrganizationCreateCommandFactory returns an organizationCreateCommand struct.
func NewOrganizationDeleteCommandFactory ¶
func NewOrganizationDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewOrganizationDeleteCommandFactory returns an organizationDeleteCommand struct.
func NewOrganizationGetCommandFactory ¶
func NewOrganizationGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewOrganizationGetCommandFactory returns an organizationGetCommand struct.
func NewOrganizationListCommandFactory ¶
func NewOrganizationListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewOrganizationListCommandFactory returns an organizationListCommand struct.
func NewOrganizationUpdateCommandFactory ¶
func NewOrganizationUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewOrganizationUpdateCommandFactory returns an organizationUpdateCommand struct.
func NewPipelineCancelCommandFactory ¶
func NewPipelineCancelCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineCancelCommandFactory returns a pipelineCancelCommand struct.
func NewPipelineCreateCommandFactory ¶
func NewPipelineCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineCreateCommandFactory returns a pipelineCreateCommand struct.
func NewPipelineGetCommandFactory ¶
func NewPipelineGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineGetCommandFactory returns a pipelineGetCommand struct.
func NewPipelineListCommandFactory ¶
func NewPipelineListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineListCommandFactory returns a pipelineListCommand struct.
func NewPipelineTemplateCreateCommandFactory ¶
func NewPipelineTemplateCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineTemplateCreateCommandFactory returns a pipelineTemplateCreateCommand struct.
func NewPipelineTemplateDeleteCommandFactory ¶
func NewPipelineTemplateDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineTemplateDeleteCommandFactory returns a pipelineTemplateDeleteCommand struct.
func NewPipelineTemplateGetCommandFactory ¶
func NewPipelineTemplateGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineTemplateGetCommandFactory returns a pipelineTemplateGetCommand struct.
func NewPipelineTemplateListCommandFactory ¶
func NewPipelineTemplateListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineTemplateListCommandFactory returns a pipelineTemplateListCommand struct.
func NewPipelineValidateCommandFactory ¶
func NewPipelineValidateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPipelineValidateCommandFactory returns a pipelineValidateCommand struct.
func NewPluginCreateCommandFactory ¶
func NewPluginCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginCreateCommandFactory returns a pluginCreateCommand struct.
func NewPluginDeleteCommandFactory ¶
func NewPluginDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginDeleteCommandFactory returns a pluginDeleteCommand struct.
func NewPluginDeletePlatformCommandFactory ¶
func NewPluginDeletePlatformCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginDeletePlatformCommandFactory returns a pluginDeletePlatformCommand struct.
func NewPluginDeleteVersionCommandFactory ¶
func NewPluginDeleteVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginDeleteVersionCommandFactory returns a pluginDeleteVersionCommand struct.
func NewPluginGetCommandFactory ¶
func NewPluginGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginGetCommandFactory returns a pluginGetCommand struct.
func NewPluginGetPlatformCommandFactory ¶
func NewPluginGetPlatformCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginGetPlatformCommandFactory returns a pluginGetPlatformCommand struct.
func NewPluginGetVersionCommandFactory ¶
func NewPluginGetVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginGetVersionCommandFactory returns a pluginGetVersionCommand struct.
func NewPluginInstallCommandFactory ¶
func NewPluginInstallCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginInstallCommandFactory returns a pluginInstallCommand struct.
func NewPluginLaunchCommandFactory ¶
func NewPluginLaunchCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginLaunchCommandFactory returns a pluginLaunchCommand struct.
func NewPluginListCommandFactory ¶
func NewPluginListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginListCommandFactory returns a pluginListCommand struct.
func NewPluginListPlatformsCommandFactory ¶
func NewPluginListPlatformsCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginListPlatformsCommandFactory returns a pluginListPlatformsCommand struct.
func NewPluginListVersionsCommandFactory ¶
func NewPluginListVersionsCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginListVersionsCommandFactory returns a pluginListVersionsCommand struct.
func NewPluginUpdateCommandFactory ¶
func NewPluginUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginUpdateCommandFactory returns a pluginUpdateCommand struct.
func NewPluginUploadVersionCommandFactory ¶
func NewPluginUploadVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewPluginUploadVersionCommandFactory returns a pluginUploadVersionCommand struct.
func NewProjectCreateCommandFactory ¶
func NewProjectCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewProjectCreateCommandFactory returns a projectCreateCommand struct.
func NewProjectDeleteCommandFactory ¶
func NewProjectDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewProjectDeleteCommandFactory returns a projectDeleteCommand struct.
func NewProjectGetCommandFactory ¶
func NewProjectGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewProjectGetCommandFactory returns a projectGetCommand struct.
func NewProjectListCommandFactory ¶
func NewProjectListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewProjectListCommandFactory returns a projectListCommand struct.
func NewProjectUpdateCommandFactory ¶
func NewProjectUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewProjectUpdateCommandFactory returns a projectUpdateCommand struct.
func NewReleaseAddParticipantCommandFactory ¶
func NewReleaseAddParticipantCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseAddParticipantCommandFactory returns a releaseAddParticipantCommand struct.
func NewReleaseCreateCommandFactory ¶
func NewReleaseCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseCreateCommandFactory returns a releaseCreateCommand struct.
func NewReleaseDeleteCommandFactory ¶
func NewReleaseDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseDeleteCommandFactory returns a releaseDeleteCommand struct.
func NewReleaseGetCommandFactory ¶
func NewReleaseGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseGetCommandFactory returns a releaseGetCommand struct.
func NewReleaseLifecycleCreateCommandFactory ¶
func NewReleaseLifecycleCreateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseLifecycleCreateCommandFactory returns a releaseLifecycleCreateCommand struct.
func NewReleaseLifecycleDeleteCommandFactory ¶
func NewReleaseLifecycleDeleteCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseLifecycleDeleteCommandFactory returns a releaseLifecycleDeleteCommand struct.
func NewReleaseLifecycleGetCommandFactory ¶
func NewReleaseLifecycleGetCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseLifecycleGetCommandFactory returns a releaseLifecycleGetCommand struct.
func NewReleaseLifecycleListCommandFactory ¶
func NewReleaseLifecycleListCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseLifecycleListCommandFactory returns a releaseLifecycleListCommand struct.
func NewReleaseLifecycleUpdateCommandFactory ¶
func NewReleaseLifecycleUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseLifecycleUpdateCommandFactory returns a releaseLifecycleUpdateCommand struct.
func NewReleaseLifecycleValidateCommandFactory ¶
func NewReleaseLifecycleValidateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseLifecycleValidateCommandFactory returns a releaseLifecycleValidateCommand struct.
func NewReleaseListCommand ¶
func NewReleaseListCommand(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseListCommand returns a new releaseListCommand struct.
func NewReleaseRemoveParticipantCommandFactory ¶
func NewReleaseRemoveParticipantCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseRemoveParticipantCommandFactory returns a releaseRemoveParticipantCommand struct.
func NewReleaseUpdateCommandFactory ¶
func NewReleaseUpdateCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseUpdateCommandFactory returns a releaseUpdateCommand struct.
func NewReleaseUpdateDeploymentCommandFactory ¶
func NewReleaseUpdateDeploymentCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewReleaseUpdateDeploymentCommandFactory returns a releaseUpdateDeploymentCommand struct.
func NewVersionCommandFactory ¶ added in v0.6.0
func NewVersionCommandFactory(basicCommand *BasicCommand) func() (cli.Command, error)
NewVersionCommandFactory returns an instance of versionCommand.
Types ¶
type BasicCommand ¶
type BasicCommand struct { Context context.Context Logger hclog.Logger UI terminal.UI Version string DisplayTitle string BinaryName string CurrentProfileName string DefaultHTTPEndpoint string DefaultTLSSkipVerify bool // contains filtered or unexported fields }
BasicCommand contains data needed by all the CLI commands. It provides access to the UI, logger and other metadata information. Private fields are only populated after initialize() has been called and are entirely controllable by using the basicOptions above.
func (*BasicCommand) Close ¶
func (c *BasicCommand) Close() error
Close closes any pending resources.
type BasicOptionsFunc ¶
type BasicOptionsFunc func(*basicOptions) error
BasicOptionsFunc is an alias that allows setting basicOptions.
func WithArguments ¶
func WithArguments(args []string) BasicOptionsFunc
WithArguments sets the raw arguments that are passed into a command. It facilitates the parsing of flags and arguments.
func WithClient ¶
func WithClient(withAuth bool) BasicOptionsFunc
WithClient indicates that a gRPC client is needed by the command. Callers can set the withAuth parameter to indicate if client should be initialized with auth. Client should be available on the BasicCommand struct after initialize() has been called.
func WithCommandName ¶
func WithCommandName(name string) BasicOptionsFunc
WithCommandName is the name of the command that called BasicCommand.initialize(). It should always be set as it allows for helpful debugger statements.
func WithFlags ¶
func WithFlags(flags *flag.FlagSet) BasicOptionsFunc
WithFlags sets the FlagSet that needs to be parsed. Return values are often set as fields on the caller command's struct.
func WithInputValidator ¶
func WithInputValidator(inputValidator func() error) BasicOptionsFunc
WithInputValidator allows the calling command to pass in a input validator func, which once called, ensures proper data was passed into command. It can be used to make sure a flag was specified, or the value is a URL, etc.
Source Files ¶
- basic_command.go
- configure.go
- configure_delete.go
- configure_list.go
- fmt.go
- help.go
- login.go
- organization_create.go
- organization_delete.go
- organization_get.go
- organization_list.go
- organization_update.go
- pipeline_cancel.go
- pipeline_create.go
- pipeline_get.go
- pipeline_list.go
- pipeline_template_create.go
- pipeline_template_delete.go
- pipeline_template_get.go
- pipeline_template_list.go
- pipeline_validate.go
- plugin_create.go
- plugin_delete.go
- plugin_delete_platform.go
- plugin_delete_version.go
- plugin_get.go
- plugin_get_platform.go
- plugin_get_version.go
- plugin_install.go
- plugin_launch.go
- plugin_list.go
- plugin_list_platforms.go
- plugin_list_versions.go
- plugin_update.go
- plugin_upload_version.go
- project_create.go
- project_delete.go
- project_get.go
- project_list.go
- project_update.go
- release_add_participant.go
- release_create.go
- release_delete.go
- release_get.go
- release_lifecycle_create.go
- release_lifecycle_delete.go
- release_lifecycle_get.go
- release_lifecycle_list.go
- release_lifecycle_update.go
- release_lifecycle_validate.go
- release_list.go
- release_remove_participant.go
- release_update.go
- release_update_deployment.go
- util.go
- version.go