[#932] adm: Move command deposit-notary
to package notary
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
beb9d80e34
commit
f7a8f51c66
6 changed files with 68 additions and 53 deletions
28
cmd/frostfs-adm/internal/modules/morph/notary/root.go
Normal file
28
cmd/frostfs-adm/internal/modules/morph/notary/root.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package notary
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var DepositCmd = &cobra.Command{
|
||||
Use: "deposit-notary",
|
||||
Short: "Deposit GAS for notary service",
|
||||
PreRun: func(cmd *cobra.Command, _ []string) {
|
||||
_ = viper.BindPFlag(util.EndpointFlag, cmd.Flags().Lookup(util.EndpointFlag))
|
||||
},
|
||||
RunE: depositNotary,
|
||||
}
|
||||
|
||||
func initDepositoryNotaryCmd() {
|
||||
DepositCmd.Flags().StringP(util.EndpointFlag, util.EndpointFlagShort, "", util.EndpointFlagDesc)
|
||||
DepositCmd.Flags().String(util.StorageWalletFlag, "", "Path to storage node wallet")
|
||||
DepositCmd.Flags().String(walletAccountFlag, "", "Wallet account address")
|
||||
DepositCmd.Flags().String(util.RefillGasAmountFlag, "", "Amount of GAS to deposit")
|
||||
DepositCmd.Flags().String(notaryDepositTillFlag, "", "Notary deposit duration in blocks")
|
||||
}
|
||||
|
||||
func init() {
|
||||
initDepositoryNotaryCmd()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue