mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 21:27:22 +00:00
Refactor Stringer implementations and scp root cmd init function
This commit is contained in:
parent
d3fa22dbb2
commit
da95f9a5f0
3 changed files with 40 additions and 17 deletions
|
|
@ -28,15 +28,17 @@ can interact with the entire Selfpass API.`,
|
|||
mgr := repositories.NewConfigManager(cfgFile)
|
||||
clientInit := credrepos.NewCredentialServiceClient
|
||||
|
||||
rootCmd.AddCommand(makeInit(mgr))
|
||||
rootCmd.AddCommand(makeEncrypt(mgr))
|
||||
rootCmd.AddCommand(makeDecrypt(mgr))
|
||||
rootCmd.AddCommand(makeDecryptCfg(mgr))
|
||||
rootCmd.AddCommand(commands.MakeList(makeInitClient(mgr, clientInit)))
|
||||
rootCmd.AddCommand(commands.MakeCreate(mgr, makeInitClient(mgr, clientInit)))
|
||||
rootCmd.AddCommand(commands.MakeUpdate(mgr, makeInitClient(mgr, clientInit)))
|
||||
rootCmd.AddCommand(commands.MakeGet(mgr, makeInitClient(mgr, clientInit)))
|
||||
rootCmd.AddCommand(commands.MakeDelete(makeInitClient(mgr, clientInit)))
|
||||
rootCmd.AddCommand(
|
||||
makeInit(mgr),
|
||||
makeEncrypt(mgr),
|
||||
makeDecrypt(mgr),
|
||||
makeDecryptCfg(mgr),
|
||||
commands.MakeList(makeInitClient(mgr, clientInit)),
|
||||
commands.MakeCreate(mgr, makeInitClient(mgr, clientInit)),
|
||||
commands.MakeUpdate(mgr, makeInitClient(mgr, clientInit)),
|
||||
commands.MakeGet(mgr, makeInitClient(mgr, clientInit)),
|
||||
commands.MakeDelete(makeInitClient(mgr, clientInit)),
|
||||
)
|
||||
|
||||
check(rootCmd.Execute())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue