local

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use: "local",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {

		dnt, _ := cmd.Flags().GetBool("dnt")

		var err error
		telClient, err = getTelemetryClient(dnt)
		if err != nil {

			pterm.Warning.Println(fmt.Errorf("unable to create telemetry telClient: %w", err))
		}

		return nil
	},
	Short: "Manages local Airbyte installations",
}

Cmd represents the local command

View Source
var InstallCmd = &cobra.Command{
	Use:   "install",
	Short: "Install Airbyte locally",
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		return telemetryWrapper(telemetry.Install, func() error {
			lc, err := local.New(local.WithTelemetryClient(telClient))
			if err != nil {
				return fmt.Errorf("could not initialize local command: %w", err)
			}

			user := flagUsername
			if env := os.Getenv(envBasicAuthUser); env != "" {
				user = env
			}
			pass := flagPassword
			if env := os.Getenv(envBasicAuthPass); env != "" {
				pass = env
			}

			return lc.Install(context.Background(), user, pass)
		})
	},
}

InstallCmd installs Airbyte locally

View Source
var UninstallCmd = &cobra.Command{
	Use:   "uninstall",
	Short: "Uninstall Airbyte locally",
	PreRunE: func(cmd *cobra.Command, args []string) error {
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		return telemetryWrapper(telemetry.Uninstall, func() error {
			lc, err := local.New(local.WithTelemetryClient(telClient))
			if err != nil {
				return fmt.Errorf("could not initialize local command: %w", err)
			}

			return lc.Uninstall(context.Background())
		})
	},
}

UninstallCmd uninstalls Airbyte locally

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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