backtests

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CollectionName is the name of the collection in the database
	CollectionName = "backtests"
)

Variables

View Source
var (
	// ErrNilID is returned when the ID is nil
	ErrNilID = fmt.Errorf("ID is nil")
)

Functions

This section is empty.

Types

type Adapter

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

func New

func New(ctx context.Context, c config.Mongo) (*Adapter, error)

func (*Adapter) CreateBacktest

func (a *Adapter) CreateBacktest(ctx context.Context, bt backtest.Backtest) error

func (*Adapter) CreateIndexes

func (a *Adapter) CreateIndexes() error

func (*Adapter) DeleteBacktest

func (a *Adapter) DeleteBacktest(ctx context.Context, bt backtest.Backtest) error

func (*Adapter) ListBacktests

func (a *Adapter) ListBacktests(ctx context.Context) ([]backtest.Backtest, error)

func (*Adapter) LockedBacktest

func (a *Adapter) LockedBacktest(ctx context.Context, id uuid.UUID, fn port.LockedBacktestCallback) (err error)

func (*Adapter) ReadBacktest

func (a *Adapter) ReadBacktest(ctx context.Context, id uuid.UUID) (backtest.Backtest, error)

func (*Adapter) Reset

func (a *Adapter) Reset(ctx context.Context) error

func (*Adapter) UpdateBacktest

func (a *Adapter) UpdateBacktest(ctx context.Context, bt backtest.Backtest) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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