benchmark

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: GPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchmarkHandlerImpl

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

func NewBenchmarkHandler

func NewBenchmarkHandler(userStore types.UserStore, benchmarkStore types.BenchmarkStore, logger *slog.Logger) *BenchmarkHandlerImpl

func (*BenchmarkHandlerImpl) CreateBenchmark

func (h *BenchmarkHandlerImpl) CreateBenchmark(c fiber.Ctx) error

func (*BenchmarkHandlerImpl) DeleteBenchmark

func (h *BenchmarkHandlerImpl) DeleteBenchmark(c fiber.Ctx) error

func (*BenchmarkHandlerImpl) GetBenchmarkById

func (h *BenchmarkHandlerImpl) GetBenchmarkById(c fiber.Ctx) error

func (*BenchmarkHandlerImpl) GetBenchmarks

func (h *BenchmarkHandlerImpl) GetBenchmarks(c fiber.Ctx) error

func (*BenchmarkHandlerImpl) UpdateBenchmark

func (h *BenchmarkHandlerImpl) UpdateBenchmark(c fiber.Ctx) error

type CreateBenchmarkPayload

type CreateBenchmarkPayload struct {
	Name             string                     `json:"name"`
	Description      string                     `json:"description"`
	Asset_allocation []types.AssetAllocationPct `json:"asset_allocation"`
	Std_dev_pct      float32                    `json:"std_dev_pct"`
	Real_return_pct  float32                    `json:"real_return_pct"`
	Drawdown_yrs     int                        `json:"drawdown_yrs"`
	Is_deprecated    bool                       `json:"is_deprecated"`
}

func (CreateBenchmarkPayload) Validate

func (p CreateBenchmarkPayload) Validate() error

type DeleteBenchmarkById

type DeleteBenchmarkById struct {
	Id int
}

func (DeleteBenchmarkById) Validate

func (p DeleteBenchmarkById) Validate() error

type GetBenchmarkByIdParams

type GetBenchmarkByIdParams struct {
	Id int
}

func (GetBenchmarkByIdParams) Validate

func (p GetBenchmarkByIdParams) Validate() error

type GetBenchmarksQuery

type GetBenchmarksQuery struct {
	Ids           []int  `json:"ids"`
	Name          string `json:"name"`
	Is_deprecated string `json:"is_deprecated"`

	types.PaginationQuery
}

func (GetBenchmarksQuery) Validate

func (q GetBenchmarksQuery) Validate() error

type PostgresBenchmarkStore

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

func NewPostgresBenchmarkStore

func NewPostgresBenchmarkStore(db *pgxpool.Pool, logger *slog.Logger) *PostgresBenchmarkStore

func (*PostgresBenchmarkStore) CreateBenchmark

func (s *PostgresBenchmarkStore) CreateBenchmark(ctx context.Context, b *types.Benchmark) (types.Benchmark, error)

func (*PostgresBenchmarkStore) DeleteBenchmark

func (s *PostgresBenchmarkStore) DeleteBenchmark(ctx context.Context, userId, benchmarkId int) (types.Benchmark, error)

func (*PostgresBenchmarkStore) GetBenchmarkById

func (s *PostgresBenchmarkStore) GetBenchmarkById(ctx context.Context, userId, benchmarkId int) (types.Benchmark, error)

func (*PostgresBenchmarkStore) GetBenchmarkByName

func (s *PostgresBenchmarkStore) GetBenchmarkByName(ctx context.Context, name string, userId int) (types.Benchmark, error)

func (*PostgresBenchmarkStore) GetBenchmarks

func (*PostgresBenchmarkStore) UpdateBenchmark

func (s *PostgresBenchmarkStore) UpdateBenchmark(ctx context.Context, b *types.Benchmark) (types.Benchmark, error)

type UpdateBenchmarkById

type UpdateBenchmarkById struct {
	Id int
}

func (UpdateBenchmarkById) Validate

func (p UpdateBenchmarkById) Validate() error

type UpdateBenchmarkPayload

type UpdateBenchmarkPayload struct {
	Name             string                     `json:"name"`
	Description      string                     `json:"description"`
	Asset_allocation []types.AssetAllocationPct `json:"asset_allocation"`
	Std_dev_pct      float32                    `json:"std_dev_pct"`
	Real_return_pct  float32                    `json:"real_return_pct"`
	Drawdown_yrs     int                        `json:"drawdown_yrs"`
	Is_deprecated    bool                       `json:"is_deprecated"`
}

func (UpdateBenchmarkPayload) Validate

func (p UpdateBenchmarkPayload) Validate() error

Jump to

Keyboard shortcuts

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