Documentation
¶
Overview ¶
Package commands contains all CLI command implementations.
Index ¶
- func BuildMinimalEnv(keys map[string]string) []string
- func ExecCmd(cfg *Config) *cobra.Command
- func GetCmd(cfg *Config) *cobra.Command
- func GetUsername(cfg *Config) (string, error)
- func InitCmd(cfg *Config) *cobra.Command
- func ListCmd(cfg *Config) *cobra.Command
- func RemoveCmd(cfg *Config) *cobra.Command
- func SelectUser() (string, error)
- func SetCmd(cfg *Config) *cobra.Command
- func ValidateKeyName(name string) error
- func VersionCmd(version string) *cobra.Command
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMinimalEnv ¶
BuildMinimalEnv creates an environment with minimal system vars plus the given keys.
func GetUsername ¶
GetUsername returns the username from config or prompts for selection.
func SelectUser ¶
SelectUser prompts the user to select from available vaults.
func ValidateKeyName ¶
ValidateKeyName checks if a key name is valid.
func VersionCmd ¶
VersionCmd creates the version command.
Types ¶
type Config ¶
type Config struct {
User *string
PasswordFile *string
KeyValue *string
GetPassword func(prompt string) (string, error)
ReadPassword func(prompt string) (string, error)
ReadConfirm func(prompt string) (string, error)
}
Config holds shared configuration and dependencies for all commands.
Click to show internal directories.
Click to hide internal directories.