ksql/examples/example_service/mocks.go

179 lines
6.1 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: contracts.go
// Package exampleservice is a generated GoMock package.
package exampleservice
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
ksql "github.com/vingarcia/ksql"
)
// MockSQLProvider is a mock of SQLProvider interface.
type MockSQLProvider struct {
ctrl *gomock.Controller
recorder *MockSQLProviderMockRecorder
}
// MockSQLProviderMockRecorder is the mock recorder for MockSQLProvider.
type MockSQLProviderMockRecorder struct {
mock *MockSQLProvider
}
// NewMockSQLProvider creates a new mock instance.
func NewMockSQLProvider(ctrl *gomock.Controller) *MockSQLProvider {
mock := &MockSQLProvider{ctrl: ctrl}
mock.recorder = &MockSQLProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSQLProvider) EXPECT() *MockSQLProviderMockRecorder {
return m.recorder
}
// Delete mocks base method.
func (m *MockSQLProvider) Delete(ctx context.Context, ids ...interface{}) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range ids {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Delete", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockSQLProviderMockRecorder) Delete(ctx interface{}, ids ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, ids...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSQLProvider)(nil).Delete), varargs...)
}
// Exec mocks base method.
func (m *MockSQLProvider) Exec(ctx context.Context, query string, params ...interface{}) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, query}
for _, a := range params {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Exec", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Exec indicates an expected call of Exec.
func (mr *MockSQLProviderMockRecorder) Exec(ctx, query interface{}, params ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, query}, params...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockSQLProvider)(nil).Exec), varargs...)
}
// Insert mocks base method.
func (m *MockSQLProvider) Insert(ctx context.Context, records ...interface{}) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range records {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Insert", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Insert indicates an expected call of Insert.
func (mr *MockSQLProviderMockRecorder) Insert(ctx interface{}, records ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, records...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockSQLProvider)(nil).Insert), varargs...)
}
// Query mocks base method.
func (m *MockSQLProvider) Query(ctx context.Context, records interface{}, query string, params ...interface{}) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, records, query}
for _, a := range params {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Query", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Query indicates an expected call of Query.
func (mr *MockSQLProviderMockRecorder) Query(ctx, records, query interface{}, params ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, records, query}, params...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockSQLProvider)(nil).Query), varargs...)
}
// QueryChunks mocks base method.
func (m *MockSQLProvider) QueryChunks(ctx context.Context, parser ksql.ChunkParser) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryChunks", ctx, parser)
ret0, _ := ret[0].(error)
return ret0
}
// QueryChunks indicates an expected call of QueryChunks.
func (mr *MockSQLProviderMockRecorder) QueryChunks(ctx, parser interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryChunks", reflect.TypeOf((*MockSQLProvider)(nil).QueryChunks), ctx, parser)
}
// QueryOne mocks base method.
func (m *MockSQLProvider) QueryOne(ctx context.Context, record interface{}, query string, params ...interface{}) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, record, query}
for _, a := range params {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "QueryOne", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// QueryOne indicates an expected call of QueryOne.
func (mr *MockSQLProviderMockRecorder) QueryOne(ctx, record, query interface{}, params ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, record, query}, params...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOne", reflect.TypeOf((*MockSQLProvider)(nil).QueryOne), varargs...)
}
// Transaction mocks base method.
func (m *MockSQLProvider) Transaction(ctx context.Context, fn func(ksql.SQLProvider) error) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Transaction", ctx, fn)
ret0, _ := ret[0].(error)
return ret0
}
// Transaction indicates an expected call of Transaction.
func (mr *MockSQLProviderMockRecorder) Transaction(ctx, fn interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transaction", reflect.TypeOf((*MockSQLProvider)(nil).Transaction), ctx, fn)
}
// Update mocks base method.
func (m *MockSQLProvider) Update(ctx context.Context, records ...interface{}) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range records {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Update", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockSQLProviderMockRecorder) Update(ctx interface{}, records ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, records...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockSQLProvider)(nil).Update), varargs...)
}