cli

package
v0.0.0-...-8cfe922 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package cli provides commands to use Kocho.

Index

Constants

View Source
const (
	LabelToken                = "Slack token"
	LabelUsername             = "Your username"
	LabelNotificationUsername = "Bot username (optional)"
	LabelEmoji                = "Bot emoji (optional)"
	LabelNotificationChannel  = "Notification channel"
)

Constants related to Slack.

Variables

View Source
var (
	// ConfigHomePath defines where to load configuration files from.
	ConfigHomePath = os.Getenv("HOME") + "/.giantswarm/"
)

Functions

func Execute

func Execute()

Execute loads configuration, determines the necessary command to run, and runs it.

func NewKochoCmd

func NewKochoCmd()

NewKochoCmd configures available commands, and runs them.

Types

type Command

type Command struct {
	Name        string        // Name of the Command and the string to use to invoke it
	Summary     string        // One-sentence summary of what the Command does
	Usage       string        // Usage options/arguments
	Description string        // Detailed description of command
	Flags       pflag.FlagSet // Set of flags associated with this command

	Run func(args []string) int // Run a command with the given arguments, return exit status
}

Command describes a command that can be run.

type KochoConfiguration

type KochoConfiguration struct {
	*viper.Viper
}

KochoConfiguration holds Viper configuration.

func NewConfig

func NewConfig() *KochoConfiguration

NewConfig returns a new KochoConfiguration.

Jump to

Keyboard shortcuts

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