Documentation ¶
Index ¶
- Constants
- type MgoStorage
- func (m *MgoStorage) AddOrder(order *core.Order) (err error)
- func (m *MgoStorage) DeleteOrder(userId string, orderId string) (err error)
- func (m *MgoStorage) Order(userId string, orderId string) (order *core.Order, err error)
- func (m *MgoStorage) OrderCompleted(orderId string, status core.OrderResolution, notes string) (err error)
- func (m *MgoStorage) Orders(filters core.OrderFilter) (orders []core.Order, err error)
- func (m *MgoStorage) OrdersToExecute() (orders []core.Order, err error)
- func (m *MgoStorage) PortfolioBalance(userId string) (balance core.Balance, err error)
- func (m *MgoStorage) PortfolioShare(userId string, hashTagName string, strict bool) (tagShare *core.TagShare, err error)
- func (m *MgoStorage) PortfolioShares(userId string) (shares []core.TagShare, err error)
- func (m *MgoStorage) Tag(hashTagName string) (hashTag *core.HashTag, err error)
- func (m *MgoStorage) TagSetValue(hashTagName string, value float64) error
- func (m *MgoStorage) Tags() (hashTags []core.HashTag, err error)
Constants ¶
View Source
const ( BankCollectionName = "Bank" OrderCollectionName = "Orders" StartingFounds = 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MgoStorage ¶
type MgoStorage struct {
// contains filtered or unexported fields
}
func InitMongoStorage ¶
func InitMongoStorage(dbUrl string, dbName string) (*MgoStorage, error)
func (*MgoStorage) DeleteOrder ¶
func (m *MgoStorage) DeleteOrder(userId string, orderId string) (err error)
func (*MgoStorage) OrderCompleted ¶
func (m *MgoStorage) OrderCompleted(orderId string, status core.OrderResolution, notes string) (err error)
func (*MgoStorage) Orders ¶
func (m *MgoStorage) Orders(filters core.OrderFilter) (orders []core.Order, err error)
func (*MgoStorage) OrdersToExecute ¶
func (m *MgoStorage) OrdersToExecute() (orders []core.Order, err error)
func (*MgoStorage) PortfolioBalance ¶
func (m *MgoStorage) PortfolioBalance(userId string) (balance core.Balance, err error)
func (*MgoStorage) PortfolioShare ¶
func (*MgoStorage) PortfolioShares ¶
func (m *MgoStorage) PortfolioShares(userId string) (shares []core.TagShare, err error)
func (*MgoStorage) Tag ¶
func (m *MgoStorage) Tag(hashTagName string) (hashTag *core.HashTag, err error)
func (*MgoStorage) TagSetValue ¶
func (m *MgoStorage) TagSetValue(hashTagName string, value float64) error
Click to show internal directories.
Click to hide internal directories.