Documentation ¶
Overview ¶
Package db is a generated GoMock package.
Index ¶
- Constants
- Variables
- type BacktestSuite
- type LockedBacktestCallback
- type MockPort
- func (m *MockPort) CreateBacktest(ctx context.Context, bt *backtest.Backtest) error
- func (m *MockPort) DeleteBacktest(ctx context.Context, bt backtest.Backtest) error
- func (m *MockPort) EXPECT() *MockPortMockRecorder
- func (m *MockPort) LockedBacktest(ctx context.Context, id uint, fn LockedBacktestCallback) error
- func (m *MockPort) ReadBacktest(ctx context.Context, id uint) (backtest.Backtest, error)
- func (m *MockPort) UpdateBacktest(ctx context.Context, bt backtest.Backtest) error
- type MockPortMockRecorder
- func (mr *MockPortMockRecorder) CreateBacktest(ctx, bt interface{}) *gomock.Call
- func (mr *MockPortMockRecorder) DeleteBacktest(ctx, bt interface{}) *gomock.Call
- func (mr *MockPortMockRecorder) LockedBacktest(ctx, id, fn interface{}) *gomock.Call
- func (mr *MockPortMockRecorder) ReadBacktest(ctx, id interface{}) *gomock.Call
- func (mr *MockPortMockRecorder) UpdateBacktest(ctx, bt interface{}) *gomock.Call
- type Port
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 BacktestSuite ¶
func (*BacktestSuite) TestCreateRead ¶
func (suite *BacktestSuite) TestCreateRead()
func (*BacktestSuite) TestDelete ¶
func (suite *BacktestSuite) TestDelete()
func (*BacktestSuite) TestDeleteInexistant ¶
func (suite *BacktestSuite) TestDeleteInexistant()
func (*BacktestSuite) TestLock ¶
func (suite *BacktestSuite) TestLock()
func (*BacktestSuite) TestUpdate ¶
func (suite *BacktestSuite) TestUpdate()
type LockedBacktestCallback ¶
type MockPort ¶
type MockPort struct {
// contains filtered or unexported fields
}
MockPort is a mock of Port interface.
func NewMockPort ¶
func NewMockPort(ctrl *gomock.Controller) *MockPort
NewMockPort creates a new mock instance.
func (*MockPort) CreateBacktest ¶
CreateBacktest mocks base method.
func (*MockPort) DeleteBacktest ¶
DeleteBacktest mocks base method.
func (*MockPort) EXPECT ¶
func (m *MockPort) EXPECT() *MockPortMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPort) LockedBacktest ¶
LockedBacktest mocks base method.
func (*MockPort) ReadBacktest ¶
ReadBacktest mocks base method.
type MockPortMockRecorder ¶
type MockPortMockRecorder struct {
// contains filtered or unexported fields
}
MockPortMockRecorder is the mock recorder for MockPort.
func (*MockPortMockRecorder) CreateBacktest ¶
func (mr *MockPortMockRecorder) CreateBacktest(ctx, bt interface{}) *gomock.Call
CreateBacktest indicates an expected call of CreateBacktest.
func (*MockPortMockRecorder) DeleteBacktest ¶
func (mr *MockPortMockRecorder) DeleteBacktest(ctx, bt interface{}) *gomock.Call
DeleteBacktest indicates an expected call of DeleteBacktest.
func (*MockPortMockRecorder) LockedBacktest ¶
func (mr *MockPortMockRecorder) LockedBacktest(ctx, id, fn interface{}) *gomock.Call
LockedBacktest indicates an expected call of LockedBacktest.
func (*MockPortMockRecorder) ReadBacktest ¶
func (mr *MockPortMockRecorder) ReadBacktest(ctx, id interface{}) *gomock.Call
ReadBacktest indicates an expected call of ReadBacktest.
func (*MockPortMockRecorder) UpdateBacktest ¶
func (mr *MockPortMockRecorder) UpdateBacktest(ctx, bt interface{}) *gomock.Call
UpdateBacktest indicates an expected call of UpdateBacktest.
type Port ¶
type Port 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 }