status-go/protocol/requests/migrate_keystore_dir.go
frank 7a23ac59c4
fix_: ignore log partial API request (#5865)
* fix_: ignore log partial sensitive API request

* chore_: use validator

* chore_: rebase
2024-09-27 11:48:51 +01:00

28 lines
775 B
Go

package requests
import (
"gopkg.in/go-playground/validator.v9"
"github.com/status-im/status-go/multiaccounts"
)
// MigrateKeystoreDir represents a request to migrate keystore directory.
type MigrateKeystoreDir struct {
// Account is the account associated with the keystore.
Account multiaccounts.Account `json:"account"`
// Password is the password for the keystore.
Password string `json:"password" validate:"required"`
// OldDir is the old keystore directory.
OldDir string `json:"oldDir" validate:"required"`
// NewDir is the new keystore directory.
NewDir string `json:"newDir" validate:"required"`
}
// Validate checks the validity of the MigrateKeystoreDir request.
func (r *MigrateKeystoreDir) Validate() error {
return validator.New().Struct(r)
}