cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 63 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 Getters map[string]Getter
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)

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 Getter

type Getter interface {
	Get(u *url.URL) ([]byte, error)
}

type GitHubGetter

type GitHubGetter struct {
	HTTPGetter
}

A simple getter that retrieves the content of an integration from a GitHub endpoint using a RAW endpoint.

func (GitHubGetter) Get

func (g GitHubGetter) Get(u *url.URL) ([]byte, error)

type HTTPGetter

type HTTPGetter struct {
}

A simple getter that retrieves the content of an integration from an http(s) endpoint.

func (HTTPGetter) Get

func (g HTTPGetter) Get(u *url.URL) ([]byte, error)

type RootCmdOptions

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

	KubeConfig string `mapstructure:"kube-config"`
	Namespace  string `mapstructure:"namespace"`
	// contains filtered or unexported fields
}

RootCmdOptions --

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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