Documentation
¶
Index ¶
- type CreateSnapshotValueParams
- type CreateSnapshotValuePayload
- type DeleteSnapshotValueParams
- type GetSnapshotValueParams
- type GetSnapshotValuesParams
- type PostgresSnapshotValueStore
- func (s *PostgresSnapshotValueStore) CreateSnapshotValue(ctx context.Context, snapVals *types.SnapshotValue) (types.SnapshotValue, error)
- func (s *PostgresSnapshotValueStore) DeleteSnapshotValue(ctx context.Context, snapId, snapValId, userId int) (types.SnapshotValue, error)
- func (s *PostgresSnapshotValueStore) GetSnapshotValue(ctx context.Context, snapId, snapValId, userId int) (types.SnapshotValue, error)
- func (s *PostgresSnapshotValueStore) GetSnapshotValues(ctx context.Context, snapId, userId int) ([]types.SnapshotValue, error)
- func (s *PostgresSnapshotValueStore) UpdateSnapshotValue(ctx context.Context, sv *types.SnapshotValue) (types.SnapshotValue, error)
- type SnapshotValueHandlerImpl
- func (h *SnapshotValueHandlerImpl) CreateSnapshotValue(c fiber.Ctx) error
- func (h *SnapshotValueHandlerImpl) DeleteSnapshotValue(c fiber.Ctx) error
- func (h *SnapshotValueHandlerImpl) GetSnapshotValue(c fiber.Ctx) error
- func (h *SnapshotValueHandlerImpl) GetSnapshotValues(c fiber.Ctx) error
- func (h *SnapshotValueHandlerImpl) UpdateSnapshotValue(c fiber.Ctx) error
- type UpdateSnapshotValueParams
- type UpdateSnapshotValuePayload
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 ¶
func (s *PostgresSnapshotValueStore) UpdateSnapshotValue(ctx context.Context, sv *types.SnapshotValue) (types.SnapshotValue, error)
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
Source Files
¶
- handler.go
- handler_createsnapshotvalue.go
- handler_deletesnapshotvalue.go
- handler_getsnapshotvalue.go
- handler_getsnapshotvalues.go
- handler_updatesnapshotvalue.go
- schema_createsnapshotvalue.go
- schema_deletesnapshotvalue.go
- schema_getsnapshotvalue.go
- schema_getsnapshotvalues.go
- schema_updatesnapshotvalue.go
- store.go
- store_createsnapshotvalue.go
- store_deletesnapshotvalue.go
- store_getsnapshotvalue.go
- store_getsnapshotvalues.go
- store_updatesnapshotvalue.go
Click to show internal directories.
Click to hide internal directories.