Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDatabase ¶
type MockDatabase struct{}
MockDatabase Mock for model.Database
func (*MockDatabase) Connect ¶
func (m *MockDatabase) Connect(dbFile string) error
Connect Mock the connect method
type MockGiphyExtractor ¶
type MockGiphyExtractor struct {
CalledTimes int
}
MockGiphyExtractor Mock the Giphy Extractor interface
func (*MockGiphyExtractor) ExtractContentsAndSearchAPI ¶
func (m *MockGiphyExtractor) ExtractContentsAndSearchAPI(s string) string
ExtractContentsAndSearchAPI Mock the full call
type MockGiphy_SingleRow ¶
type MockGiphy_SingleRow struct {
MockRowsEmpty
RowNumber int
}
MockGiphy_SingleRow Mock single row for the Giphy API
func (*MockGiphy_SingleRow) Scan ¶
func (m *MockGiphy_SingleRow) Scan(dest ...interface{}) error
Scan Return the data
type MockJournal_MultipleRows ¶
type MockJournal_MultipleRows struct {
MockRowsEmpty
RowNumber int
}
MockJournal_MultipleRows Mock multiple rows returned for a Journal
func (*MockJournal_MultipleRows) Next ¶
func (m *MockJournal_MultipleRows) Next() bool
Next Mock 2 rows
func (*MockJournal_MultipleRows) Scan ¶
func (m *MockJournal_MultipleRows) Scan(dest ...interface{}) error
Scan Return the data
type MockJournal_SingleRow ¶
type MockJournal_SingleRow struct {
MockRowsEmpty
RowNumber int
}
MockJournal_SingleRow Mock single row returned for a Journal
func (*MockJournal_SingleRow) Scan ¶
func (m *MockJournal_SingleRow) Scan(dest ...interface{}) error
Scan Return the data
type MockResult ¶
type MockResult struct{}
MockResult Mock the result for a saved Journal
func (*MockResult) LastInsertId ¶
func (m *MockResult) LastInsertId() (int64, error)
LastInsertId Mock the last inserted ID
func (*MockResult) RowsAffected ¶
func (m *MockResult) RowsAffected() (int64, error)
RowsAffected Mock the rows affected
type MockRowsEmpty ¶
type MockRowsEmpty struct{}
MockRowsEmpty An empty row set
func (*MockRowsEmpty) Columns ¶
func (m *MockRowsEmpty) Columns() ([]string, error)
Columns Mock columns method
type MockSqlite ¶
type MockSqlite struct {
Closed bool
Connected bool
ErrorAtQuery int
ErrorMode bool
ExpectedArgument string
Queries int
Result sql.Result
Rows rows.Rows
}
MockSqlite Mock model.Sqlite allowing injected results, rows and errors
func (*MockSqlite) Connect ¶
func (m *MockSqlite) Connect(dbFile string) error
Connect Mark as connected