* chore: Add new dbw dependency * refactor: Convert to use dbw.DB * refactor (db): Change GetTicket(...) signature * feature (db tests): Added TestDeleteWhere(...) Adding this allows us to eliminate a leak of the gorm library * refactor: Add ctx to ScanRows(...) signature This is required to refactor all the deprecated errors pkg calls. This refactor required adding a context to quite a few call chains and in particular the job scheduler bits * feature (db/tests): Add support for test opt: WithTestLogLevel(...) This test only option allows callers to specify a log level for the underlying db package (where supported/applicable) when calling TestSetup(...) * refactor (db): Simplify Db type Only store the underlying *DB and create the *RW on demand when needed. * refactor (oplog): Port to using dbw pkg for db operations * refactor (db): Remove gormDB(...) func * tests (db): Add unit tests for TestDeleteWhere(...) * chore: make fmt changes to formatting
11 lines
366 B
Go
11 lines
366 B
Go
package oplog
|
|
|
|
// ReplayableMessage defines an interface for messages that can be replayed from
|
|
// the oplog entries. we need to be able to replay into different table names.
|
|
type ReplayableMessage interface {
|
|
// TableName returns the table name of the resource
|
|
TableName() string
|
|
// SetTableName sets the table name of the resource
|
|
SetTableName(name string)
|
|
}
|