Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/delta/dalal-street-server
/ functions
Functions
739 in github.com/delta/dalal-street-server
⨍
Functions
739
◇
Types & classes
147
↓ 1 callers
Function
mortgageStocksAction
mortgageStocksAction returns total transaction amount while mortgaging
models/MortgageDetail.go:44
↓ 1 callers
Function
newAskItem
(value *models.Ask, price uint64, quantity uint64)
matchingengine/pqueue.go:84
↓ 1 callers
Function
newBidItem
(value *models.Bid, price uint64, quantity uint64)
matchingengine/pqueue.go:76
↓ 1 callers
Function
newGameStateStream
newGameStateStream creates a new GameStateStream
datastreams/GameStateStream.go:27
↓ 1 callers
Function
newMarketDepthStream
newMarketDepthStream returns a new MarketDepthStream instance for a given stockId
datastreams/MarketDepth.go:64
↓ 1 callers
Function
newMarketEventsStream
newMarketEventsStream creates a new MarketEventsStream
datastreams/MarketEvents.go:25
↓ 1 callers
Function
newMyOrdersStream
newMyOrdersStream creates a new MyOrdersStream
datastreams/MyOrders.go:24
↓ 1 callers
Function
newNotificationsStream
newNotificationsStream creates a new NotificationStream
datastreams/Notifications.go:27
↓ 1 callers
Function
newStockExchangeStream
newStockExchangeStream creates a new StockExchangeStream
datastreams/StockExchange.go:32
↓ 1 callers
Function
newStockHistoryStream
newStockHistoryStream returns a new instance of StockHistoryStream
datastreams/StockHistory.go:25
↓ 1 callers
Function
newStockPricesStream
newStockPricesStream creates a new StockPricesStream
datastreams/StockPrices.go:31
↓ 1 callers
Function
newTransactionsStream
newTransactionsStream creates a new TransactionsStream
datastreams/Transactions.go:25
↓ 1 callers
Function
pad
(payload *bytes.Buffer, maxPadLen int)
models/PushNotification.go:350
↓ 1 callers
Function
recorderHigherIntervalOHLCs
retrieves relevant older number of records from the DB and then writes the required (5/10/30/60) intervals to the db
models/StockHistory.go:216
↓ 1 callers
Function
retrieveStocksAction
retrieveStocksAction returns total transaction amount and stock quantity which could be retrieved
models/MortgageDetail.go:87
↓ 1 callers
Method
run
run runs the marketDepthStream by updating the listeners ever 2 seconds
datastreams/MarketDepth.go:84
↓ 1 callers
Function
saveAskCancelOrderTransaction
saveAskCancelOrderTransaction creates a CancelOrderTransaction for Ask orders and pushses to stream
models/User.go:1308
↓ 1 callers
Function
saveNewUserState
saveNewUserState saves new user state i.e users who registers when dailyChallenge is open
models/DailyChallenge.go:741
↓ 1 callers
Function
saveTransSum
Helper for the deadlock test written below. If you want to test any table OTHER than TransactionSummary, all you need to do is update this helper func
models/User_test.go:901
↓ 1 callers
Function
saveUsersState
saveUsersState saves registered users cash,stockworth,Networth,specificstock quantity based on challenge type invoked inside OpenDailyChallenge
models/DailyChallenge.go:458
↓ 1 callers
Function
sendPushNotification
(message []byte, s *UserSubscription, options *options)
models/PushNotification.go:182
↓ 1 callers
Method
sink
(k int)
matchingengine/pqueue.go:372
↓ 1 callers
Method
sink
(k int)
matchingengine/pqueue.go:388
↓ 1 callers
Function
startStockHistoryRecorder
(interval time.Duration)
models/StockHistory.go:304
↓ 1 callers
Function
stopStockHistoryRecorder
()
models/StockHistory.go:83
↓ 1 callers
Method
swim
(k int)
matchingengine/pqueue.go:357
↓ 1 callers
Method
swim
(k int)
matchingengine/pqueue.go:364
↓ 1 callers
Function
updateUserState
updateUsersState updates userState when dailyChallenges Closes similiar to saveUsersState,invoked inside CloseDailyChallenge
models/DailyChallenge.go:284
↓ 1 callers
Method
waitForOrder
* * Method to wait for an incoming order on the channels */
matchingengine/OrderBook.go:611
↓ 1 callers
Function
writeUserDetailsToLog
(ctx context.Context)
grpcapi/actionservice/AuthActionService.go:19
Function
AbsInt64
(n int64)
utils/utils.go:73
Method
AddAskOrder
AddAskOrder adds an ask order to the relevant order book
matchingengine/MatchingEngine.go:72
Method
AddAskOrder
AddAskOrder mocks base method
mocks/mock_OrderBook.go:67
Method
AddAskOrder
AddAskOrder indicates an expected call of AddAskOrder
mocks/mock_OrderBook.go:72
Method
AddAskOrder
AddAskOrder mocks base method
mocks/mock_MatchingEngine.go:37
Method
AddAskOrder
AddAskOrder indicates an expected call of AddAskOrder
mocks/mock_MatchingEngine.go:42
Method
AddBidOrder
AddBidOrder adds a bid order to the relevant order book
matchingengine/MatchingEngine.go:77
Method
AddBidOrder
AddBidOrder mocks base method
mocks/mock_OrderBook.go:77
Method
AddBidOrder
AddBidOrder indicates an expected call of AddBidOrder
mocks/mock_OrderBook.go:82
Method
AddBidOrder
AddBidOrder mocks base method
mocks/mock_MatchingEngine.go:47
Method
AddBidOrder
AddBidOrder indicates an expected call of AddBidOrder
mocks/mock_MatchingEngine.go:52
Function
AddDailyChallenge
AddDailyChallenge add daily challenge to db, only Admin can invoke this function
models/DailyChallenge.go:133
Method
AddDailyChallenge
(ctx context.Context, req *actions_pb.AddDailyChallengeRequest)
grpcapi/actionservice/AdminActionService.go:632
Function
AddExtraCredit
AddExtraCredit Adds extra credit for the users
models/ReferralCode.go:107
Method
AddListener
AddListener mocks base method
mocks/mock_MarketDepth.go:36
Method
AddListener
AddListener indicates an expected call of AddListener
mocks/mock_MarketDepth.go:41
Method
AddListener
AddListener adds a listener to marketDepthStream
datastreams/MarketDepth.go:148
Method
AddListener
AddListener adds a listener to the StockHistory stream
datastreams/StockHistory.go:38
Method
AddListener
AddListener adds a listener to the MyOrders stream
datastreams/MarketEvents.go:50
Method
AddListener
AddListener adds a listener for a given user and connection
datastreams/GameStateStream.go:57
Method
AddListener
AddListener adds a listener for a given user and connection
datastreams/Notifications.go:57
Method
AddListener
AddListener adds a listener to the StockExchangeStream
datastreams/StockExchange.go:96
Method
AddListener
AddListener adds a listener to a group in a stream. Creates group if required
datastreams/MulticastStream.go:44
Method
AddListener
AddListener adds a listener to the StockPricesStream
datastreams/StockPrices.go:94
Method
AddListener
AddListener adds a listener to the Transactions stream
datastreams/Transactions.go:51
Method
AddListener
(sessionId string, lis *listener)
datastreams/BroadcastStream.go:13
Method
AddListener
AddListener adds a listener to a stream
datastreams/BroadcastStream.go:44
Method
AddListener
AddListener adds a listener to the MyOrders stream
datastreams/MyOrders.go:47
Method
AddMarketEvent
(ctx context.Context, req *actions_pb.AddMarketEventRequest)
grpcapi/actionservice/AdminActionService.go:271
Method
AddOrder
AddOrder mocks base method
mocks/mock_MarketDepth.go:56
Method
AddOrder
AddOrder indicates an expected call of AddOrder
mocks/mock_MarketDepth.go:61
Method
AddOrder
AddOrder adds an order to a marketdepth stream
datastreams/MarketDepth.go:202
Method
AddPhone
(ctx context.Context, req *actions_pb.AddPhoneRequest)
grpcapi/actionservice/AuthActionService.go:233
Method
AddStocksToExchange
(ctx context.Context, req *actions_pb.AddStocksToExchangeRequest)
grpcapi/actionservice/AdminActionService.go:188
Function
AddToGeneralLog
AddToGeneralLog adds entries to the GeneralLogs table
models/GeneralLog.go:9
Method
AddTrade
AddTrade mocks base method
mocks/mock_MarketDepth.go:66
Method
AddTrade
AddTrade indicates an expected call of AddTrade
mocks/mock_MarketDepth.go:71
Method
AddTrade
AddTrade adds a trade to the marketdepthstream
datastreams/MarketDepth.go:236
Method
AddUserSubscription
(ctx context.Context, req *actions_pb.AddUserSubscriptionRequest)
grpcapi/actionservice/UserActionService.go:481
Function
AdminLog
(username, msg string)
models/Admin.go:25
Function
AssertEqual
(t *testing.T, o1, o2 interface{})
utils/test/testutils.go:11
Method
BlockUser
(ctx context.Context, req *actions_pb.BlockUserRequest)
grpcapi/actionservice/AdminActionService.go:533
Method
BroadcastUpdate
BroadcastUpdate broadcasts a given update to all listeners in the stream
datastreams/BroadcastStream.go:72
Method
BroadcastUpdateToGroup
BroadcastUpdateToGroup broadcasts a given update to all listeners in the stream belonging to the given group
datastreams/MulticastStream.go:100
Method
CancelAskOrder
CancelAskOrder removes an Ask Order from the OrderBook NOTE: 1. It *ONLY* removes it from the depth, and not from the queue Removal from queue will
matchingengine/OrderBook.go:188
Method
CancelAskOrder
CancelAskOrder removes the ask order from the orderbook.
matchingengine/MatchingEngine.go:82
Method
CancelAskOrder
CancelAskOrder mocks base method
mocks/mock_OrderBook.go:87
Method
CancelAskOrder
CancelAskOrder indicates an expected call of CancelAskOrder
mocks/mock_OrderBook.go:92
Method
CancelAskOrder
CancelAskOrder mocks base method
mocks/mock_MatchingEngine.go:57
Method
CancelAskOrder
CancelAskOrder indicates an expected call of CancelAskOrder
mocks/mock_MatchingEngine.go:62
Method
CancelBidOrder
CancelBidOrder removes an Bid Order from the OrderBook NOTE: 1. It *ONLY* removes it from the depth, and not from the queue Removal from queue will
matchingengine/OrderBook.go:205
Method
CancelBidOrder
CancelBidOrder removes the bid order from the orderbook.
matchingengine/MatchingEngine.go:87
Method
CancelBidOrder
CancelBidOrder mocks base method
mocks/mock_OrderBook.go:97
Method
CancelBidOrder
CancelBidOrder indicates an expected call of CancelBidOrder
mocks/mock_OrderBook.go:102
Method
CancelBidOrder
CancelBidOrder mocks base method
mocks/mock_MatchingEngine.go:67
Method
CancelBidOrder
CancelBidOrder indicates an expected call of CancelBidOrder
mocks/mock_MatchingEngine.go:72
Method
CancelIpoBid
(ctx context.Context, req *actions_pb.CancelIpoBidRequest)
grpcapi/actionservice/OrderActionService.go:202
Method
CancelOrder
(ctx context.Context, req *actions_pb.CancelOrderRequest)
grpcapi/actionservice/OrderActionService.go:12
Method
ChangePassword
(ctx context.Context, req *actions_pb.ChangePasswordRequest)
grpcapi/actionservice/UserActionService.go:269
Method
Close
Marks an ask as closed and removes it from asksMap
models/Ask.go:214
Function
CloseDailyChallenge
CloseDailyChallenge closes dailychallenge and updates UserState
models/DailyChallenge.go:240
Method
CloseDailyChallenge
(ctx context.Context, req *actions_pb.CloseDailyChallengeRequest)
grpcapi/actionservice/AdminActionService.go:712
Method
CloseIpoBidding
(ctx context.Context, req *actions_pb.CloseIpoBiddingRequest)
grpcapi/actionservice/AdminActionService.go:917
Function
CloseMarket
(updatePreviousDayClose bool)
models/MarketClose.go:42
Method
CloseMarket
(ctx context.Context, req *actions_pb.CloseMarketRequest)
grpcapi/actionservice/AdminActionService.go:52
Method
CloseOrder
CloseOrder mocks base method
mocks/mock_MarketDepth.go:76
Method
CloseOrder
CloseOrder indicates an expected call of CloseOrder
mocks/mock_MarketDepth.go:81
Method
CloseOrder
CloseOrder will close an order from the order book. It should be called every time an order closes either due to cancellation or due to fulfillment
datastreams/MarketDepth.go:264
Method
CreateBot
(ctx context.Context, req *actions_pb.CreateBotRequest)
grpcapi/actionservice/BotsActionService.go:12
Method
Delete
(str string)
session/fakeSession.go:52
← previous
next →
301–400 of 739, ranked by callers