Documentation
¶
Overview ¶
Package app can do various conversions
Package app common objects ¶
Package app handles informational requests ¶
Package app can insert ¶
Package app can get stats ¶
Package app can list entries ¶
Package app can move entries ¶
Package app handles rekeying a database ¶
Package app can remove an entry ¶
Package app can show/clip an entry
Package app handles TOTP tokens.
Package app can unset a field
Index ¶
- Variables
- func Conv(cmd CommandOptions) error
- func Die(msg string)
- func Info(w io.Writer, command string, args []string) (bool, error)
- func Insert(cmd UserInputOptions) error
- func JSON(cmd CommandOptions) error
- func List(cmd CommandOptions, groups bool) error
- func Move(cmd CommandOptions) error
- func ParseTimeWindow(windows ...string) ([]config.TimeWindow, error)
- func ReKey(cmd UserInputOptions) error
- func Remove(cmd CommandOptions) error
- func ShowClip(cmd CommandOptions, isShow bool) error
- func Unset(cmd CommandOptions) error
- type CommandOptions
- type DefaultCommand
- func (a *DefaultCommand) Args() []string
- func (a *DefaultCommand) Confirm(prompt string) bool
- func (a *DefaultCommand) Input(interactive, isPassword bool, prompt string) ([]byte, error)
- func (a *DefaultCommand) IsPipe() bool
- func (a *DefaultCommand) Transaction() *kdbx.Transaction
- func (a *DefaultCommand) Writer() io.Writer
- type TOTPArguments
- type TOTPOptions
- type UserInputOptions
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoTOTP is used when TOTP is requested BUT is disabled ErrNoTOTP = errors.New("totp is disabled") // ErrUnknownTOTPMode indicates an unknown totp argument type ErrUnknownTOTPMode = errors.New("unknown totp mode") )
Functions ¶
func ParseTimeWindow ¶ added in v1.5.0
func ParseTimeWindow(windows ...string) ([]config.TimeWindow, error)
ParseTimeWindow will handle parsing a window of colors for TOTP operations
func ShowClip ¶
func ShowClip(cmd CommandOptions, isShow bool) error
ShowClip will handle showing/clipping an entry
Types ¶
type CommandOptions ¶
type CommandOptions interface { Confirm(string) bool Args() []string Transaction() *kdbx.Transaction Writer() io.Writer }
CommandOptions define how commands operate as an application
type DefaultCommand ¶
type DefaultCommand struct {
// contains filtered or unexported fields
}
DefaultCommand is the default CLI app type for actual execution
func NewDefaultCommand ¶
func NewDefaultCommand(args []string) (*DefaultCommand, error)
NewDefaultCommand creates a new app command
func (*DefaultCommand) Args ¶
func (a *DefaultCommand) Args() []string
Args will get the args passed to the application
func (*DefaultCommand) Confirm ¶
func (a *DefaultCommand) Confirm(prompt string) bool
Confirm will confirm with the user (dying if something abnormal happens)
func (*DefaultCommand) Input ¶
func (a *DefaultCommand) Input(interactive, isPassword bool, prompt string) ([]byte, error)
Input will read user input
func (*DefaultCommand) IsPipe ¶
func (a *DefaultCommand) IsPipe() bool
IsPipe will indicate if we're receiving pipe input
func (*DefaultCommand) Transaction ¶
func (a *DefaultCommand) Transaction() *kdbx.Transaction
Transaction will return the backend transaction
type TOTPArguments ¶
TOTPArguments are the parsed TOTP call arguments
func NewTOTPArguments ¶
func NewTOTPArguments(args []string) (*TOTPArguments, error)
NewTOTPArguments will parse the input arguments
func (*TOTPArguments) Do ¶
func (args *TOTPArguments) Do(opts TOTPOptions) error
Do will perform the TOTP operation
type TOTPOptions ¶
type TOTPOptions struct { Clear func() // contains filtered or unexported fields }
TOTPOptions are TOTP call options
func NewDefaultTOTPOptions ¶
func NewDefaultTOTPOptions(app CommandOptions) TOTPOptions
NewDefaultTOTPOptions gets the default option set
type UserInputOptions ¶
type UserInputOptions interface { CommandOptions IsPipe() bool Input(bool, bool, string) ([]byte, error) }
UserInputOptions handle user inputs (e.g. password entry)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package commands defines available commands within the app
|
Package commands defines available commands within the app |
Package completions generations shell completions
|
Package completions generations shell completions |
Package help manages usage information
|
Package help manages usage information |
Package totp handles TOTP operations
|
Package totp handles TOTP operations |