db

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package db is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndicatorsSuite

type IndicatorsSuite struct {
	suite.Suite
	DB Port
}

func (*IndicatorsSuite) TestGet

func (suite *IndicatorsSuite) TestGet()

func (*IndicatorsSuite) TestUpsert

func (suite *IndicatorsSuite) TestUpsert()

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) EXPECT

func (m *MockPort) EXPECT() *MockPortMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPort) GetSMA

func (m *MockPort) GetSMA(ctx context.Context, payload ReadSMAPayload) (*timeserie.TimeSerie[float64], error)

GetSMA mocks base method.

func (*MockPort) UpsertSMA

func (m *MockPort) UpsertSMA(ctx context.Context, payload WriteSMAPayload) error

UpsertSMA mocks base method.

type MockPortMockRecorder

type MockPortMockRecorder struct {
	// contains filtered or unexported fields
}

MockPortMockRecorder is the mock recorder for MockPort.

func (*MockPortMockRecorder) GetSMA

func (mr *MockPortMockRecorder) GetSMA(ctx, payload interface{}) *gomock.Call

GetSMA indicates an expected call of GetSMA.

func (*MockPortMockRecorder) UpsertSMA

func (mr *MockPortMockRecorder) UpsertSMA(ctx, payload interface{}) *gomock.Call

UpsertSMA indicates an expected call of UpsertSMA.

type Port

type Port interface {
	GetSMA(ctx context.Context, payload ReadSMAPayload) (*timeserie.TimeSerie[float64], error)
	UpsertSMA(ctx context.Context, payload WriteSMAPayload) error
}

type ReadSMAPayload

type ReadSMAPayload struct {
	Exchange     string
	Pair         string
	Period       period.Symbol
	PeriodNumber int
	PriceType    candlestick.Price
	Start        time.Time
	End          time.Time
}

type WriteSMAPayload

type WriteSMAPayload struct {
	Exchange     string
	Pair         string
	Period       period.Symbol
	PeriodNumber int
	PriceType    candlestick.Price
	TimeSerie    *timeserie.TimeSerie[float64]
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL