Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Entries = make(map[string]*Entry)
map of uuid -> entry
View Source
var EntriesLock = lock.NewLock("ledger-entries-lock")
map of stock_uuid -> open shares
View Source
var EntriesPortfolioStock = make(map[string]map[string]*Entry)
View Source
var EntriesStockPortfolio = make(map[string]map[string]*Entry)
View Source
var NewEntriesLock = lock.NewLock("new-entries-lock")
Functions ¶
func DeleteLedger ¶
Types ¶
type Entry ¶
type Entry struct { objects.Ledger Lock *lock.Lock `json:"-"` UpdateChannel *duplicator.ChannelDuplicator `json:"-"` }
* Ledgers store who owns what stock They are all done though uuid strings since that's all that's required They are stored in two maps 1) given a stock uuid, get all portfolios that own it 2) given a portfolio uuid, get all stocks it owns
func GetAllLedgers ¶
func GetAllLedgers() []*Entry
/** get All ledgers so they can be sent on connection
func MakeLedgerEntry ¶
* Make a Ledger
func NewLedgerEntry ¶
* build a new ledger entry and generate a new uuid for it takes in the lock acquired since trade already owns the lock for the entries
Click to show internal directories.
Click to hide internal directories.