tests done

This commit is contained in:
2021-12-28 02:50:54 -05:00
parent 07c38ce23e
commit 330548689a
19 changed files with 677 additions and 27 deletions

View File

@@ -52,6 +52,28 @@ func (p *Password) Delete() (err error) {
return
}
// Exists returns true if this Password actually exists.
func (p *Password) Exists() (exists bool, err error) {
if exists, err = p.folder.HasEntry(p.Name); err != nil {
return
}
return
}
// Rename renames this Password (changes its key).
func (p *Password) Rename(newName string) (err error) {
if err = p.folder.RenameEntry(p.Name, newName); err != nil {
return
}
p.Name = newName
return
}
// SetValue will replace this Password's Password.Value.
func (p *Password) SetValue(newValue string) (err error) {
@@ -70,6 +92,10 @@ func (p *Password) Update() (err error) {
var call *dbus.Call
var b []byte
if err = p.folder.wallet.walletCheck(); err != nil {
return
}
if call = p.Dbus.Call(
DbusWMReadPassword, 0, p.folder.wallet.handle, p.folder.Name, p.Name, p.folder.wallet.wm.AppID,
); call.Err != nil {