2022-05-25 16:15:27 +00:00
|
|
|
package util
|
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags"
|
2022-05-25 16:15:27 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
|
|
|
|
|
|
|
var Cmd = &cobra.Command{
|
|
|
|
Use: "util",
|
|
|
|
Short: "Utility operations",
|
|
|
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
|
|
|
flags := cmd.Flags()
|
|
|
|
|
|
|
|
_ = viper.BindPFlag(commonflags.GenerateKey, flags.Lookup(commonflags.GenerateKey))
|
|
|
|
_ = viper.BindPFlag(commonflags.WalletPath, flags.Lookup(commonflags.WalletPath))
|
|
|
|
_ = viper.BindPFlag(commonflags.Account, flags.Lookup(commonflags.Account))
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
Cmd.AddCommand(
|
|
|
|
signCmd,
|
|
|
|
convertCmd,
|
|
|
|
keyerCmd,
|
|
|
|
locodeCmd,
|
|
|
|
)
|
|
|
|
|
|
|
|
initSignCmd()
|
|
|
|
initConvertCmd()
|
|
|
|
initKeyerCmd()
|
|
|
|
initLocodeCmd()
|
|
|
|
}
|