{"modulePath":"github.com/kcp-dev/cli","version":"v0.34.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package plugin\n\n## Types\n\n```go\ntype CreateContextOptions struct {\n\t*base.Options\n\n\t// Name is the name of the context to create.\n\tName string\n\t// Overwrite indicates the context should be updated if it already exists. This is required to perform the update.\n\tOverwrite bool\n\n\t// KeepCurrent indicates whether to keep the current context. When creating a new context, if KeepCurrent is true, the current context will be preserved.\n\tKeepCurrent bool\n\n\t// ClusterURL is the URL of the cluster to use for the new context.\n\t// If empty, the current context's cluster will be used.\n\tClusterURL string\n\t// contains filtered or unexported fields\n}\n```\nCreateContextOptions contains options for creating or updating a kubeconfig context.\n\n```go\nfunc NewCreateContextOptions(streams genericclioptions.IOStreams) *CreateContextOptions\n```\nNewCreateContextOptions returns a new CreateContextOptions.\n\n```go\nfunc (o *CreateContextOptions) BindFlags(cmd *cobra.Command)\n```\nBindFlags binds fields to cmd's flagset.\n\n```go\nfunc (o *CreateContextOptions) Complete(args []string) error\n```\nComplete ensures all dynamically populated fields are initialized.\n\n```go\nfunc (o *CreateContextOptions) Run(ctx context.Context) error\n```\nRun creates or updates a kubeconfig context from the current context.\n\n```go\nfunc (o *CreateContextOptions) Validate() error\n```\nValidate validates the CreateContextOptions are complete and usable.\n\n```go\ntype CreateWorkspaceOptions struct {\n\t*base.Options\n\n\t// Name is the name of the workspace to create.\n\tName string\n\t// Type is the type of the workspace to create.\n\tType string\n\t// EnterAfterCreate enters the newly created workspace if true.\n\tEnterAfterCreate bool\n\t// IgnoreExisting ignores errors if the workspace already exists.\n\tIgnoreExisting bool\n\t// ReadyWaitTimeout is how long to wait for the workspace to be ready before returning control to the user.\n\tReadyWaitTimeout time.Duration\n\t// LocationSelector is the location selector to use when creating the workspace to select a matching shard.\n\tLocationSelector string\n\n\t// CreateContextName is the name of the context to create after workspace creation (if set).\n\tCreateContextName string\n\t// contains filtered or unexported fields\n}\n```\nCreateWorkspaceOptions contains options for creating a new workspace.\n\n```go\nfunc NewCreateWorkspaceOptions(streams genericclioptions.IOStreams) *CreateWorkspaceOptions\n```\nNewCreateWorkspaceOptions returns a new CreateWorkspaceOptions.\n\n```go\nfunc (o *CreateWorkspaceOptions) BindFlags(cmd *cobra.Command)\n```\nBindFlags binds fields to cmd's flagset.\n\n```go\nfunc (o *CreateWorkspaceOptions) Complete(args []string) error\n```\nComplete ensures all dynamically populated fields are initialized.\n\n```go\nfunc (o *CreateWorkspaceOptions) Run(ctx context.Context) error\n```\nRun creates a workspace.\n\n```go\nfunc (o *CreateWorkspaceOptions) Validate() error\n```\nValidate validates the CreateWorkspaceOptions are complete and usable.\n\n```go\ntype CurrentWorkspaceOptions struct {\n\t*base.Options\n\n\t// ShortWorkspaceOutput indicates only the workspace name should be printed.\n\tShortWorkspaceOutput bool\n}\n```\nCurrentWorkspaceOptions contains options for displaying the current workspace.\n\n```go\nfunc NewCurrentWorkspaceOptions(streams genericclioptions.IOStreams) *CurrentWorkspaceOptions\n```\nNewCurrentWorkspaceOptions returns a new CurrentWorkspaceOptions.\n\n```go\nfunc (o *CurrentWorkspaceOptions) BindFlags(cmd *cobra.Command)\n```\nBindFlags binds fields to cmd's flagset.\n\n```go\nfunc (o *CurrentWorkspaceOptions) Run(ctx context.Context) error\n```\nRun outputs the current workspace.\n\n```go\ntype TreeOptions struct {\n\t*base.Options\n\n\tFull        bool\n\tInteractive bool\n\tWide        bool\n\tWatch       bool\n\t// contains filtered or unexported fields\n}\n```\nTreeOptions contains options for displaying the workspace tree.\n\n```go\nfunc NewTreeOptions(streams genericclioptions.IOStreams) *TreeOptions\n```\nNewTreeOptions returns a new TreeOptions.\n\n```go\nfunc (o *TreeOptions) BindFlags(cmd *cobra.Command)\n```\nBindFlags binds fields to cmd's flagset.\n\n```go\nfunc (o *TreeOptions) Complete() error\n```\nComplete ensures all dynamically populated fields are initialized.\n\n```go\nfunc (o *TreeOptions) Run(ctx context.Context) error\n```\nRun outputs the current workspace.\n\n```go\nfunc (o *TreeOptions) Validate() error\n```\nValidate validates the TreeOptions.\n\n```go\ntype UseWorkspaceOptions struct {\n\t*base.Options\n\n\t// Name is the name of the workspace to switch to.\n\tName string\n\t// ShortWorkspaceOutput indicates only the workspace name should be printed.\n\tShortWorkspaceOutput bool\n\t// contains filtered or unexported fields\n}\n```\nUseWorkspaceOptions contains options for manipulating or showing the current workspace.\n\n```go\nfunc NewUseWorkspaceOptions(streams genericclioptions.IOStreams) *UseWorkspaceOptions\n```\nNewUseWorkspaceOptions returns a new UseWorkspaceOptions.\n\n```go\nfunc (o *UseWorkspaceOptions) BindFlags(cmd *cobra.Command)\n```\nBindFlags binds fields to cmd's flagset.\n\n```go\nfunc (o *UseWorkspaceOptions) Complete(args []string) error\n```\nComplete ensures all dynamically populated fields are initialized.\n\n```go\nfunc (o *UseWorkspaceOptions) Run(ctx context.Context) (err error)\n```\nRun executes the \"use workspace\" logic based on the supplied options.\n\n```go\nfunc (o *UseWorkspaceOptions) Validate() error\n```\nValidate validates the UseWorkspaceOptions are complete and usable.\n\n","path":"github.com/kcp-dev/cli/pkg/workspace/plugin","name":"plugin","synopsis":"","isRedistributable":true}
