Documentation
¶
Index ¶
- func Run(args []string, s paw.Storage)
- func Usage(commands []Cmd)
- type AddCmd
- type AgentCmd
- type Cmd
- type CommonFlags
- type EditCmd
- type InitCmd
- type ListCmd
- type LockCmd
- type PwGenCmd
- func (cmd *PwGenCmd) Description() string
- func (cmd *PwGenCmd) Name() string
- func (cmd *PwGenCmd) Parse(args []string) error
- func (cmd *PwGenCmd) Pwgen(key *paw.Key, modes []paw.PasswordMode, defaultMode paw.PasswordMode) (*paw.Password, error)
- func (cmd *PwGenCmd) Run(s paw.Storage) error
- func (cmd *PwGenCmd) Usage()
- type RemoveCmd
- type ShowCmd
- type UnlockCmd
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddCmd ¶
type AddCmd struct {
// contains filtered or unexported fields
}
Add adds an item to the vault
func (*AddCmd) Description ¶
Description returns the command description
type AgentCmd ¶ added in v0.20.0
type AgentCmd struct {
// contains filtered or unexported fields
}
Agent manages the Paw agent
func (*AgentCmd) Description ¶ added in v0.20.0
Description returns the command description
func (*AgentCmd) Parse ¶ added in v0.20.0
Parse parses the arguments and set the usage for the command
type Cmd ¶
type Cmd interface { Name() string // Name returns the one word command name Description() string // Description returns the command description Parse(args []string) error // Parse parses the cli arguments Usage() // Usage displays the command usage Run(s paw.Storage) error // Run runs the command }
Cmd wraps the methods for a paw cli command
type CommonFlags ¶
type CommonFlags struct { // Help displays the command help and exit Help bool // SessionID is the session ID SessionID string }
CommonFlags holds the flags shared between all commands
func (*CommonFlags) Parse ¶ added in v0.20.0
func (f *CommonFlags) Parse(cmd Cmd, args []string)
func (*CommonFlags) SetEnv ¶ added in v0.20.0
func (f *CommonFlags) SetEnv()
SetEnv sets the env variables according to the flag values
type EditCmd ¶
type EditCmd struct {
// contains filtered or unexported fields
}
Edit edits an item into the vault
func (*EditCmd) Description ¶
Description returns the command description
type InitCmd ¶
type InitCmd struct {
// contains filtered or unexported fields
}
Init initializes a vault
func (*InitCmd) Description ¶
Description returns the command description
type ListCmd ¶
type ListCmd struct {
// contains filtered or unexported fields
}
List lists the vaults content
func (*ListCmd) Description ¶
Description returns the command description
type LockCmd ¶ added in v0.20.0
type LockCmd struct {
// contains filtered or unexported fields
}
Lock locks a Paw vault removing all the associated sessions from the agent
func (*LockCmd) Description ¶ added in v0.20.0
Description returns the command description
func (*LockCmd) Parse ¶ added in v0.20.0
Parse parses the arguments and set the usage for the command
type PwGenCmd ¶
type PwGenCmd struct{}
PwGenCmd generates a password
func (*PwGenCmd) Description ¶
Description returns the command description
type RemoveCmd ¶
type RemoveCmd struct {
// contains filtered or unexported fields
}
RemoveCmd removes an item from the vault
func (*RemoveCmd) Description ¶
Description returns the command description
type ShowCmd ¶
type ShowCmd struct {
// contains filtered or unexported fields
}
Show shows an item details
func (*ShowCmd) Description ¶
Description returns the command description
type UnlockCmd ¶ added in v0.20.0
type UnlockCmd struct {
// contains filtered or unexported fields
}
UnlockCmd unlock a vault and starts a session returning its ID
func (*UnlockCmd) Description ¶ added in v0.20.0
Description returns the command description
func (*UnlockCmd) Parse ¶ added in v0.20.0
Parse parses the arguments and set the usage for the command
type VersionCmd ¶
type VersionCmd struct{}
Version is the version command
func (*VersionCmd) Description ¶
func (cmd *VersionCmd) Description() string
Description returns the command description
func (*VersionCmd) Name ¶
func (cmd *VersionCmd) Name() string
Name returns the one word command name
func (*VersionCmd) Parse ¶
func (cmd *VersionCmd) Parse(args []string) error
Parse parses the arguments and set the usage for the command