working commit

This commit is contained in:
2026-02-18 23:22:46 +02:00
parent e1ca9b1b4c
commit 4a43a22c19
12 changed files with 500 additions and 92 deletions
+6 -6
View File
@@ -45,7 +45,7 @@ type CommonAccountParams struct {
func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
var subCmd = &cobra.Command{
Use: "accounts",
Short: "Account operation",
Short: "Account operations",
Aliases: []string{"account"},
}
const defaultTimeout uint64 = 10
@@ -58,7 +58,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
// CreateAccount
var createAccountCmd = &cobra.Command{
Use: "create host username password",
Use: "create [user:pass@]hostname[:port] username password",
Short: "Create user account",
Args: cobra.ExactArgs(3),
Run: util.CreateAccount,
@@ -67,7 +67,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
// GetAccount
var getAccountCmd = &cobra.Command{
Use: "get hostname accountId|username",
Use: "get [user:pass@]hostname[:port] accountId|username",
Short: "Get account info",
Args: cobra.ExactArgs(2),
Run: util.GetAccount,
@@ -76,7 +76,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
// UpdateAccount
var updateAccountCmd = &cobra.Command{
Use: "update hostname username|accounId",
Use: "update [user:pass@]hostname[:port] username|accounId",
Short: "Update account parameters",
Args: cobra.ExactArgs(2),
Run: util.UpdateAccount,
@@ -88,7 +88,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
// DeleteAccount
var deleteAccountCmd = &cobra.Command{
Use: "delete hostname username|accountId",
Use: "delete [user:pass@]hostname[:port] username|accountId",
Short: "Delete account",
Args: cobra.ExactArgs(2),
Run: util.DeleteAccount,
@@ -98,7 +98,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
// ListAccount
var listAccountsCmd = &cobra.Command{
Use: "list hostname",
Use: "list [user:pass@]hostname[:port]",
Short: "list accounts",
Args: cobra.ExactArgs(1),
Run: util.ListAccounts,