Documentation ¶
Index ¶
- func Execute(version string) int
- func GenDocs() error
- func NewAPITokenCmd(ec *ExecutionContext) *cobra.Command
- func NewCreateClusterCmd(ec *ExecutionContext) *cobra.Command
- func NewCreateCmd(ec *ExecutionContext) *cobra.Command
- func NewDeleteClusterCmd(ec *ExecutionContext) *cobra.Command
- func NewDeleteCmd(ec *ExecutionContext) *cobra.Command
- func NewFiltersHelpCmd(ec *ExecutionContext) *cobra.Command
- func NewGetClusterCmd(ec *ExecutionContext) *cobra.Command
- func NewGetClusterKubeConfigCmd(ec *ExecutionContext) *cobra.Command
- func NewGetClusterNodeCmd(ec *ExecutionContext) *cobra.Command
- func NewGetClusterNodesCmd(ec *ExecutionContext) *cobra.Command
- func NewGetClustersCmd(ec *ExecutionContext) *cobra.Command
- func NewGetCmd(ec *ExecutionContext) *cobra.Command
- func NewGetPartitionsCmd(ec *ExecutionContext) *cobra.Command
- func NewGetRegionsCmd(ec *ExecutionContext) *cobra.Command
- func NewGetResilienceZonesCmd(ec *ExecutionContext) *cobra.Command
- func NewLoginCmd(ec *ExecutionContext) *cobra.Command
- func NewLogoutCmd(ec *ExecutionContext) *cobra.Command
- func NewRootCmd(ec *ExecutionContext) *cobra.Command
- func NewUpdateClusterCmd(ec *ExecutionContext) *cobra.Command
- func NewUpdateCmd(ec *ExecutionContext) *cobra.Command
- type ExecutionContext
- func (ec *ExecutionContext) SetLogLevel()
- func (ec *ExecutionContext) SetupDefaultAPIClient(token string) (err error)
- func (ec *ExecutionContext) SetupDefaultAuthenticator()
- func (ec *ExecutionContext) SetupDefaultOIDCProvider()
- func (ec *ExecutionContext) SetupDefaultTokenCache() (err error)
- func (ec *ExecutionContext) Spin(t string)
- type ExecutionContextInput
- type InvalidArgumentError
- type OIDCConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPITokenCmd ¶ added in v0.5.3
func NewAPITokenCmd(ec *ExecutionContext) *cobra.Command
New creates a new api-token command
func NewCreateClusterCmd ¶
func NewCreateClusterCmd(ec *ExecutionContext) *cobra.Command
New creates a new "create cluster" command
func NewCreateCmd ¶
func NewCreateCmd(ec *ExecutionContext) *cobra.Command
New creates a new create command
func NewDeleteClusterCmd ¶
func NewDeleteClusterCmd(ec *ExecutionContext) *cobra.Command
New creates a new "delete cluster" command
func NewDeleteCmd ¶
func NewDeleteCmd(ec *ExecutionContext) *cobra.Command
New creates a new delete command
func NewFiltersHelpCmd ¶ added in v0.5.2
func NewFiltersHelpCmd(ec *ExecutionContext) *cobra.Command
New creates a new filters command
func NewGetClusterCmd ¶
func NewGetClusterCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get cluster" command
func NewGetClusterKubeConfigCmd ¶ added in v0.7.1
func NewGetClusterKubeConfigCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get cluster-kubeconfig" command
func NewGetClusterNodeCmd ¶ added in v0.6.2
func NewGetClusterNodeCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get cluster-node" command
func NewGetClusterNodesCmd ¶ added in v0.6.0
func NewGetClusterNodesCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get cluster-nodes" command
func NewGetClustersCmd ¶
func NewGetClustersCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get clusters" command
func NewGetPartitionsCmd ¶
func NewGetPartitionsCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get partitions" command
func NewGetRegionsCmd ¶
func NewGetRegionsCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get regions" command
func NewGetResilienceZonesCmd ¶
func NewGetResilienceZonesCmd(ec *ExecutionContext) *cobra.Command
New creates a new "get resilience-zones" command
func NewLoginCmd ¶
func NewLoginCmd(ec *ExecutionContext) *cobra.Command
New creates a new login command
func NewLogoutCmd ¶
func NewLogoutCmd(ec *ExecutionContext) *cobra.Command
New creates a new logout command
func NewRootCmd ¶
func NewRootCmd(ec *ExecutionContext) *cobra.Command
func NewUpdateClusterCmd ¶ added in v0.5.0
func NewUpdateClusterCmd(ec *ExecutionContext) *cobra.Command
New creates a new "update cluster" command
func NewUpdateCmd ¶ added in v0.5.0
func NewUpdateCmd(ec *ExecutionContext) *cobra.Command
New creates a new update command
Types ¶
type ExecutionContext ¶
type ExecutionContext struct {
Stdout, Stderr io.Writer
// Command is the current command
Command *cobra.Command
// Version is the CLI version
Version string
// Logger is the global logger object to print logs.
Logger logger.Logger
// Spinner is the global spinner object used to show progress across the cli
Spinner *ui.Spinner
// LogLevel is the log level used for the logger
LogLevel string
// APIServer is the inventory api server endpoint
APIServer string
// Interactive can be used to force interactive/non-interactive use
Interactive string
// IsTerminal indicates whether the current session is a terminal or not
IsTerminal bool
// OutputFormat is the format used for outputting data
OutputFormat string
// NoHeaders is used to control whether headers are printed
NoHeaders bool
// OIDC is the OIDC settings
OIDC OIDCConfig
// OIDC is the OIDC provider settings
OIDCProvider *oidc.Provider
// Authenticator is the Authenticator
Authenticator authentication.Authenticator
// TokenCache is the token cache
TokenCache tokencache.Cache
// APIClient is an inventory server api client
APIClient apiclient.ClientWithResponsesInterface
}
ExecutionContext holds configuration that can be used (and modified) across the application
func NewExecutionContext ¶
func NewExecutionContext(in ExecutionContextInput) *ExecutionContext
NewExecutionContext creates a new ExecutionContext
func (*ExecutionContext) SetLogLevel ¶
func (ec *ExecutionContext) SetLogLevel()
SetLogLevel sets the ec.Logger log level
func (*ExecutionContext) SetupDefaultAPIClient ¶
func (ec *ExecutionContext) SetupDefaultAPIClient(token string) (err error)
SetupDefaultAPIClient sets up ec.APIClient from flags if it's not already set
func (*ExecutionContext) SetupDefaultAuthenticator ¶
func (ec *ExecutionContext) SetupDefaultAuthenticator()
SetupDefaultAuthenticator sets up ec.Authenticator from flags if it's not already set It should be called from rootCmd.PersistentPreRunE
func (*ExecutionContext) SetupDefaultOIDCProvider ¶
func (ec *ExecutionContext) SetupDefaultOIDCProvider()
SetupDefaultOIDCProvider sets up ec.OIDCProvider from flags if it's not already set It should be called from rootCmd.PersistentPreRunE
func (*ExecutionContext) SetupDefaultTokenCache ¶
func (ec *ExecutionContext) SetupDefaultTokenCache() (err error)
SetupDefaultTokenCache sets up ec.TokenCache from flags if it's not already set It should be called from rootCmd.PersistentPreRunE
func (*ExecutionContext) Spin ¶
func (ec *ExecutionContext) Spin(t string)
Spin starts the spinnner and sets its text
type ExecutionContextInput ¶
Source Files ¶
- api_token.go
- cli.go
- create.go
- create_cluster.go
- delete.go
- delete_cluster.go
- filters.go
- gendoc.go
- get.go
- get_cluster.go
- get_cluster_kubeconfig.go
- get_cluster_node.go
- get_cluster_nodes.go
- get_clusters.go
- get_partitions.go
- get_regions.go
- get_resilience_zones.go
- login.go
- logout.go
- root.go
- update.go
- update_cluster.go
- validation.go