snapshotvalue

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSnapshotValueParams

type CreateSnapshotValueParams struct {
	Snap_id int `json:"snap_id"`
}

func (CreateSnapshotValueParams) Validate

func (p CreateSnapshotValueParams) Validate() error

type CreateSnapshotValuePayload

type CreateSnapshotValuePayload struct {
	Account_id     int     `json:"account_id"`
	Holding_id     int     `json:"holding_id"`
	Total          float64 `json:"total"`
	Skip_rebalance bool    `json:"skip_rebalance"`
}

func (CreateSnapshotValuePayload) Validate

func (p CreateSnapshotValuePayload) Validate() error

type DeleteSnapshotValueParams

type DeleteSnapshotValueParams struct {
	Snap_id     int `json:"snap_id"`
	Snap_val_id int `json:"snap_val_id"`
}

func (DeleteSnapshotValueParams) Validate

func (p DeleteSnapshotValueParams) Validate() error

type GetSnapshotValueParams

type GetSnapshotValueParams struct {
	Snap_id     int `json:"snap_id"`
	Snap_val_id int `json:"snap_val_id"`
}

func (GetSnapshotValueParams) Validate

func (p GetSnapshotValueParams) Validate() error

type GetSnapshotValuesParams

type GetSnapshotValuesParams struct {
	Snap_id int `json:"snap_id"`
}

func (GetSnapshotValuesParams) Validate

func (p GetSnapshotValuesParams) Validate() error

type PostgresSnapshotValueStore

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

func NewPostgresSnapshotValueStore

func NewPostgresSnapshotValueStore(db *pgxpool.Pool, logger *slog.Logger) *PostgresSnapshotValueStore

func (*PostgresSnapshotValueStore) CreateSnapshotValue

func (s *PostgresSnapshotValueStore) CreateSnapshotValue(ctx context.Context, snapVals *types.SnapshotValue) (types.SnapshotValue, error)

func (*PostgresSnapshotValueStore) DeleteSnapshotValue

func (s *PostgresSnapshotValueStore) DeleteSnapshotValue(ctx context.Context, snapId, snapValId, userId int) (types.SnapshotValue, error)

func (*PostgresSnapshotValueStore) GetSnapshotValue

func (s *PostgresSnapshotValueStore) GetSnapshotValue(ctx context.Context, snapId, snapValId, userId int) (types.SnapshotValue, error)

func (*PostgresSnapshotValueStore) GetSnapshotValues

func (s *PostgresSnapshotValueStore) GetSnapshotValues(ctx context.Context, snapId, userId int) ([]types.SnapshotValue, error)

func (*PostgresSnapshotValueStore) UpdateSnapshotValue

type SnapshotValueHandlerImpl

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

func NewSnapshotValueHandler

func NewSnapshotValueHandler(
	accountStore types.AccountStore,
	holdingStore types.HoldingStore,
	snapshotStore types.SnapshotStore,
	snapshotValueStore types.SnapshotValueStore,
	logger *slog.Logger,
) *SnapshotValueHandlerImpl

func (*SnapshotValueHandlerImpl) CreateSnapshotValue

func (h *SnapshotValueHandlerImpl) CreateSnapshotValue(c fiber.Ctx) error

func (*SnapshotValueHandlerImpl) DeleteSnapshotValue

func (h *SnapshotValueHandlerImpl) DeleteSnapshotValue(c fiber.Ctx) error

func (*SnapshotValueHandlerImpl) GetSnapshotValue

func (h *SnapshotValueHandlerImpl) GetSnapshotValue(c fiber.Ctx) error

func (*SnapshotValueHandlerImpl) GetSnapshotValues

func (h *SnapshotValueHandlerImpl) GetSnapshotValues(c fiber.Ctx) error

func (*SnapshotValueHandlerImpl) UpdateSnapshotValue

func (h *SnapshotValueHandlerImpl) UpdateSnapshotValue(c fiber.Ctx) error

type UpdateSnapshotValueParams

type UpdateSnapshotValueParams struct {
	Snap_id     int `json:"snap_id"`
	Snap_val_id int `json:"snap_val_id"`
}

func (UpdateSnapshotValueParams) Validate

func (p UpdateSnapshotValueParams) Validate() error

type UpdateSnapshotValuePayload

type UpdateSnapshotValuePayload struct {
	Account_id     int     `json:"account_id"`
	Holding_id     int     `json:"holding_id"`
	Total          float64 `json:"total"`
	Skip_rebalance bool    `json:"skip_rebalance"`
}

func (UpdateSnapshotValuePayload) Validate

func (p UpdateSnapshotValuePayload) Validate() error

Jump to

Keyboard shortcuts

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