storage

package
v0.0.0-...-1149816 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2015 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) AddOrder

func (m *MgoStorage) AddOrder(order *core.Order) (err error)

func (*MgoStorage) DeleteOrder

func (m *MgoStorage) DeleteOrder(userId string, orderId string) (err error)

func (*MgoStorage) Order

func (m *MgoStorage) Order(userId string, orderId string) (order *core.Order, 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 (m *MgoStorage) PortfolioShare(userId string, hashTagName string, strict bool) (tagShare *core.TagShare, err error)

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

func (*MgoStorage) Tags

func (m *MgoStorage) Tags() (hashTags []core.HashTag, err error)

Jump to

Keyboard shortcuts

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