mock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDB

type MockDB struct {
	Username        string
	Password        string
	RefreshToken    string
	TwoFactorSecret string
	KdfIterations   int
}

mock database used for testing

func (*MockDB) AddAccount

func (db *MockDB) AddAccount(acc bw.Account) error

func (*MockDB) AddFolder

func (db *MockDB) AddFolder(name string, owner string) (bw.Folder, error)

func (*MockDB) Close

func (db *MockDB) Close()

func (*MockDB) DeleteCipher

func (db *MockDB) DeleteCipher(owner string, ciphID string) error

func (*MockDB) GetAccount

func (db *MockDB) GetAccount(username string, refreshtoken string) (bw.Account, error)

func (*MockDB) GetCipher

func (db *MockDB) GetCipher(owner string, ciphID string) (bw.Cipher, error)

func (*MockDB) GetCiphers

func (db *MockDB) GetCiphers(owner string) ([]bw.Cipher, error)

func (*MockDB) GetFolders

func (db *MockDB) GetFolders(owner string) ([]bw.Folder, error)

func (*MockDB) Init

func (db *MockDB) Init() error

func (*MockDB) NewCipher

func (db *MockDB) NewCipher(ciph bw.Cipher, owner string) (bw.Cipher, error)

func (*MockDB) Open

func (db *MockDB) Open() error

func (*MockDB) SetDir

func (db *MockDB) SetDir(d string)

func (*MockDB) Update2FAsecret

func (db *MockDB) Update2FAsecret(secret string, email string) error

func (*MockDB) UpdateAccountInfo

func (db *MockDB) UpdateAccountInfo(acc bw.Account) error

func (*MockDB) UpdateCipher

func (db *MockDB) UpdateCipher(newData bw.Cipher, owner string, ciphID string) error

Jump to

Keyboard shortcuts

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