cmd

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InputFiles []string
	Namespace  string
)

Common global variables being used for kedge subcommands are declared here. Before adding anything here, make sure that the subcommands using these variables are mutually exclusive. e.g. only one of `kedge generate` or `kedge create` can be run at a time, so it makes sense to use the common InputFiles variable in both of those commands.

View Source
var (
	// VERSION  is version number that will be displayed when running ./kedge version
	VERSION = "0.6.0"

	// GITCOMMIT is hash of the commit that wil be displayed when running ./kedge version
	// this will be overwritten when running  build like this: go build -ldflags="-X github.com/kedgeproject/kedge/cmd.GITCOMMIT=$(GITCOMMIT)"
	// HEAD is default indicating that this was not set during build
	GITCOMMIT = "HEAD"
)
View Source
var DockerContext string
View Source
var DockerImage, BuilderImage string
View Source
var Dockerfile string
View Source
var (
	GlobalVerbose bool
)

Global variables

View Source
var PushImage bool
View Source
var RootCmd = &cobra.Command{
	Use:   "kedge",
	Short: "Kedge: Simple, Concise & Declarative Kubernetes Applications",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {

		if GlobalVerbose {
			log.SetLevel(log.DebugLevel)
		}

	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

func Generate

func Generate(cmd *cobra.Command, args []string) error

Generate the the approriate autocompletion file

Types

type App added in v0.4.0

type App struct {
	Name       string      `json:"name,omitempty"`
	Controller string      `json:"controller,omitempty"`
	Containers []Container `json:"containers,omitempty"`
	Services   []Service   `json:"services,omitempty"`
}

type Container added in v0.4.0

type Container struct {
	Image string `json:"image,omitempty"`
}

type Service added in v0.4.0

type Service struct {
	PortMappings []string `json:"portMappings,omitempty"`
}

Jump to

Keyboard shortcuts

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