Documentation ¶
Index ¶
- func CheckPassword(passwd string) error
- type Box
- func (box *Box) Add(pw *Password) (id string, new bool, err error)
- func (box *Box) Clear() ([]string, error)
- func (box *Box) Find(w io.Writer, word string, justPassword, justFirst bool) error
- func (box *Box) Init(masterPassword string) error
- func (box *Box) Inspect(w io.Writer, ids []string, all bool) error
- func (box *Box) List(w io.Writer, noHeader, showHidden bool) error
- func (box *Box) Remove(ids []string, all bool) ([]string, error)
- func (box *Box) RemoveByAccount(category, account string, all bool) ([]string, error)
- func (box *Box) Update(newMasterPassword string) error
- func (box *Box) Upgrade() (from, to int, err error)
- type BoxRepository
- type Password
- type PasswordBasic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Box ¶
Box represents password box
func (*Box) RemoveByAccount ¶
RemoveByAccount removes passwords by category and account
type BoxRepository ¶
BoxRepository define repo for storing passwords
func NewFileRepository ¶
func NewFileRepository(filename string) BoxRepository
NewFileRepository creates a FileRepository
func NewMemRepository ¶
func NewMemRepository(data []byte) BoxRepository
type Password ¶
type Password struct { PasswordBasic // Unique id of password ID string `cli:"id" usage:"Password id for updating"` // IVs AccountIV []byte `cli:"-"` PasswordIV []byte `cli:"-"` // Ciphers CipherAccount []byte `cli:"-"` CipherPassword []byte `cli:"-"` // Created time stamp CreatedAt int64 `cli:"-"` // Last updated time stamp LastUpdatedAt int64 `cli:"-"` }
Password represents entity of password
func NewEmptyPassword ¶
func NewEmptyPassword() *Password
NewEmptyPassword creates a empty Password entity
func NewPassword ¶
NewPassword creates a Password entity
type PasswordBasic ¶
type PasswordBasic struct { // Category of password Category string `cli:"c,category" usage:"Category of password"` // Plain account and password PlainAccount string `json:"-" cli:"u,account" usage:"Account of password"` PlainPassword string `json:"-" cli:"-"` // Website address for web password Site string `cli:"site" usage:"Website of password"` // Password tags Tags []string `cli:"tag" usage:"Tags of password"` // Extension information: JSON base64 string Ext string `cli:"-"` // Hidden ... Hidden bool `cli:"H,hidden" usage:"Whether to hide the password" dft:"false"` }
PasswordBasic is basic of Password
Click to show internal directories.
Click to hide internal directories.