Documentation ¶
Overview ¶
Package engine defines interface of an Engine. The engine would know how to truncate a table
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { // Truncate a table Truncate(table string) error // Close db connection Close() error }
Engine is an interface for db interaction layer
func NewPostgresEngine ¶
NewPostgresEngine returns engine for Postgres db
type MockEngine ¶
MockEngine is an autogenerated mock type for the Engine type
func (*MockEngine) Close ¶
func (_m *MockEngine) Close() error
Close provides a mock function with given fields:
func (*MockEngine) Truncate ¶
func (_m *MockEngine) Truncate(table string) error
Truncate provides a mock function with given fields: table
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL dbEngine
func NewMySQLEngine ¶
NewMySQLEngine returns Mysql engine that knows how to truncate a table
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres dbEngine
type SQLite ¶ added in v2.3.0
type SQLite struct {
// contains filtered or unexported fields
}
MySQL dbEngine
func NewSqliteEngine ¶ added in v2.3.0
NewSQLiteEngine returns SQLite engine
Source Files ¶
Click to show internal directories.
Click to hide internal directories.