Documentation ¶
Overview ¶
Package db is a generated GoMock package.
Index ¶
- Constants
- Variables
- type Adapter
- type LockedBacktestCallback
- type MockAdapter
- func (m *MockAdapter) CreateBacktest(ctx context.Context, bt *backtest.Backtest) error
- func (m *MockAdapter) DeleteBacktest(ctx context.Context, bt backtest.Backtest) error
- func (m *MockAdapter) EXPECT() *MockAdapterMockRecorder
- func (m *MockAdapter) LockedBacktest(ctx context.Context, id uint, fn LockedBacktestCallback) error
- func (m *MockAdapter) ReadBacktest(ctx context.Context, id uint) (backtest.Backtest, error)
- func (m *MockAdapter) UpdateBacktest(ctx context.Context, bt backtest.Backtest) error
- type MockAdapterMockRecorder
- func (mr *MockAdapterMockRecorder) CreateBacktest(ctx, bt interface{}) *gomock.Call
- func (mr *MockAdapterMockRecorder) DeleteBacktest(ctx, bt interface{}) *gomock.Call
- func (mr *MockAdapterMockRecorder) LockedBacktest(ctx, id, fn interface{}) *gomock.Call
- func (mr *MockAdapterMockRecorder) ReadBacktest(ctx, id interface{}) *gomock.Call
- func (mr *MockAdapterMockRecorder) UpdateBacktest(ctx, bt interface{}) *gomock.Call
Constants ¶
const ( Expiration = 3 * time.Second RetryDelay = 100 * time.Millisecond Tries = 20 )
Variables ¶
var ( ErrRecordNotFound = errors.New("record not found") ErrNotImplemented = errors.New("not implemented") )
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { CreateBacktest(ctx context.Context, bt *backtest.Backtest) error ReadBacktest(ctx context.Context, id uint) (backtest.Backtest, error) UpdateBacktest(ctx context.Context, bt backtest.Backtest) error DeleteBacktest(ctx context.Context, bt backtest.Backtest) error LockedBacktest(ctx context.Context, id uint, fn LockedBacktestCallback) error }
type LockedBacktestCallback ¶
type MockAdapter ¶
type MockAdapter struct {
// contains filtered or unexported fields
}
MockAdapter is a mock of Adapter interface.
func NewMockAdapter ¶
func NewMockAdapter(ctrl *gomock.Controller) *MockAdapter
NewMockAdapter creates a new mock instance.
func (*MockAdapter) CreateBacktest ¶
CreateBacktest mocks base method.
func (*MockAdapter) DeleteBacktest ¶
DeleteBacktest mocks base method.
func (*MockAdapter) EXPECT ¶
func (m *MockAdapter) EXPECT() *MockAdapterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAdapter) LockedBacktest ¶
func (m *MockAdapter) LockedBacktest(ctx context.Context, id uint, fn LockedBacktestCallback) error
LockedBacktest mocks base method.
func (*MockAdapter) ReadBacktest ¶
ReadBacktest mocks base method.
func (*MockAdapter) UpdateBacktest ¶
UpdateBacktest mocks base method.
type MockAdapterMockRecorder ¶
type MockAdapterMockRecorder struct {
// contains filtered or unexported fields
}
MockAdapterMockRecorder is the mock recorder for MockAdapter.
func (*MockAdapterMockRecorder) CreateBacktest ¶
func (mr *MockAdapterMockRecorder) CreateBacktest(ctx, bt interface{}) *gomock.Call
CreateBacktest indicates an expected call of CreateBacktest.
func (*MockAdapterMockRecorder) DeleteBacktest ¶
func (mr *MockAdapterMockRecorder) DeleteBacktest(ctx, bt interface{}) *gomock.Call
DeleteBacktest indicates an expected call of DeleteBacktest.
func (*MockAdapterMockRecorder) LockedBacktest ¶
func (mr *MockAdapterMockRecorder) LockedBacktest(ctx, id, fn interface{}) *gomock.Call
LockedBacktest indicates an expected call of LockedBacktest.
func (*MockAdapterMockRecorder) ReadBacktest ¶
func (mr *MockAdapterMockRecorder) ReadBacktest(ctx, id interface{}) *gomock.Call
ReadBacktest indicates an expected call of ReadBacktest.
func (*MockAdapterMockRecorder) UpdateBacktest ¶
func (mr *MockAdapterMockRecorder) UpdateBacktest(ctx, bt interface{}) *gomock.Call
UpdateBacktest indicates an expected call of UpdateBacktest.