cmd

package
v0.0.0-...-9e73d75 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenCommand = &cobra.Command{
	Use:   "gen <path> <tmpl_file>",
	Short: "Generate files using Go templates from WASP configs",
	Long:  `Generate files using Go templates from WASP configs`,
	Run:   AttachHandler(performGen),
}
View Source
var GetCommand = &cobra.Command{
	Use:   "get <path>",
	Short: "Get the configuration in current path",
	Long:  `Get the configuration in current path`,
	Run:   AttachHandler(performGet),
}
View Source
var LsCommand = &cobra.Command{
	Use:   "ls <path>",
	Short: "List keys in the current path",
	Long:  `List keys in the current path`,
	Run:   AttachHandler(performLS),
}
View Source
var PutCommand = &cobra.Command{
	Use:   "put <path> <value>",
	Short: "Put a value against a path",
	Long:  `Put a value against a path`,
	Run:   AttachHandler(performPut),
}
View Source
var RmrCommand = &cobra.Command{
	Use:   "rmr <path>",
	Short: "Delete a config key (recursively)",
	Long:  `Delete a config key (recursively)`,
	Run:   AttachHandler(performRmr),
}
View Source
var WaspCommand = &cobra.Command{
	Use:   "wasp <args>",
	Short: "Command line client to WASP",
	Long:  `Command line client to WASP`,
}

Main command for Cobra.

Functions

func AttachHandler

func AttachHandler(handler CommandHandler) func(*cobra.Command, []string)

Types

type CommandHandler

type CommandHandler func(args []string) error

Jump to

Keyboard shortcuts

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