Documentation ¶
Overview ¶
Package migration is a generated GoMock package.
Index ¶
- Constants
- func Run(migrationsMap map[int64]Migrate, c *container.Container)
- type Cassandra
- type Clickhouse
- type Datasource
- type Logger
- type Migrate
- type MigrateFunc
- type MockClickhouse
- func (m *MockClickhouse) AsyncInsert(ctx context.Context, query string, wait bool, args ...any) error
- func (m *MockClickhouse) EXPECT() *MockClickhouseMockRecorder
- func (m *MockClickhouse) Exec(ctx context.Context, query string, args ...any) error
- func (m *MockClickhouse) HealthCheck(ctx context.Context) (any, error)
- func (m *MockClickhouse) Select(ctx context.Context, dest any, query string, args ...any) error
- type MockClickhouseMockRecorder
- func (mr *MockClickhouseMockRecorder) AsyncInsert(ctx, query, wait any, args ...any) *gomock.Call
- func (mr *MockClickhouseMockRecorder) Exec(ctx, query any, args ...any) *gomock.Call
- func (mr *MockClickhouseMockRecorder) HealthCheck(ctx any) *gomock.Call
- func (mr *MockClickhouseMockRecorder) Select(ctx, dest, query any, args ...any) *gomock.Call
- type MockPubSub
- type MockPubSubMockRecorder
- type MockRedis
- func (m *MockRedis) Del(ctx context.Context, keys ...string) *redis.IntCmd
- func (m *MockRedis) EXPECT() *MockRedisMockRecorder
- func (m *MockRedis) Get(ctx context.Context, key string) *redis.StringCmd
- func (m *MockRedis) Rename(ctx context.Context, key, newKey string) *redis.StatusCmd
- func (m *MockRedis) Set(ctx context.Context, key string, value any, expiration time.Duration) *redis.StatusCmd
- type MockRedisMockRecorder
- type MockSQL
- func (m *MockSQL) EXPECT() *MockSQLMockRecorder
- func (m *MockSQL) Exec(query string, args ...any) (sql.Result, error)
- func (m *MockSQL) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (m *MockSQL) Query(query string, args ...any) (*sql.Rows, error)
- func (m *MockSQL) QueryRow(query string, args ...any) *sql.Row
- func (m *MockSQL) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
- type MockSQLMockRecorder
- func (mr *MockSQLMockRecorder) Exec(query any, args ...any) *gomock.Call
- func (mr *MockSQLMockRecorder) ExecContext(ctx, query any, args ...any) *gomock.Call
- func (mr *MockSQLMockRecorder) Query(query any, args ...any) *gomock.Call
- func (mr *MockSQLMockRecorder) QueryRow(query any, args ...any) *gomock.Call
- func (mr *MockSQLMockRecorder) QueryRowContext(ctx, query any, args ...any) *gomock.Call
- type Mockmigrator
- type MockmigratorMockRecorder
- type PubSub
- type Redis
- type SQL
Constants ¶
const (
CheckAndCreateChMigrationTable = `` /* 266-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clickhouse ¶ added in v1.12.0
type Datasource ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Notice(args ...interface{}) Noticef(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) }
type Migrate ¶
type Migrate struct {
UP MigrateFunc
}
type MigrateFunc ¶
type MigrateFunc func(d Datasource) error
type MockClickhouse ¶ added in v1.12.0
type MockClickhouse struct {
// contains filtered or unexported fields
}
MockClickhouse is a mock of Clickhouse interface.
func NewMockClickhouse ¶ added in v1.12.0
func NewMockClickhouse(ctrl *gomock.Controller) *MockClickhouse
NewMockClickhouse creates a new mock instance.
func (*MockClickhouse) AsyncInsert ¶ added in v1.12.0
func (m *MockClickhouse) AsyncInsert(ctx context.Context, query string, wait bool, args ...any) error
AsyncInsert mocks base method.
func (*MockClickhouse) EXPECT ¶ added in v1.12.0
func (m *MockClickhouse) EXPECT() *MockClickhouseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClickhouse) HealthCheck ¶ added in v1.13.0
func (m *MockClickhouse) HealthCheck(ctx context.Context) (any, error)
HealthCheck mocks base method.
type MockClickhouseMockRecorder ¶ added in v1.12.0
type MockClickhouseMockRecorder struct {
// contains filtered or unexported fields
}
MockClickhouseMockRecorder is the mock recorder for MockClickhouse.
func (*MockClickhouseMockRecorder) AsyncInsert ¶ added in v1.12.0
func (mr *MockClickhouseMockRecorder) AsyncInsert(ctx, query, wait any, args ...any) *gomock.Call
AsyncInsert indicates an expected call of AsyncInsert.
func (*MockClickhouseMockRecorder) Exec ¶ added in v1.12.0
func (mr *MockClickhouseMockRecorder) Exec(ctx, query any, args ...any) *gomock.Call
Exec indicates an expected call of Exec.
func (*MockClickhouseMockRecorder) HealthCheck ¶ added in v1.13.0
func (mr *MockClickhouseMockRecorder) HealthCheck(ctx any) *gomock.Call
HealthCheck indicates an expected call of HealthCheck.
type MockPubSub ¶ added in v1.12.0
type MockPubSub struct {
// contains filtered or unexported fields
}
MockPubSub is a mock of PubSub interface.
func NewMockPubSub ¶ added in v1.12.0
func NewMockPubSub(ctrl *gomock.Controller) *MockPubSub
NewMockPubSub creates a new mock instance.
func (*MockPubSub) CreateTopic ¶ added in v1.12.0
func (m *MockPubSub) CreateTopic(context context.Context, name string) error
CreateTopic mocks base method.
func (*MockPubSub) DeleteTopic ¶ added in v1.12.0
func (m *MockPubSub) DeleteTopic(context context.Context, name string) error
DeleteTopic mocks base method.
func (*MockPubSub) EXPECT ¶ added in v1.12.0
func (m *MockPubSub) EXPECT() *MockPubSubMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPubSubMockRecorder ¶ added in v1.12.0
type MockPubSubMockRecorder struct {
// contains filtered or unexported fields
}
MockPubSubMockRecorder is the mock recorder for MockPubSub.
func (*MockPubSubMockRecorder) CreateTopic ¶ added in v1.12.0
func (mr *MockPubSubMockRecorder) CreateTopic(context, name any) *gomock.Call
CreateTopic indicates an expected call of CreateTopic.
func (*MockPubSubMockRecorder) DeleteTopic ¶ added in v1.12.0
func (mr *MockPubSubMockRecorder) DeleteTopic(context, name any) *gomock.Call
DeleteTopic indicates an expected call of DeleteTopic.
type MockRedis ¶ added in v1.12.0
type MockRedis struct {
// contains filtered or unexported fields
}
MockRedis is a mock of Redis interface.
func NewMockRedis ¶ added in v1.12.0
func NewMockRedis(ctrl *gomock.Controller) *MockRedis
NewMockRedis creates a new mock instance.
func (*MockRedis) EXPECT ¶ added in v1.12.0
func (m *MockRedis) EXPECT() *MockRedisMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRedisMockRecorder ¶ added in v1.12.0
type MockRedisMockRecorder struct {
// contains filtered or unexported fields
}
MockRedisMockRecorder is the mock recorder for MockRedis.
func (*MockRedisMockRecorder) Del ¶ added in v1.12.0
func (mr *MockRedisMockRecorder) Del(ctx any, keys ...any) *gomock.Call
Del indicates an expected call of Del.
func (*MockRedisMockRecorder) Get ¶ added in v1.12.0
func (mr *MockRedisMockRecorder) Get(ctx, key any) *gomock.Call
Get indicates an expected call of Get.
type MockSQL ¶ added in v1.12.0
type MockSQL struct {
// contains filtered or unexported fields
}
MockSQL is a mock of SQL interface.
func NewMockSQL ¶ added in v1.12.0
func NewMockSQL(ctrl *gomock.Controller) *MockSQL
NewMockSQL creates a new mock instance.
func (*MockSQL) EXPECT ¶ added in v1.12.0
func (m *MockSQL) EXPECT() *MockSQLMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSQL) ExecContext ¶ added in v1.12.0
ExecContext mocks base method.
type MockSQLMockRecorder ¶ added in v1.12.0
type MockSQLMockRecorder struct {
// contains filtered or unexported fields
}
MockSQLMockRecorder is the mock recorder for MockSQL.
func (*MockSQLMockRecorder) Exec ¶ added in v1.12.0
func (mr *MockSQLMockRecorder) Exec(query any, args ...any) *gomock.Call
Exec indicates an expected call of Exec.
func (*MockSQLMockRecorder) ExecContext ¶ added in v1.12.0
func (mr *MockSQLMockRecorder) ExecContext(ctx, query any, args ...any) *gomock.Call
ExecContext indicates an expected call of ExecContext.
func (*MockSQLMockRecorder) Query ¶ added in v1.12.0
func (mr *MockSQLMockRecorder) Query(query any, args ...any) *gomock.Call
Query indicates an expected call of Query.
func (*MockSQLMockRecorder) QueryRow ¶ added in v1.12.0
func (mr *MockSQLMockRecorder) QueryRow(query any, args ...any) *gomock.Call
QueryRow indicates an expected call of QueryRow.
func (*MockSQLMockRecorder) QueryRowContext ¶ added in v1.12.0
func (mr *MockSQLMockRecorder) QueryRowContext(ctx, query any, args ...any) *gomock.Call
QueryRowContext indicates an expected call of QueryRowContext.
type Mockmigrator ¶ added in v1.12.0
type Mockmigrator struct {
// contains filtered or unexported fields
}
Mockmigrator is a mock of migrator interface.
func NewMockmigrator ¶ added in v1.12.0
func NewMockmigrator(ctrl *gomock.Controller) *Mockmigrator
NewMockmigrator creates a new mock instance.
func (*Mockmigrator) EXPECT ¶ added in v1.12.0
func (m *Mockmigrator) EXPECT() *MockmigratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockmigratorMockRecorder ¶ added in v1.12.0
type MockmigratorMockRecorder struct {
// contains filtered or unexported fields
}
MockmigratorMockRecorder is the mock recorder for Mockmigrator.
type Redis ¶ added in v1.12.0
type Redis interface { Get(ctx context.Context, key string) *goRedis.StringCmd Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *goRedis.StatusCmd Del(ctx context.Context, keys ...string) *goRedis.IntCmd Rename(ctx context.Context, key, newKey string) *goRedis.StatusCmd }
type SQL ¶ added in v1.12.0
type SQL interface { Query(query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row Exec(query string, args ...interface{}) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) }