migrate

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BotkubeVersionConstraints added in v1.9.0

func BotkubeVersionConstraints() string

BotkubeVersionConstraints returns Botkube version constraints as a string.

func IsCompatible added in v1.9.0

func IsCompatible(botkubeVersionConstraintsStr string, botkubeVersionStr string) (bool, error)

IsCompatible checks if Botkube version is compatible with the migrate command.

func Run

func Run(ctx context.Context, status *printer.StatusPrinter, config []byte, k8sCfg *kubex.ConfigWithMeta, opts Options) (string, error)

Run runs the migration process.

Types

type Converter

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

Converter converts OS config into GraphQL create input.

func NewConverter

func NewConverter() *Converter

NewConverter returns a new Converter instance.

func (*Converter) ConvertActions

func (c *Converter) ConvertActions(actions bkconfig.Actions, sources map[string]bkconfig.Sources, executors map[string]bkconfig.Executors) []*gqlModel.ActionCreateUpdateInput

ConvertActions converts Actions.

func (*Converter) ConvertAliases

func (c *Converter) ConvertAliases(aliases bkconfig.Aliases, instanceID string) []*gqlModel.AliasCreateInput

ConvertAliases converts Aliases.

func (*Converter) ConvertPlatforms

func (c *Converter) ConvertPlatforms(platforms map[string]bkconfig.Communications) *gqlModel.PlatformsCreateInput

ConvertPlatforms converts cloud supported platforms.

func (*Converter) ConvertPlugins

func (c *Converter) ConvertPlugins(exec map[string]bkconfig.Executors, sources map[string]bkconfig.Sources) ([]*gqlModel.PluginsCreateInput, error)

ConvertPlugins converts all plugins.

type IndentWriter

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

IndentWriter provides functionality to intercept the underlying writer and add left indention.

func NewIndentWriter

func NewIndentWriter(w io.Writer, indent uint) *IndentWriter

NewIndentWriter returns a new IndentWriter.

func (IndentWriter) Fd

func (e IndentWriter) Fd() uintptr

Fd returns the integer Unix file descriptor referencing the open file.

func (IndentWriter) Write

func (e IndentWriter) Write(p []byte) (int, error)

Writer writes the input p.

type Options

type Options struct {
	Timeout           time.Duration
	Watch             bool
	Token             string
	InstanceName      string `survey:"instanceName"`
	CloudDashboardURL string
	CloudAPIURL       string
	ImageTag          string
	SkipConnect       bool
	SkipOpenBrowser   bool
	AutoApprove       bool
	ConfigExporter    config.ExporterOptions
}

Options holds migrate possible configuration options.

Jump to

Keyboard shortcuts

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