Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltClient ¶
type BoltClient struct {
// contains filtered or unexported fields
}
BoltClient is the implementation of `IBoltClient`.
func (*BoltClient) OpenBoltDB ¶
func (bc *BoltClient) OpenBoltDB()
OpenBoltDB opens a connection to BoltDB.
func (*BoltClient) QueryAccount ¶
func (bc *BoltClient) QueryAccount(accountID string) (model.Account, error)
QueryAccount find `Account` by `id`.
type IBoltClient ¶
type IBoltClient interface {
OpenBoltDB()
QueryAccount(accountID string) (model.Account, error)
Seed()
}
IBoltClient is an interface that interacts with BoltDB.
type MockBoltClient ¶
MockBoltClient is a mock implementation of a datastore client for testing purposes. Instead of the bolt.DB pointer, we're just putting a generic mock object from strechr/testify
func (*MockBoltClient) OpenBoltDB ¶
func (m *MockBoltClient) OpenBoltDB()
OpenBoltDB is a mock method.
func (*MockBoltClient) QueryAccount ¶
func (m *MockBoltClient) QueryAccount(accountID string) (model.Account, error)
QueryAccount return a mock account.
Click to show internal directories.
Click to hide internal directories.