Documentation
¶
Index ¶
- Constants
- Variables
- func CatCommandFactory(ui cli.Ui) cli.CommandFactory
- func CopyCommandFactory(ui cli.Ui) cli.CommandFactory
- func Debug(message string)
- func Debugf(format string, v ...interface{})
- func DefaultApp(ui cli.Ui, args []string) *cli.CLI
- func DefaultCommands(ui cli.Ui) map[string]cli.CommandFactory
- func DeleteCommandFactory(ui cli.Ui) cli.CommandFactory
- func EditCommandFactory(ui cli.Ui) cli.CommandFactory
- func FileCommandFactory(ui cli.Ui, sub string) cli.CommandFactory
- func IsTerminal(fd uintptr) bool
- func ListCommandFactory(ui cli.Ui) cli.CommandFactory
- func MoveCommandFactory(ui cli.Ui) cli.CommandFactory
- func RegisterCodec(name string, c Codec)
- func ReplaceCodec(name string, c Codec) (exists bool)
- func SafeOutputWriter(name string, mode os.FileMode) io.WriteCloser
- func ShellCommandFactory(ui cli.Ui) cli.CommandFactory
- func TemplateCommandFactory(ui cli.Ui) cli.CommandFactory
- type CatCommand
- type Client
- type Codec
- type CopyCommand
- type DeleteCommand
- type EditCommand
- type FileCommand
- type ListCommand
- type Marshaler
- type MarshalingNotSupported
- type MoveCommand
- type ShellCommand
- type TemplateCommand
- type Unmarshaler
- type UnmarshalingNotSupported
Constants ¶
const ( Success int = iota SyntaxError ClientError ServerError SystemError CodecError Help = cli.RunResultHelp )
Return code constants
const ShellHistoryFile = "$HOME/.vc_history"
ShellHistoryFile is the file where readline history is recorded
Variables ¶
var ( // CodecTypeKey is the key that marks a named Codec CodecTypeKey = "__TYPE__" // ErrMarshalingNotSupported returned by MarshalingNotSupported ErrMarshalingNotSupported = errors.New("vc: marshaling not supported by codec") // ErrUnmarshalingNotSupported returned by UnmarshalingNotSupported ErrUnmarshalingNotSupported = errors.New("vc: unmarshaling not supported by codec") )
var DebugLogFunc func(string)
DebugLogFunc is our debug log function, defaults to nil (no debug logging)
Functions ¶
func CatCommandFactory ¶
func CatCommandFactory(ui cli.Ui) cli.CommandFactory
func CopyCommandFactory ¶
func CopyCommandFactory(ui cli.Ui) cli.CommandFactory
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf is a debug message with variadic formatting
func DefaultApp ¶
DefaultApp sets up a default CLI application
func DefaultCommands ¶
func DefaultCommands(ui cli.Ui) map[string]cli.CommandFactory
DefaultCommands returns a map of default commands
func DeleteCommandFactory ¶
func DeleteCommandFactory(ui cli.Ui) cli.CommandFactory
func EditCommandFactory ¶
func EditCommandFactory(ui cli.Ui) cli.CommandFactory
func FileCommandFactory ¶
func FileCommandFactory(ui cli.Ui, sub string) cli.CommandFactory
func IsTerminal ¶
IsTerminal return true if the file descriptor is terminal.
func ListCommandFactory ¶
func ListCommandFactory(ui cli.Ui) cli.CommandFactory
func MoveCommandFactory ¶
func MoveCommandFactory(ui cli.Ui) cli.CommandFactory
func ReplaceCodec ¶
ReplaceCodec replaces or adds a named codec
func SafeOutputWriter ¶
func SafeOutputWriter(name string, mode os.FileMode) io.WriteCloser
SafeOutputWriter implements a io.WriteCloser that uses a temporary file in the same directory as the target file to write to, and then move the temporary file to the final name after closing. If name is "" or "-", it is assumed the output is stdout and no tempfile will be used.
The tempfile gets created on the first write to the returned Writer.
func ShellCommandFactory ¶
func ShellCommandFactory(ui cli.Ui) cli.CommandFactory
func TemplateCommandFactory ¶
func TemplateCommandFactory(ui cli.Ui) cli.CommandFactory
Types ¶
type CatCommand ¶
type CatCommand struct {
// contains filtered or unexported fields
}
CatCommand can display (structured) secrets
func (*CatCommand) Close ¶
func (cmd *CatCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*CatCommand) Help ¶
func (cmd *CatCommand) Help() string
func (*CatCommand) Run ¶
func (cmd *CatCommand) Run(args []string) int
func (*CatCommand) Synopsis ¶
func (cmd *CatCommand) Synopsis() string
type Client ¶
type Client struct { *api.Client // Path we are operating on, defaults to the root Path string // contains filtered or unexported fields }
Client for the Vault API
func (*Client) Complete ¶
func (c *Client) Complete(filters ...completionFilter) readline.DynamicCompleteFunc
Complete returns completer suggestions
func (*Client) Glob ¶
Glob is a shortcut to list generic secrets and mounts by glob pattern. The wildcards "*" and "?" are supported. Currently only globbing the base of the path is supported, globbing on directory names is not.
type CopyCommand ¶
type CopyCommand struct {
// contains filtered or unexported fields
}
CopyCommand can display (structured) secrets
func (*CopyCommand) Close ¶
func (cmd *CopyCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*CopyCommand) Help ¶
func (cmd *CopyCommand) Help() string
func (*CopyCommand) Run ¶
func (cmd *CopyCommand) Run(args []string) int
func (*CopyCommand) Synopsis ¶
func (cmd *CopyCommand) Synopsis() string
type DeleteCommand ¶
type DeleteCommand struct {
// contains filtered or unexported fields
}
DeleteCommand can display (structured) secrets
func (*DeleteCommand) Close ¶
func (cmd *DeleteCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*DeleteCommand) Help ¶
func (cmd *DeleteCommand) Help() string
func (*DeleteCommand) Run ¶
func (cmd *DeleteCommand) Run(args []string) int
func (*DeleteCommand) Synopsis ¶
func (cmd *DeleteCommand) Synopsis() string
type EditCommand ¶
type EditCommand struct {
// contains filtered or unexported fields
}
EditCommand opens Vault secrets in an interactive editor ($EDITOR)
func (*EditCommand) Close ¶
func (cmd *EditCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*EditCommand) Help ¶
func (cmd *EditCommand) Help() string
func (*EditCommand) Run ¶
func (cmd *EditCommand) Run(args []string) int
func (*EditCommand) Synopsis ¶
func (cmd *EditCommand) Synopsis() string
type FileCommand ¶
type FileCommand struct {
// contains filtered or unexported fields
}
FileCommand stores and retrieves raw files (blobs).
func (*FileCommand) Close ¶
func (cmd *FileCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*FileCommand) Help ¶
func (cmd *FileCommand) Help() string
func (*FileCommand) Run ¶
func (cmd *FileCommand) Run(args []string) int
func (*FileCommand) Synopsis ¶
func (cmd *FileCommand) Synopsis() string
type ListCommand ¶
type ListCommand struct {
// contains filtered or unexported fields
}
ListCommand can display (structured) secrets
func (*ListCommand) Close ¶
func (cmd *ListCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*ListCommand) Help ¶
func (cmd *ListCommand) Help() string
func (*ListCommand) Run ¶
func (cmd *ListCommand) Run(args []string) int
func (*ListCommand) Synopsis ¶
func (cmd *ListCommand) Synopsis() string
type MarshalingNotSupported ¶
type MarshalingNotSupported struct{}
MarshalingNotSupported is a placeholder Marshaler that returns an error upon marshaling.
type MoveCommand ¶
type MoveCommand struct {
// contains filtered or unexported fields
}
MoveCommand can display (structured) secrets
func (*MoveCommand) Close ¶
func (cmd *MoveCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*MoveCommand) Help ¶
func (cmd *MoveCommand) Help() string
func (*MoveCommand) Run ¶
func (cmd *MoveCommand) Run(args []string) int
func (*MoveCommand) Synopsis ¶
func (cmd *MoveCommand) Synopsis() string
type ShellCommand ¶
type ShellCommand struct {
// contains filtered or unexported fields
}
ShellCommand is an interactive command line shell
func (*ShellCommand) Close ¶
func (cmd *ShellCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*ShellCommand) Help ¶
func (cmd *ShellCommand) Help() string
func (*ShellCommand) Run ¶
func (cmd *ShellCommand) Run(args []string) int
func (*ShellCommand) Synopsis ¶
func (cmd *ShellCommand) Synopsis() string
type TemplateCommand ¶
type TemplateCommand struct {
// contains filtered or unexported fields
}
TemplateCommand renders (multiple) secret(s) into a templated file.
func (*TemplateCommand) Close ¶
func (cmd *TemplateCommand) Close() error
Close the output file (if any) and rename it to cmd.out
func (*TemplateCommand) Help ¶
func (cmd *TemplateCommand) Help() string
func (*TemplateCommand) Run ¶
func (cmd *TemplateCommand) Run(args []string) int
func (*TemplateCommand) Synopsis ¶
func (cmd *TemplateCommand) Synopsis() string
type Unmarshaler ¶
Unmarshaler can unmarshal a byte slice into api.Secret.Data
type UnmarshalingNotSupported ¶
type UnmarshalingNotSupported struct{}
UnmarshalingNotSupported is a placeholder Unmarshaler that returns an error upon unmarshaling.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
builtin
|
|
cmd
|
|
vc
Command vc is a Vault Client for manipulating secrets inside Vault Environment Variables vc respects the following environment settings: VAULT_ADDR Vault server address VAULT_CACERT Path to a PEM-encoded CA cert file to use to verify the Vault server SSL certificate.
|
Command vc is a Vault Client for manipulating secrets inside Vault Environment Variables vc respects the following environment settings: VAULT_ADDR Vault server address VAULT_CACERT Path to a PEM-encoded CA cert file to use to verify the Vault server SSL certificate. |