price

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpsertAll

func UpsertAll(db *gorm.DB, commodityType CommodityType, commodityID string, prices []*Price)

Types

type CommodityType

type CommodityType string
const (
	MutualFund CommodityType = "mutualfund"
	NPS        CommodityType = "nps"
	Stock      CommodityType = "stock"
)

type Price

type Price struct {
	ID            uint          `gorm:"primaryKey" json:"id"`
	Date          time.Time     `json:"date"`
	CommodityType CommodityType `json:"commodity_type"`
	CommodityID   string        `json:"commodity_id"`
	CommodityName string        `json:"commodity_name"`
	Value         float64       `json:"value"`
}

func (Price) Less

func (p Price) Less(o btree.Item) bool

Jump to

Keyboard shortcuts

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