Documentation
¶
Index ¶
- func Backup(client backends.Client) error
- func NewEmptyNote(name string) note
- type Account
- type Safe
- func (s *Safe) Add(name, username, password string) (*Account, error)
- func (s *Safe) Edit(name, username, password string) (*Account, error)
- func (s *Safe) Get(name string) (*Account, error)
- func (s *Safe) List() map[string]Account
- func (s *Safe) Move(name, newName string) error
- func (s *Safe) Remove(name string) error
- func (s *Safe) SyncWith(otherSafe *Safe) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmptyNote ¶ added in v0.4.0
func NewEmptyNote(name string) note
Types ¶
type Account ¶
type Account struct {
Username string `json:"username"`
Password string `json:"password"`
CreatedOn int64 `json:"createdOn"`
ModifiedOn int64 `json:"modifiedOn"`
History accountHistory `json:"history,omitempty"`
}
func NewAccount ¶
type Safe ¶
type Safe struct {
Config *config.Config
Accounts map[string]Account `json:"accounts"`
Notes *notesManager
// contains filtered or unexported fields
}
func (*Safe) SyncWith ¶ added in v0.4.0
SyncWith syncs the current safe with another safe if they're branching off the same safe, i.e. are not completely different safes. It simply imports non-existing accounts & notes into the current safe and updates existing accounts & notes if the other safe has a more recent version of an account / note. A backup is made when existing accounts / notes are updated.
Click to show internal directories.
Click to hide internal directories.