lockbox

password manager
Log | Files | Refs | README | LICENSE

commit bdff2ba24af4ff0a76c4577adf3e90dc7f739ebb
parent 53920f01d87a7a0e4c44488320628bfedc77dc29
Author: Sean Enck <sean@ttypty.com>
Date:   Sun, 11 Aug 2024 07:27:35 -0400

merge interfaces

Diffstat:
Minternal/app/core.go | 6++++++
Minternal/app/insert.go | 3+--
Minternal/app/rekey.go | 3+--
3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/internal/app/core.go b/internal/app/core.go @@ -92,6 +92,12 @@ type ( Writer() io.Writer } + // UserInputOptions handle user inputs (e.g. password entry) + UserInputOptions interface { + CommandOptions + IsPipe() bool + } + // DefaultCommand is the default CLI app type for actual execution DefaultCommand struct { args []string diff --git a/internal/app/insert.go b/internal/app/insert.go @@ -14,8 +14,7 @@ type ( InsertMode uint // InsertOptions are functions required for insert InsertOptions interface { - CommandOptions - IsPipe() bool + UserInputOptions Input(bool, bool) ([]byte, error) } ) diff --git a/internal/app/rekey.go b/internal/app/rekey.go @@ -10,8 +10,7 @@ import ( type ( // KeyerOptions defines how rekeying happens KeyerOptions interface { - CommandOptions - IsPipe() bool + UserInputOptions Password() (string, error) ReadLine() (string, error) }