repository

package
v0.0.0-...-9243632 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BacktestTable = `` /* 1039-byte string literal not displayed */
View Source
const ExecutionTable = `` /* 2432-byte string literal not displayed */
View Source
const SessionTable = `` /* 991-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateTables

func CreateTables(ctx context.Context, conn *pgxpool.Pool) error

func Recreate

func Recreate(ctx context.Context, conn *pgxpool.Pool) error

Types

type Backtest

type Backtest struct {
	Conn postgres.Query
}

func (*Backtest) Create

func (db *Backtest) Create(ctx context.Context, name string,
	start, end *pb_internal.Date, symbols []string, benchmark *string,
) (*pb.Backtest, error)

func (*Backtest) Delete

func (db *Backtest) Delete(ctx context.Context, name string) error

func (*Backtest) Get

func (db *Backtest) Get(ctx context.Context, name string) (*pb.Backtest, error)

func (*Backtest) GetUniverse

func (db *Backtest) GetUniverse(ctx context.Context) (*pb_internal.Date, *pb_internal.Date, []string, error)

func (*Backtest) List

func (db *Backtest) List(ctx context.Context) ([]*pb.Backtest, error)

func (*Backtest) Update

func (db *Backtest) Update(ctx context.Context, name string,
	start, end *pb_internal.Date, symbols []string, benchmark *string,
) (*pb.Backtest, error)

func (*Backtest) UpdateStatus

func (db *Backtest) UpdateStatus(ctx context.Context, name string, status pb.Backtest_Status_Status, err error) error

type Execution

type Execution struct {
	Conn postgres.Query
}

func (*Execution) Create

func (db *Execution) Create(ctx context.Context, session string, start, end *internal_pb.Date,
	symbols []string, benchmark *string,
) (*pb.Execution, error)

func (*Execution) Get

func (db *Execution) Get(ctx context.Context, executionId string) (*pb.Execution, error)

func (*Execution) GetPeriods

func (db *Execution) GetPeriods(ctx context.Context, executionId string) ([]*pb.Period, error)

func (*Execution) List

func (db *Execution) List(ctx context.Context) ([]*pb.Execution, error)

func (*Execution) ListByBacktest

func (db *Execution) ListByBacktest(ctx context.Context, backtest string) ([]*pb.Execution, error)

func (*Execution) ListBySession

func (db *Execution) ListBySession(ctx context.Context, session string) ([]*pb.Execution, error)

func (*Execution) StorePeriods

func (db *Execution) StorePeriods(ctx context.Context, execution string, periods []*pb.Period) error

func (*Execution) UpdateSimulationDetails

func (db *Execution) UpdateSimulationDetails(ctx context.Context, e *pb.Execution) error

func (*Execution) UpdateStatus

func (db *Execution) UpdateStatus(ctx context.Context, executionId string, status pb.Execution_Status_Status, err error) error

type Session

type Session struct {
	Conn postgres.Query
}

func (*Session) Create

func (db *Session) Create(ctx context.Context, backtest string) (*pb.Session, error)

func (*Session) Get

func (db *Session) Get(ctx context.Context, sessionID string) (*pb.Session, error)

func (*Session) List

func (db *Session) List(ctx context.Context) ([]*pb.Session, error)

func (*Session) ListByBacktest

func (db *Session) ListByBacktest(ctx context.Context, backtest string) ([]*pb.Session, error)

func (*Session) UpdatePort

func (db *Session) UpdatePort(ctx context.Context, sessionID string, port int) error

func (*Session) UpdateStatus

func (db *Session) UpdateStatus(ctx context.Context, sessionId string, status pb.Session_Status_Status, err error) error

Jump to

Keyboard shortcuts

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