context

package
v0.0.0-...-4e12832 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfigCommandContext

type ClusterConfigCommandContext struct {
	CommandContext
	Files             assets.FS
	ClusterConfig     configuration.ClusterConfig
	ClusterConfigName string
}

ClusterConfigCommandContext the context of the admin command to run

func NewClusterConfigCommandContext

func NewClusterConfigCommandContext(term ioutils.Terminal, cfg configuration.ClusterConfig, newClient NewClientFunc, files assets.FS, clusterConfigName string) *ClusterConfigCommandContext

NewClusterConfigCommandContext returns the context of the admin command to run

func (*ClusterConfigCommandContext) GetFileContent

func (ctx *ClusterConfigCommandContext) GetFileContent(path ...string) ([]byte, error)

type CommandContext

type CommandContext struct {
	context.Context
	ioutils.Terminal
	NewClient NewClientFunc
}

CommandContext the context of the (standard) command to run

func NewCommandContext

func NewCommandContext(term ioutils.Terminal, newClient NewClientFunc) *CommandContext

NewCommandContext returns the context of the command to run

type NewClientFunc

type NewClientFunc func(string, string) (runtimeclient.Client, error)

NewClientFunc a function to create a `client.Client` with the given token and API endpoint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL