cmd

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 97 Imported by: 2

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

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 NewKamelCommand

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

NewKamelCommand --.

func NewKamelWithModelineCommand

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

NewKamelWithModelineCommand ---.

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 LoadConfigurationFrom added in v1.11.0

func LoadConfigurationFrom(location string) (*Config, error)

LoadConfiguration loads a kamel configuration file from a specific location.

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 ConfigFolder added in v1.11.0

type ConfigFolder string

ConfigFolder defines the different types of folder containing the configuration file.

const (
	// The path of the folder containing the configuration file is retrieved from the environment
	// variable KAMEL_CONFIG_PATH.
	ConfigFolderEnvVar ConfigFolder = "env"
	// The path of the folder containing the configuration file is $HOME/.kamel.
	ConfigFolderHome ConfigFolder = "home"
	// The folder containing the configuration file is .kamel located in the working directory.
	ConfigFolderSubDirectory ConfigFolder = "sub"
	// The folder containing the configuration file is the working directory.
	ConfigFolderWorking ConfigFolder = "working"
	// The folder containing the configuration file is the directory currently used by Kamel.
	ConfigFolderUsed ConfigFolder = "used"
)

type LocalCmdOptions added in v1.10.0

type LocalCmdOptions struct {
	*RootCmdOptions
	Dependencies      []string `mapstructure:"dependencies"`
	MavenRepositories []string `mapstructure:"maven-repositories"`
	Traits            []string `mapstructure:"traits"`
}

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 --. nolint: containedctx

func (*RootCmdOptions) GetCamelCmdClient added in v1.3.0

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 added in v1.10.0

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

func (*RootCmdOptions) PrintfVerboseErrf added in v1.10.0

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

func (*RootCmdOptions) PrintfVerboseOutf added in v1.10.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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