Documentation ¶
Index ¶
- Constants
- func AddComponentFlag(cmd *cobra.Command)
- func NewCmdComponent(name, fullName string) *cobra.Command
- func NewCmdCreate(name, fullName string) *cobra.Command
- func NewCmdDelete(name, fullName string) *cobra.Command
- func NewCmdDescribe(name, fullName string) *cobra.Command
- func NewCmdGet(name, fullName string) *cobra.Command
- func NewCmdLink(name, fullName string) *cobra.Command
- func NewCmdList(name, fullName string) *cobra.Command
- func NewCmdLog(name, fullName string) *cobra.Command
- func NewCmdPush(name, fullName string) *cobra.Command
- func NewCmdPushDevfile(name, fullName string) *cobra.Command
- func NewCmdUnlink(name, fullName string) *cobra.Command
- func NewCmdUpdate(name, fullName string) *cobra.Command
- func NewCmdWatch(name, fullName string) *cobra.Command
- type CommonPushOptions
- func (cpo *CommonPushOptions) AddContextFlag(cmd *cobra.Command)
- func (cpo *CommonPushOptions) InitConfigFromContext() error
- func (cpo *CommonPushOptions) Push() (err error)
- func (cpo *CommonPushOptions) ResolveProject(prjName string) (err error)
- func (cpo *CommonPushOptions) ResolveSrcAndConfigFlags()
- func (cpo *CommonPushOptions) SetSourceInfo() (err error)
- func (cpo *CommonPushOptions) ValidateComponentCreate() error
- type ComponentOptions
- type CreateOptions
- type DeleteOptions
- type DescribeOptions
- type GetOptions
- type LinkOptions
- type ListOptions
- type LogOptions
- type PushDevfileOptions
- type PushOptions
- type UnlinkOptions
- type UpdateOptions
- type WatchOptions
Constants ¶
const CreateRecommendedCommandName = "create"
CreateRecommendedCommandName is the recommended watch command name
const DeleteRecommendedCommandName = "delete"
DeleteRecommendedCommandName is the recommended delete command name
const DescribeRecommendedCommandName = "describe"
DescribeRecommendedCommandName is the recommended describe command name
const GetRecommendedCommandName = "get"
GetRecommendedCommandName is the recommended get command name
const LinkRecommendedCommandName = "link"
LinkRecommendedCommandName is the recommended link command name
const ListRecommendedCommandName = "list"
ListRecommendedCommandName is the recommended watch command name
const LocalDirectoryDefaultLocation = "./"
LocalDirectoryDefaultLocation is the default location of where --local files should always be.. since the application will always be in the same directory as `.odo`, we will always set this as: ./
const LogRecommendedCommandName = "log"
LogRecommendedCommandName is the recommended watch command name
const PushDevfileRecommendedCommandName = "push-devfile"
const PushRecommendedCommandName = "push"
PushRecommendedCommandName is the recommended push command name
const RecommendedCommandName = "component"
RecommendedComponentCommandName is the recommended component command name
const UnlinkRecommendedCommandName = "unlink"
UnlinkRecommendedCommandName is the recommended unlink command name
const UpdateRecommendedCommandName = "update"
UpdateRecommendedCommandName is the recommended update command name
const WatchRecommendedCommandName = "watch"
WatchRecommendedCommandName is the recommended watch command name
Variables ¶
This section is empty.
Functions ¶
func AddComponentFlag ¶
AddComponentFlag adds a `component` flag to the given cobra command Also adds a completion handler to the flag
func NewCmdComponent ¶
NewCmdComponent implements the component odo command
func NewCmdCreate ¶
NewCmdCreate implements the create odo command
func NewCmdDelete ¶
NewCmdDelete implements the delete odo command
func NewCmdDescribe ¶
NewCmdDescribe implements the describe odo command
func NewCmdLink ¶
NewCmdLink implements the link odo command
func NewCmdList ¶
NewCmdList implements the list odo command
func NewCmdPush ¶
NewCmdPush implements the push odo command
func NewCmdPushDevfile ¶
NewCmdPushDevfile implements odo push-devfile command
func NewCmdUnlink ¶
NewCmdUnlink implements the link odo command
func NewCmdUpdate ¶
NewCmdUpdate implements the Update odo command
func NewCmdWatch ¶
NewCmdWatch implements the watch odo command
Types ¶
type CommonPushOptions ¶
type CommonPushOptions struct { LocalConfigInfo *config.LocalConfigInfo *genericclioptions.Context // contains filtered or unexported fields }
CommonPushOptions has data needed for all pushes
func NewCommonPushOptions ¶
func NewCommonPushOptions() *CommonPushOptions
NewCommonPushOptions instantiates a commonPushOptions object
func (*CommonPushOptions) AddContextFlag ¶
func (cpo *CommonPushOptions) AddContextFlag(cmd *cobra.Command)
AddContextFlag adds the context flag to specified command storing value of flag in options.componentContext
func (*CommonPushOptions) InitConfigFromContext ¶
func (cpo *CommonPushOptions) InitConfigFromContext() error
InitConfigFromContext initializes localconfiginfo from the context
func (*CommonPushOptions) Push ¶
func (cpo *CommonPushOptions) Push() (err error)
Push pushes changes as per set options
func (*CommonPushOptions) ResolveProject ¶
func (cpo *CommonPushOptions) ResolveProject(prjName string) (err error)
ResolveProject completes the push options as needed
func (*CommonPushOptions) ResolveSrcAndConfigFlags ¶
func (cpo *CommonPushOptions) ResolveSrcAndConfigFlags()
ResolveSrcAndConfigFlags sets all pushes if none is asked
func (*CommonPushOptions) SetSourceInfo ¶
func (cpo *CommonPushOptions) SetSourceInfo() (err error)
SetSourceInfo sets up source information
func (*CommonPushOptions) ValidateComponentCreate ¶
func (cpo *CommonPushOptions) ValidateComponentCreate() error
ValidateComponentCreate validates if the request to create component is valid
type ComponentOptions ¶
type ComponentOptions struct { *genericclioptions.Context // contains filtered or unexported fields }
ComponentOptions encapsulates basic component options
type CreateOptions ¶
type CreateOptions struct { *CommonPushOptions // contains filtered or unexported fields }
CreateOptions encapsulates create options
func NewCreateOptions ¶
func NewCreateOptions() *CreateOptions
NewCreateOptions returns new instance of CreateOptions
func (*CreateOptions) Run ¶
func (co *CreateOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*CreateOptions) Validate ¶
func (co *CreateOptions) Validate() (err error)
Validate validates the create parameters
type DeleteOptions ¶
type DeleteOptions struct { *ComponentOptions // contains filtered or unexported fields }
DeleteOptions is a container to attach complete, validate and run pattern
func NewDeleteOptions ¶
func NewDeleteOptions() *DeleteOptions
NewDeleteOptions returns new instance of DeleteOptions
func (*DeleteOptions) Run ¶
func (do *DeleteOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*DeleteOptions) Validate ¶
func (do *DeleteOptions) Validate() (err error)
Validate validates the list parameters
type DescribeOptions ¶
type DescribeOptions struct { *ComponentOptions // contains filtered or unexported fields }
DescribeOptions is a dummy container to attach complete, validate and run pattern
func NewDescribeOptions ¶
func NewDescribeOptions() *DescribeOptions
NewDescribeOptions returns new instance of ListOptions
func (*DescribeOptions) Run ¶
func (do *DescribeOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*DescribeOptions) Validate ¶
func (do *DescribeOptions) Validate() (err error)
Validate validates the describe parameters
type GetOptions ¶
type GetOptions struct { *genericclioptions.Context // contains filtered or unexported fields }
GetOptions encapsulates component get options
func NewGetOptions ¶
func NewGetOptions() *GetOptions
NewGetOptions returns new instance of GetOptions
func (*GetOptions) Run ¶
func (gto *GetOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*GetOptions) Validate ¶
func (gto *GetOptions) Validate() (err error)
Validate validates the get parameters
type LinkOptions ¶
type LinkOptions struct {
// contains filtered or unexported fields
}
LinkOptions encapsulates the options for the odo link command
func NewLinkOptions ¶
func NewLinkOptions() *LinkOptions
NewLinkOptions creates a new LinkOptions instance
func (*LinkOptions) Run ¶
func (o *LinkOptions) Run() (err error)
Run contains the logic for the odo link command
func (*LinkOptions) Validate ¶
func (o *LinkOptions) Validate() (err error)
Validate validates the LinkOptions based on completed values
type ListOptions ¶
type ListOptions struct { *genericclioptions.Context // contains filtered or unexported fields }
ListOptions is a dummy container to attach complete, validate and run pattern
func NewListOptions ¶
func NewListOptions() *ListOptions
NewListOptions returns new instance of ListOptions
func (*ListOptions) Run ¶
func (lo *ListOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*ListOptions) Validate ¶
func (lo *ListOptions) Validate() (err error)
Validate validates the list parameters
type LogOptions ¶
type LogOptions struct { *ComponentOptions // contains filtered or unexported fields }
LogOptions contains log options
func NewLogOptions ¶
func NewLogOptions() *LogOptions
NewLogOptions returns new instance of LogOptions
func (*LogOptions) Run ¶
func (lo *LogOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*LogOptions) Validate ¶
func (lo *LogOptions) Validate() (err error)
Validate validates the log parameters
type PushDevfileOptions ¶
type PushDevfileOptions struct { *genericclioptions.Context // contains filtered or unexported fields }
PushDevfileOptions encapsulates odo component push-devfile options
func NewPushDevfileOptions ¶
func NewPushDevfileOptions() *PushDevfileOptions
NewPushDevfileOptions returns new instance of PushDevfileOptions
func (*PushDevfileOptions) Run ¶
func (pdo *PushDevfileOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*PushDevfileOptions) Validate ¶
func (pdo *PushDevfileOptions) Validate() (err error)
Validate validates the parameters
type PushOptions ¶
type PushOptions struct {
*CommonPushOptions
}
PushOptions encapsulates options that push command uses
func NewPushOptions ¶
func NewPushOptions() *PushOptions
NewPushOptions returns new instance of PushOptions with "default" values for certain values, for example, show is "false"
func (*PushOptions) Run ¶
func (po *PushOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*PushOptions) Validate ¶
func (po *PushOptions) Validate() (err error)
Validate validates the push parameters
type UnlinkOptions ¶
type UnlinkOptions struct {
// contains filtered or unexported fields
}
UnlinkOptions encapsulates the options for the odo link command
func NewUnlinkOptions ¶
func NewUnlinkOptions() *UnlinkOptions
NewUnlinkOptions creates a new UnlinkOptions instance
func (*UnlinkOptions) Run ¶
func (o *UnlinkOptions) Run() (err error)
Run contains the logic for the odo link command
func (*UnlinkOptions) Validate ¶
func (o *UnlinkOptions) Validate() (err error)
Validate validates the UnlinkOptions based on completed values
type UpdateOptions ¶
type UpdateOptions struct { *CommonPushOptions // contains filtered or unexported fields }
UpdateOptions encapsulates the update command options
func NewUpdateOptions ¶
func NewUpdateOptions() *UpdateOptions
NewUpdateOptions returns new instance of UpdateOptions
func (*UpdateOptions) Run ¶
func (uo *UpdateOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*UpdateOptions) Validate ¶
func (uo *UpdateOptions) Validate() (err error)
Validate validates the update parameters
type WatchOptions ¶
type WatchOptions struct { *genericclioptions.Context // contains filtered or unexported fields }
WatchOptions contains attributes of the watch command
func NewWatchOptions ¶
func NewWatchOptions() *WatchOptions
NewWatchOptions returns new instance of WatchOptions
func (*WatchOptions) Run ¶
func (wo *WatchOptions) Run() (err error)
Run has the logic to perform the required actions as part of command
func (*WatchOptions) Validate ¶
func (wo *WatchOptions) Validate() (err error)
Validate validates the watch parameters