Documentation
¶
Overview ¶
Example (View) ¶
expectedConfig := newRedFederalCowHammerConfig() test := configCommandTest{ args: []string{"view"}, startingConfig: newRedFederalCowHammerConfig(), expectedConfig: expectedConfig, } output := test.run(nil) fmt.Printf("%v", output)
Output: apiVersion: v1 clusters: - cluster: server: http://cow.org:8080 name: cow-cluster contexts: - context: cluster: cow-cluster user: red-user name: federal-context current-context: federal-context kind: Config preferences: {} users: - name: red-user user: token: red-token
Index ¶
- func NewCmdConfig(pathOptions *clientcmd.PathOptions, out io.Writer) *cobra.Command
- func NewCmdConfigCurrentContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSet(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSetAuthInfo(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSetCluster(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSetContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigUnset(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigUseContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigView(out io.Writer, ConfigAccess clientcmd.ConfigAccess) *cobra.Command
- func RunCurrentContext(out io.Writer, args []string, options *CurrentContextOptions) error
- type CurrentContextOptions
- type ViewOptions
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdConfig ¶
func NewCmdConfigCurrentContext ¶ added in v1.2.0
func NewCmdConfigSet ¶
func NewCmdConfigSetAuthInfo ¶
func NewCmdConfigSetCluster ¶
func NewCmdConfigSetContext ¶
func NewCmdConfigUnset ¶
func NewCmdConfigUseContext ¶
func NewCmdConfigView ¶
func RunCurrentContext ¶ added in v1.2.0
func RunCurrentContext(out io.Writer, args []string, options *CurrentContextOptions) error
Types ¶
type CurrentContextOptions ¶ added in v1.2.0
type CurrentContextOptions struct {
ConfigAccess clientcmd.ConfigAccess
}
type ViewOptions ¶ added in v0.16.1
type ViewOptions struct { ConfigAccess clientcmd.ConfigAccess Merge flag.Tristate Flatten bool Minify bool RawByteData bool }
func (*ViewOptions) Complete ¶ added in v0.16.1
func (o *ViewOptions) Complete() bool
func (ViewOptions) Run ¶ added in v0.16.1
func (o ViewOptions) Run(out io.Writer, printer kubectl.ResourcePrinter) error
func (ViewOptions) Validate ¶ added in v0.16.1
func (o ViewOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.