local

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserLauncher

type BrowserLauncher func(url string) error

BrowserLauncher primarily for testing purposes.

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command is the local command, responsible for installing, uninstalling, or other local actions.

func New

func New(provider k8s.Provider, portHTTP int, opts ...Option) (*Command, error)

New creates a new Command

func (*Command) Install

func (c *Command) Install(ctx context.Context, user, pass string) error

Install handles the installation of Airbyte

func (*Command) Uninstall

func (c *Command) Uninstall(ctx context.Context) error

Uninstall handles the uninstallation of Airbyte.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

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 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 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

func WithK8sClient(client k8s.K8sClient) Option

WithK8sClient define the k8s client for this command.

func WithTelemetryClient

func WithTelemetryClient(client telemetry.Client) Option

WithTelemetryClient define the telemetry client for this command.

func WithUserHome added in v0.2.0

func WithUserHome(home string) Option

WithUserHome define the user's home directory.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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