cmd

package
v0.0.0-...-ded4385 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 77 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"
)

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"`
	// contains filtered or unexported fields
}

RootCmdOptions --

func (*RootCmdOptions) GetCamelCmdClient

func (command *RootCmdOptions) GetCamelCmdClient() (*camelv1.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

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) ([]Source, error)

ResolveSources ---

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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