Documentation
¶
Index ¶
- Constants
- func Command() *cobra.Command
- func CommandDelete() *cobra.Command
- func CommandGet() *cobra.Command
- func CommandList() *cobra.Command
- func CommandRename() *cobra.Command
- func ExecuteCtxDelete(cp common.CP, ctxName string, chattyStatus bool, options ...DeleteOption) error
- func ExecuteCtxGet(cp common.CP)
- func ExecuteCtxList(cp common.CP)
- func ExecuteCtxRename(cp common.CP, ctxName string, newCtxName string, toSwitch bool) error
- type BasicTable
- type BasicTableRow
- type CPCtx
- type DeleteOption
- type DeleteOptions
- type Printer
Constants ¶
View Source
const ( OverwriteExistingContextFlag = "overwrite-existing-context" SetCurrentForHostingFlag = "set-current-for-hosting" )
View Source
const (
SwitchCtxFlag = "switch"
)
Variables ¶
This section is empty.
Functions ¶
func CommandDelete ¶ added in v0.8.8
func CommandGet ¶ added in v0.8.6
func CommandList ¶ added in v0.8.6
func ExecuteCtxDelete ¶ added in v0.8.8
func ExecuteCtxDelete(cp common.CP, ctxName string, chattyStatus bool, options ...DeleteOption) error
Execute kflex ctx delete
func ExecuteCtxGet ¶ added in v0.8.6
func ExecuteCtxList ¶ added in v0.8.6
Types ¶
type BasicTable ¶ added in v0.9.1
type BasicTable struct {
Rows []BasicTableRow
}
BasicTable implements Printer and fmt.Stringer for table output.
func NewBasicTablePrinter ¶ added in v0.9.1
func NewBasicTablePrinter(config *api.Config, currentContext string) BasicTable
NewBasicTablePrinter constructs a BasicTable from kubeconfig and current context.
func (BasicTable) Content ¶ added in v0.9.1
func (b BasicTable) Content() string
Content returns the formatted table rows for BasicTable.
func (BasicTable) Header ¶ added in v0.9.1
func (b BasicTable) Header() string
Header returns the table header for BasicTable.
func (BasicTable) String ¶ added in v0.9.1
func (b BasicTable) String() string
type BasicTableRow ¶ added in v0.9.1
BasicTableRow represents a row in the context list table.
type CPCtx ¶
type CPCtx struct {
common.CP
Type tenancyv1alpha1.ControlPlaneType
// contains filtered or unexported fields
}
func (*CPCtx) ExecuteCtx ¶ added in v0.8.6
func (cpCtx *CPCtx) ExecuteCtx(chattyStatus, failIfNone, overwriteExistingCtx, setCurrentCtxAsHosting bool) error
Context switch context in Kubeconfig
type DeleteOption ¶ added in v0.9.1
type DeleteOption func(*DeleteOptions)
func WithForce ¶ added in v0.9.1
func WithForce() DeleteOption
WithForce sets the force option to bypass confirmation
type DeleteOptions ¶ added in v0.9.1
type DeleteOptions struct {
Force bool
}
Click to show internal directories.
Click to hide internal directories.