command

package
v0.0.0-...-ecb7df7 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package command manages the basics of subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCommand

type BaseCommand struct {
	Config *config.Config
}

BaseCommand represents a Vault subcommand. It contains the current config. Subcommands should be based off of this and implement Command.

type Command

type Command interface {
	Init(*config.Config, []string) error
	Run() error
}

Command represents a subcommand. It has an `Init` method and a `Run` method.

type RegisteredCommand

type RegisteredCommand struct {
	Name    string
	Command string
	Help    string
	Entry   Command
}

RegisteredCommand represents a command, plus additional data such as a short name, the text used to call the subcommand, and a help string.

Jump to

Keyboard shortcuts

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