Documentation ¶
Index ¶
- func AddCommandGroups(cmd *cobra.Command, groups cliutil.CommandGroups)
- func AddPreviewDomain(ctx context.Context, reporter *scout.Reporter, ...) (*manager.InterceptInfo, error)
- func AddPreviewFlags(prefix string, flags *pflag.FlagSet, spec *manager.PreviewSpec)
- func ClusterIdCommand() *cobra.Command
- func Command(ctx context.Context) *cobra.Command
- func DescribeIntercepts(iis []*manager.InterceptInfo, volumeMountsPrevented error, debug bool) string
- func InterceptError(r *connector.InterceptResult) error
- func LicenseCommand() *cobra.Command
- func LoginCommand() *cobra.Command
- func LogoutCommand() *cobra.Command
- func OnlySubcommands(cmd *cobra.Command, args []string) error
- func PerhapsLegacyCommands(cmd *cobra.Command, args []string) error
- func RunSubcommands(cmd *cobra.Command, args []string) error
- type UpdateChecker
- type UpdateInterceptFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandGroups ¶
func AddCommandGroups(cmd *cobra.Command, groups cliutil.CommandGroups)
AddCommandGroups adds all the groups in the given CommandGroups to the command, replaces the its standard usage template with a template that groups the commands according to that group.
func AddPreviewDomain ¶ added in v2.7.0
func AddPreviewDomain(ctx context.Context, reporter *scout.Reporter, updateInterceptFn UpdateInterceptFn, sess *manager.SessionInfo, iceptName string, previewSpec *manager.PreviewSpec) (*manager.InterceptInfo, error)
func AddPreviewFlags ¶ added in v2.7.0
func AddPreviewFlags(prefix string, flags *pflag.FlagSet, spec *manager.PreviewSpec)
AddPreviewFlags mutates 'flags', adding flags to it such that the flags set the appropriate fields in the given 'spec'. If 'prefix' is given, long-flag names are prefixed with it.
func ClusterIdCommand ¶ added in v2.2.0
ClusterIdCommand is a simple command that makes it easier for users to figure out what their cluster ID is. For now this is just used when people are making licenses for air-gapped environments
func DescribeIntercepts ¶ added in v2.6.0
func DescribeIntercepts(iis []*manager.InterceptInfo, volumeMountsPrevented error, debug bool) string
func InterceptError ¶ added in v2.7.0
func InterceptError(r *connector.InterceptResult) error
InterceptError inspects the .Error and .ErrorText fields in an InterceptResult and returns an appropriate error object, or nil if the InterceptResult doesn't represent an error.
func LicenseCommand ¶ added in v2.2.0
func LoginCommand ¶ added in v2.1.4
func LogoutCommand ¶ added in v2.1.4
func OnlySubcommands ¶
OnlySubcommands is a cobra.PositionalArgs that is similar to cobra.NoArgs, but prints a better error message.
func PerhapsLegacyCommands ¶ added in v2.4.0
PerhapsLegacyCommands is like OnlySubcommands but performs some initial check for legacy flags
func RunSubcommands ¶
RunSubcommands is for use as a cobra.Command.RunE for commands that don't do anything themselves but have subcommands. In such cases, it is important to set RunE even though there's nothing to run, because otherwise cobra will treat that as "success", and it shouldn't be "success" if the user typos a command and types something invalid.
Types ¶
type UpdateChecker ¶ added in v2.5.0
type UpdateChecker struct { NextCheck map[string]time.Time `json:"next_check"` // contains filtered or unexported fields }
func NewUpdateChecker ¶ added in v2.5.0
func NewUpdateChecker(ctx context.Context, url string) (*UpdateChecker, error)
newUpdateChecker returns a new update checker, possibly initialized from the users cache.
func (*UpdateChecker) StoreNextCheck ¶ added in v2.5.0
func (*UpdateChecker) UpdateAvailable ¶ added in v2.5.0
type UpdateInterceptFn ¶ added in v2.7.0
type UpdateInterceptFn func(context.Context, *manager.UpdateInterceptRequest) (*manager.InterceptInfo, error)
Source Files ¶
- cloud_messages.go
- cmd.go
- cmd_diag_vpn.go
- cmd_gatherlogs.go
- cmd_license.go
- cmd_list.go
- cmd_loglevel.go
- cmd_preview.go
- cmd_status.go
- cmd_uninstall.go
- cmd_version.go
- cmds_auth.go
- cmds_genyaml.go
- cmds_intercept.go
- cmds_misc.go
- command_group.go
- command_remote.go
- legacy_command.go
- prepare_mount_unix.go
- update_check.go
- util.go
Directories ¶
Path | Synopsis |
---|---|
Package output provides structured output for *cobra.Command.
|
Package output provides structured output for *cobra.Command. |