safe

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2016 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backup added in v0.3.0

func Backup(client backends.Client) error

Types

type Account

type Account struct {
	Name      string `json:"name"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	CreatedOn int64  `json:"createdOn"`
}

func NewAccount

func NewAccount(name, username, password string) *Account

type Safe

type Safe struct {
	Config *config.Config

	Accounts map[string]Account `json:"accounts"`
	// contains filtered or unexported fields
}

func Load

func Load(password []byte, backend backends.Client, encryptionClient crypto.Client, config *config.Config) (*Safe, error)

func (*Safe) Add

func (s *Safe) Add(name, username, password string) (*Account, error)

func (*Safe) Get added in v0.3.0

func (s *Safe) Get(name string) (*Account, error)

func (*Safe) List

func (s *Safe) List() []Account

func (*Safe) Remove

func (s *Safe) Remove(name string) error

func (*Safe) Replace added in v0.3.0

func (s *Safe) Replace(name, username, password string) (*Account, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL