Documentation ¶
Index ¶
- Constants
- Variables
- func NewCmdBuildLogs(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdCancelBuild(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdConfig(parentName, name string) *cobra.Command
- func NewCmdCreate(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdDelete(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdDeploy(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdDescribe(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdEdit(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdEnv(fullName string, f *clientcmd.Factory, in io.Reader, out io.Writer) *cobra.Command
- func NewCmdExec(fullName string, f *clientcmd.Factory, cmdIn io.Reader, ...) *cobra.Command
- func NewCmdExport(fullName string, f *clientcmd.Factory, in io.Reader, out io.Writer) *cobra.Command
- func NewCmdExpose(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdGet(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdImportImage(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdLabel(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdLogin(fullName string, f *osclientcmd.Factory, reader io.Reader, out io.Writer) *cobra.Command
- func NewCmdLogout(name, fullName, oscLoginFullCommand string, f *osclientcmd.Factory, ...) *cobra.Command
- func NewCmdLogs(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdNewApplication(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdNewBuild(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdOptions(out io.Writer) *cobra.Command
- func NewCmdPatch(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdPortForward(fullName string, f *clientcmd.Factory) *cobra.Command
- func NewCmdProcess(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdProject(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdProxy(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdReplace(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdRequestProject(name, fullName, oscLoginName, oscProjectName string, f *clientcmd.Factory, ...) *cobra.Command
- func NewCmdRollback(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdScale(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdStartBuild(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdStatus(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdStop(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdTag(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdTypes(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdVolume(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func NewCmdWhoAmI(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command
- func RunBuildLogs(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ...) error
- func RunCancelBuild(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error
- func RunEdit(fullName string, f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ...) error
- func RunEnv(f *clientcmd.Factory, in io.Reader, out io.Writer, cmd *cobra.Command, ...) error
- func RunExport(f *clientcmd.Factory, exporter Exporter, in io.Reader, out io.Writer, ...) error
- func RunImportImage(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error
- func RunListBuildWebHooks(f *clientcmd.Factory, out, errOut io.Writer, name string, isBuild bool, ...) error
- func RunLogin(cmd *cobra.Command, options *LoginOptions) error
- func RunNewApplication(fullName string, f *clientcmd.Factory, out io.Writer, c *cobra.Command, ...) error
- func RunNewBuild(fullName string, f *clientcmd.Factory, out io.Writer, c *cobra.Command, ...) error
- func RunProcess(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error
- func RunStartBuild(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunStartBuildWebHook(f *clientcmd.Factory, out io.Writer, webhook string, ...) error
- func RunStatus(f *clientcmd.Factory, out io.Writer) error
- func RunTag(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunWhoAmI(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- type AddVolumeOptions
- type DeployOptions
- type Exporter
- type LoginOptions
- type LogoutOptions
- type NewProjectOptions
- type ProjectOptions
- type RollbackOptions
- type VolumeOptions
- type WhoAmIOptions
Constants ¶
const WhoAmIRecommendedCommandName = "whoami"
Variables ¶
var ErrExportOmit = fmt.Errorf("object is omitted")
Functions ¶
func NewCmdBuildLogs ¶
NewCmdBuildLogs implements the OpenShift cli build-logs command
func NewCmdCancelBuild ¶
NewCmdCancelBuild implements the OpenShift cli cancel-build command
func NewCmdConfig ¶
func NewCmdCreate ¶
NewCmdCreate is a wrapper for the Kubernetes cli create command
func NewCmdDelete ¶
NewCmdDelete is a wrapper for the Kubernetes cli delete command
func NewCmdDeploy ¶
NewCmdDeploy creates a new `deploy` command.
func NewCmdDescribe ¶
NewCmdDescribe is a wrapper for the Kubernetes cli describe command
func NewCmdEdit ¶
NewCmdEdit implements the OpenShift cli edit command
func NewCmdExec ¶
func NewCmdExec(fullName string, f *clientcmd.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
NewCmdExec is a wrapper for the Kubernetes cli exec command
func NewCmdExport ¶
func NewCmdExpose ¶
NewCmdExpose is a wrapper for the Kubernetes cli expose command
func NewCmdImportImage ¶
NewCmdImportImage implements the OpenShift cli import-image command.
func NewCmdLabel ¶
NewCmdLabel is a wrapper for the Kubernetes cli label command
func NewCmdLogin ¶
func NewCmdLogin(fullName string, f *osclientcmd.Factory, reader io.Reader, out io.Writer) *cobra.Command
NewCmdLogin implements the OpenShift cli login command
func NewCmdLogout ¶
func NewCmdLogout(name, fullName, oscLoginFullCommand string, f *osclientcmd.Factory, reader io.Reader, out io.Writer) *cobra.Command
NewCmdLogout implements the OpenShift cli logout command
func NewCmdLogs ¶
NewCmdLogs is a wrapper for the Kubernetes cli logs command
func NewCmdNewApplication ¶
NewCmdNewApplication implements the OpenShift cli new-app command
func NewCmdNewBuild ¶
NewCmdNewBuild implements the OpenShift cli new-build command
func NewCmdOptions ¶
NewCmdOptions implements the OpenShift cli options command
func NewCmdPatch ¶ added in v1.0.2
NewCmdPatch is a wrapper for the Kubernetes cli patch command
func NewCmdPortForward ¶
NewCmdPortForward is a wrapper for the Kubernetes cli port-forward command
func NewCmdProcess ¶
NewCmdProcess implements the OpenShift cli process command
func NewCmdProject ¶
NewCmdProject implements the OpenShift cli rollback command
func NewCmdProxy ¶
NewCmdProxy is a wrapper for the Kubernetes cli proxy command
func NewCmdReplace ¶ added in v1.0.2
NewCmdReplace is a wrapper for the Kubernetes cli replace command
func NewCmdRequestProject ¶
func NewCmdRollback ¶
NewCmdRollback creates a CLI rollback command.
func NewCmdScale ¶
NewCmdScale is a wrapper for the Kubernetes cli scale command
func NewCmdStartBuild ¶
NewCmdStartBuild implements the OpenShift cli start-build command
func NewCmdStatus ¶
NewCmdStatus implements the OpenShift cli status command
func NewCmdStop ¶
NewCmdStop is a wrapper for the Kubernetes cli stop command
func NewCmdTypes ¶
func NewCmdVolume ¶
func NewCmdWhoAmI ¶
func RunBuildLogs ¶
func RunBuildLogs(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, opts api.BuildLogOptions, args []string) error
RunBuildLogs contains all the necessary functionality for the OpenShift cli build-logs command
func RunCancelBuild ¶
RunCancelBuild contains all the necessary functionality for the OpenShift cli cancel-build command
func RunEdit ¶
func RunEdit(fullName string, f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames util.StringList) error
RunEdit contains all the necessary functionality for the OpenShift cli edit command
func RunEnv ¶
func RunEnv(f *clientcmd.Factory, in io.Reader, out io.Writer, cmd *cobra.Command, args []string, envParams, filenames kutil.StringList) error
RunEnv contains all the necessary functionality for the OpenShift cli env command
func RunImportImage ¶
RunImportImage contains all the necessary functionality for the OpenShift cli import-image command.
func RunListBuildWebHooks ¶
func RunListBuildWebHooks(f *clientcmd.Factory, out, errOut io.Writer, name string, isBuild bool, webhookFilter string) error
RunListBuildWebHooks prints the webhooks for the provided build config.
func RunLogin ¶
func RunLogin(cmd *cobra.Command, options *LoginOptions) error
RunLogin contains all the necessary functionality for the OpenShift cli login command
func RunNewApplication ¶
func RunNewApplication(fullName string, f *clientcmd.Factory, out io.Writer, c *cobra.Command, args []string, config *newcmd.AppConfig) error
RunNewApplication contains all the necessary functionality for the OpenShift cli new-app command
func RunNewBuild ¶
func RunNewBuild(fullName string, f *clientcmd.Factory, out io.Writer, c *cobra.Command, args []string, config *newcmd.AppConfig) error
RunNewBuild contains all the necessary functionality for the OpenShift cli new-build command
func RunProcess ¶
RunProject contains all the necessary functionality for the OpenShift cli process command
func RunStartBuild ¶
func RunStartBuild(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string, webhooks util.StringFlag) error
RunStartBuild contains all the necessary functionality for the OpenShift cli start-build command
func RunStartBuildWebHook ¶
func RunStartBuildWebHook(f *clientcmd.Factory, out io.Writer, webhook string, path, postReceivePath string, repo git.Repository) error
RunStartBuildWebHook tries to trigger the provided webhook. It will attempt to utilize the current client configuration if the webhook has the same URL.
func RunStatus ¶
RunStatus contains all the necessary functionality for the OpenShift cli status command
Types ¶
type AddVolumeOptions ¶
type AddVolumeOptions struct { Type string MountPath string Overwrite bool Path string SecretName string ClaimName string Source string TypeChanged bool }
func (*AddVolumeOptions) Validate ¶
func (a *AddVolumeOptions) Validate(isAddOp bool) error
type DeployOptions ¶
type DeployOptions struct {
// contains filtered or unexported fields
}
func (DeployOptions) RunDeploy ¶
func (o DeployOptions) RunDeploy() error
func (DeployOptions) Validate ¶
func (o DeployOptions) Validate(args []string) error
type LoginOptions ¶
type LoginOptions struct { Server string CAFile string InsecureTLS bool APIVersion string // flags and printing helpers Username string Password string Project string // infra StartingKubeConfig *kclientcmdapi.Config DefaultNamespace string Config *kclient.Config Reader io.Reader Out io.Writer // cert data to be used when authenticating CertFile string KeyFile string Token string PathOptions *kcmdconfig.PathOptions }
LoginOptions is a helper for the login and setup process, gathers all information required for a successful login and eventual update of config files. Depending on the Reader present it can be interactive, asking for terminal input in case of any missing information. Notice that some methods mutate this object so it should not be reused. The Config provided as a pointer will also mutate (handle new auth tokens, etc).
func (*LoginOptions) Complete ¶
func (o *LoginOptions) Complete(f *osclientcmd.Factory, cmd *cobra.Command, args []string) error
func (*LoginOptions) GatherInfo ¶
func (o *LoginOptions) GatherInfo() error
Gather all required information in a comprehensive order.
func (*LoginOptions) SaveConfig ¶
func (o *LoginOptions) SaveConfig() (bool, error)
Save all the information present in this helper to a config file. An explicit config file path can be provided, if not use the established conventions about config loading rules. Will create a new config file if one can't be found at all. Will only succeed if all required info is present.
type LogoutOptions ¶
type LogoutOptions struct { StartingKubeConfig *kclientcmdapi.Config Config *kclient.Config Out io.Writer PathOptions *kcmdconfig.PathOptions }
func (*LogoutOptions) Complete ¶
func (o *LogoutOptions) Complete(f *osclientcmd.Factory, cmd *cobra.Command, args []string) error
func (LogoutOptions) RunLogout ¶
func (o LogoutOptions) RunLogout() error
func (LogoutOptions) Validate ¶
func (o LogoutOptions) Validate(args []string) error
type NewProjectOptions ¶
type NewProjectOptions struct { ProjectName string DisplayName string Description string Client client.Interface ProjectOptions *ProjectOptions Out io.Writer }
func (*NewProjectOptions) Run ¶
func (o *NewProjectOptions) Run() error
type ProjectOptions ¶
type ProjectOptions struct { Config clientcmdapi.Config Client *client.Client ClientConfig *kclient.Config Out io.Writer PathOptions *kubecmdconfig.PathOptions ProjectName string ProjectOnly bool }
func (ProjectOptions) RunProject ¶
func (o ProjectOptions) RunProject() error
RunProject contains all the necessary functionality for the OpenShift cli project command
func (ProjectOptions) Validate ¶
func (o ProjectOptions) Validate() error
type RollbackOptions ¶ added in v1.0.2
type RollbackOptions struct { Namespace string TargetName string DesiredVersion int Format string Template string DryRun bool IncludeTriggers bool IncludeStrategy bool IncludeScalingSettings bool // contains filtered or unexported fields }
RollbackOptions contains all the necessary state to perform a rollback.
func (*RollbackOptions) Complete ¶ added in v1.0.2
Complete turns a partially defined RollbackActions into a solvent structure which can be validated and used for a rollback.
func (*RollbackOptions) Run ¶ added in v1.0.2
func (o *RollbackOptions) Run() error
Run performs a rollback.
func (*RollbackOptions) Validate ¶ added in v1.0.2
func (o *RollbackOptions) Validate() error
Validate ensures that a RollbackOptions is valid and can be used to execute a rollback.
type VolumeOptions ¶
type VolumeOptions struct { DefaultNamespace string ExplicitNamespace bool Writer io.Writer Mapper meta.RESTMapper Typer runtime.ObjectTyper RESTClientFactory func(mapping *meta.RESTMapping) (resource.RESTClient, error) UpdatePodSpecForObject func(obj runtime.Object, fn func(*kapi.PodSpec) error) (bool, error) // Resource selection Selector string All bool Filenames kutil.StringList // Operations Add bool Remove bool List bool // Common optional params Name string Containers string Confirm bool Output string OutputVersion string // Add op params AddOpts *AddVolumeOptions }
func (*VolumeOptions) RunVolume ¶
func (v *VolumeOptions) RunVolume(args []string) error
func (*VolumeOptions) Validate ¶
func (v *VolumeOptions) Validate(args []string) error
type WhoAmIOptions ¶
type WhoAmIOptions struct { UserInterface osclient.UserInterface Out io.Writer }
Source Files ¶
- buildlogs.go
- cancelbuild.go
- config.go
- deploy.go
- edit.go
- env.go
- export.go
- exporter.go
- expose.go
- helper.go
- importimage.go
- login.go
- loginoptions.go
- logout.go
- newapp.go
- newbuild.go
- options.go
- process.go
- project.go
- request_project.go
- rollback.go
- startbuild.go
- status.go
- tag.go
- types.go
- volume.go
- whoami.go
- wrappers.go