Documentation ¶
Index ¶
- Constants
- func RandomString64() string
- type DB
- func (db *DB) ChangePassword(newPassword string) error
- func (db *DB) CheckPassword(password string) bool
- func (db *DB) Create(password string)
- func (db *DB) DeleteForever(id string) error
- func (db *DB) DeleteHistory(id, datetime string) error
- func (db *DB) ExportAll(filePath string) error
- func (db *DB) GetByAlias(alias string) (items []*Mima)
- func (db *DB) GetByID(id string) (i int, m *Mima, err error)
- func (db *DB) Init(password string) error
- func (db *DB) Insert(m *Mima) error
- func (db *DB) IsEmpty() bool
- func (db *DB) IsReady() bool
- func (db *DB) Len() int
- func (db *DB) RecoverByID(id string) error
- func (db *DB) RecycleByID(id string) error
- func (db *DB) Reset()
- func (db *DB) Update(form *EditForm) error
- func (db *DB) WriteDatabase(filePath string) error
- type EditForm
- type Mima
- type Nonce
- type Operation
- type SecretKey
Constants ¶
View Source
const ( KeySize = 32 NonceSize = 24 )
Variables ¶
This section is empty.
Functions ¶
func RandomString64 ¶
func RandomString64() string
Types ¶
type DB ¶
type DB struct { HomeCache []*Mima RecycleCache []*Mima Directory string FullPath string // contains filtered or unexported fields }
func (*DB) ChangePassword ¶
func (*DB) CheckPassword ¶
func (*DB) DeleteForever ¶
func (*DB) DeleteHistory ¶
func (*DB) GetByAlias ¶
func (*DB) Insert ¶
Insert inserts a new Mima into the end of db.allItems. The db.allItems is sorted by Mima.UpdatedAt.
func (*DB) RecoverByID ¶
func (*DB) RecycleByID ¶
func (*DB) WriteDatabase ¶
Click to show internal directories.
Click to hide internal directories.