Documentation
¶
Index ¶
- Variables
- type BrowserLauncher
- type Command
- type DockerClient
- type HTTPClient
- type HelmClient
- type K8sClient
- type Option
- func WithBrowserLauncher(launcher BrowserLauncher) Option
- func WithDockerClient(client DockerClient) Option
- func WithHTTPClient(client HTTPClient) Option
- func WithHelmClient(client HelmClient) Option
- func WithK8sClient(client K8sClient) Option
- func WithTelemetryClient(client telemetry.Client) Option
Constants ¶
This section is empty.
Variables ¶
var ErrDocker = errors.New("error communicating with docker")
ErrDocker is returned anytime an error specific to docker occurs.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is the local command, responsible for installing, uninstalling, or other local actions.
type DockerClient ¶
DockerClient primarily for testing purposes
type HelmClient ¶
type HelmClient interface {
AddOrUpdateChartRepo(entry repo.Entry) error
GetChart(string, *action.ChartPathOptions) (*chart.Chart, string, error)
GetRelease(name string) (*release.Release, error)
InstallOrUpgradeChart(ctx context.Context, spec *helmclient.ChartSpec, opts *helmclient.GenericHelmOptions) (*release.Release, error)
UninstallReleaseByName(string) error
}
HelmClient primarily for testing purposes
type K8sClient ¶
type K8sClient interface {
// CreateIngress creates an ingress in the given namespace
CreateIngress(ctx context.Context, namespace string, ingress *networkingv1.Ingress) error
// ExistsIngress returns true if the ingress exists in the namespace, false otherwise.
ExistsIngress(ctx context.Context, namespace string, ingress string) bool
// UpdateIngress updates an existing ingress in the given namespace
UpdateIngress(ctx context.Context, namespace string, ingress *networkingv1.Ingress) error
// ExistsNamespace returns true if the namespace exists, false otherwise
ExistsNamespace(ctx context.Context, namespace string) bool
// DeleteNamespace deletes the existing namespace
DeleteNamespace(ctx context.Context, namespace string) error
// CreateOrUpdateSecret will update or create the secret name with the payload of data in the specified namespace
CreateOrUpdateSecret(ctx context.Context, namespace, name string, data map[string][]byte) error
// GetServerVersion returns the k8s version.
GetServerVersion() (string, error)
}
K8sClient primarily for testing purposes
type Option ¶
type Option func(*Command)
Option for configuring the Command, primarily exists for testing
func WithBrowserLauncher ¶
func WithBrowserLauncher(launcher BrowserLauncher) Option
WithBrowserLauncher define the browser launcher for this command.
func WithDockerClient ¶
func WithDockerClient(client DockerClient) Option
WithDockerClient define the docker client for this command.
func WithHTTPClient ¶
func WithHTTPClient(client HTTPClient) Option
WithHTTPClient define the http client for this command.
func WithHelmClient ¶
func WithHelmClient(client HelmClient) Option
WithHelmClient define the helm client for this command.
func WithK8sClient ¶
WithK8sClient define the k8s client for this command.
func WithTelemetryClient ¶
WithTelemetryClient define the telemetry client for this command.