cmd

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 95 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultConfigName is the default config name.
	DefaultConfigName = "kamel-config"

	// DefaultConfigLocation is the main place where the kamel content is stored.
	DefaultConfigLocation = DefaultConfigName + ".yaml"

	// KamelTagName ---.
	KamelTagName = "kamel"

	// MapstructureTagName ---.
	MapstructureTagName = "mapstructure"
)
View Source
const (
	// Megabyte represent the related unit.
	Megabyte = 1 << 20
	// Kilobyte represent the related unit.
	Kilobyte = 1 << 10
)

Variables

View Source
var VersionVariant = ""

VersionVariant may be overridden at build time.

Functions

func DeleteIntegration

func DeleteIntegration(ctx context.Context, c client.Client, name string, namespace string) error

DeleteIntegration --.

func GetContainerIntegrationRunCommand

func GetContainerIntegrationRunCommand(ctx context.Context, properties []string, dependencies []string, routes []string, stdout, stderr io.Writer) (*exec.Cmd, error)

GetContainerIntegrationRunCommand --.

func NewKamelCommand

func NewKamelCommand(ctx context.Context) (*cobra.Command, error)

NewKamelCommand --.

func NewKamelWithModelineCommand

func NewKamelWithModelineCommand(ctx context.Context, osArgs []string) (*cobra.Command, []string, error)

NewKamelWithModelineCommand ---.

func RunLocalIntegrationRunCommand

func RunLocalIntegrationRunCommand(ctx context.Context, properties []string, dependencies []string, routes []string, propertiesDir string, stdout, stderr io.Writer) error

RunLocalIntegrationRunCommand --.

Types

type Config

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

Config is a helper class to manipulate kamel configuration files.

func LoadConfiguration

func LoadConfiguration() (*Config, error)

LoadConfiguration loads a kamel configuration file.

func (*Config) Delete

func (cfg *Config) Delete(path string)

Delete allows to remove a sub tree from the kamel content.

func (*Config) Save

func (cfg *Config) Save() error

Save ---.

func (*Config) SetNode

func (cfg *Config) SetNode(nodeID string, nodeValues map[string]interface{})

SetNode allows to replace a subtree with a given content.

func (*Config) Update

func (cfg *Config) Update(cmd *cobra.Command, nodeID string, data interface{}, changedOnly bool)

Update ---.

type RootCmdOptions

type RootCmdOptions struct {
	RootContext   context.Context    `mapstructure:"-"`
	Context       context.Context    `mapstructure:"-"`
	ContextCancel context.CancelFunc `mapstructure:"-"`

	KubeConfig string `mapstructure:"kube-config"`
	Namespace  string `mapstructure:"namespace"`
	Verbose    bool   `mapstructure:"verbose" yaml:",omitempty"`
	// contains filtered or unexported fields
}

RootCmdOptions --.

func (*RootCmdOptions) GetCamelCmdClient

func (command *RootCmdOptions) GetCamelCmdClient() (*v1.CamelV1Client, error)

GetCamelCmdClient returns a client to access the Camel resources.

func (*RootCmdOptions) GetCmdClient

func (command *RootCmdOptions) GetCmdClient() (client.Client, error)

GetCmdClient returns the client that can be used from command line tools.

func (*RootCmdOptions) NewCmdClient

func (command *RootCmdOptions) NewCmdClient() (client.Client, error)

NewCmdClient returns a new client that can be used from command line tools.

func (*RootCmdOptions) PrintVerboseOut

func (command *RootCmdOptions) PrintVerboseOut(cmd *cobra.Command, a ...interface{})

func (*RootCmdOptions) PrintfVerboseErrf

func (command *RootCmdOptions) PrintfVerboseErrf(cmd *cobra.Command, format string, a ...interface{})

func (*RootCmdOptions) PrintfVerboseOutf

func (command *RootCmdOptions) PrintfVerboseOutf(cmd *cobra.Command, format string, a ...interface{})

type Source

type Source struct {
	Origin   string
	Location string
	Name     string
	Content  string
	Compress bool
	Local    bool
}

Source ---.

func ResolveLocalSource

func ResolveLocalSource(location string, compress bool) (Source, error)

ResolveLocalSource --.

func ResolveSources

func ResolveSources(ctx context.Context, locations []string, compress bool, cmd *cobra.Command) ([]Source, error)

ResolveSources ---.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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