Documentation ¶
Index ¶
- type AddressService
- type BalanceService
- type OrderService
- func (s *OrderService) Create(order *types.Order) (err error)
- func (s *OrderService) GetAll() ([]types.Order, error)
- func (s *OrderService) GetByID(id bson.ObjectId) (*types.Order, error)
- func (s *OrderService) GetByUserAddress(address string) ([]*types.Order, error)
- func (s *OrderService) RelayUpdateOverSocket(er *engine.EngineResponse)
- func (s *OrderService) UpdateUsingEngineResponse(er *engine.EngineResponse)
- type PairService
- type TokenService
- type TradeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressService ¶
type AddressService struct { AddressDao *daos.AddressDao // contains filtered or unexported fields }
AddressService struct with daos required, responsible for communicating with daos
func NewAddressService ¶
func NewAddressService(AddressDao *daos.AddressDao, balanceDao *daos.BalanceDao, tokenDao *daos.TokenDao) *AddressService
NewAddressService returns a new instance of addressService
func (*AddressService) Create ¶
func (s *AddressService) Create(Address *types.UserAddress) error
Create validates the address and create wallet for the address
func (*AddressService) GetAll ¶
func (s *AddressService) GetAll() ([]types.UserAddress, error)
GetAll fetches all the address entries in the db
func (*AddressService) GetByAddress ¶
func (s *AddressService) GetByAddress(addr string) (*types.UserAddress, error)
GetByAddress fetches the address's details
func (*AddressService) GetByID ¶
func (s *AddressService) GetByID(id bson.ObjectId) (*types.UserAddress, error)
GetByID fetches the address's details based on its mongoID
type BalanceService ¶
type BalanceService struct {
// contains filtered or unexported fields
}
func NewBalanceService ¶
func NewBalanceService(balanceDao *daos.BalanceDao, tokenDao *daos.TokenDao) *BalanceService
func (*BalanceService) GetByAddress ¶
func (s *BalanceService) GetByAddress(addr string) (*types.Balance, error)
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService(orderDao *daos.OrderDao, balanceDao *daos.BalanceDao, pairDao *daos.PairDao, tradeDao *daos.TradeDao) *OrderService
func (*OrderService) GetByUserAddress ¶
func (s *OrderService) GetByUserAddress(address string) ([]*types.Order, error)
func (*OrderService) RelayUpdateOverSocket ¶
func (s *OrderService) RelayUpdateOverSocket(er *engine.EngineResponse)
RelayUpdateOverSocket is responsible for notifying listening clients about new order/trade addition/deletion
func (*OrderService) UpdateUsingEngineResponse ¶
func (s *OrderService) UpdateUsingEngineResponse(er *engine.EngineResponse)
type PairService ¶
type PairService struct {
// contains filtered or unexported fields
}
func NewPairService ¶
func NewPairService(pairDao *daos.PairDao, tokenDao *daos.TokenDao, eng *engine.EngineResource, tradeService *TradeService) *PairService
func (*PairService) RegisterForOrderBook ¶
func (s *PairService) RegisterForOrderBook(conn *websocket.Conn, pairName string)
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(tokenDao *daos.TokenDao) *TokenService
type TradeService ¶
type TradeService struct {
// contains filtered or unexported fields
}
func NewTradeService ¶
func NewTradeService(TradeDao *daos.TradeDao) *TradeService
func (*TradeService) GetByPairName ¶
func (t *TradeService) GetByPairName(pairName string) ([]*types.Trade, error)
Click to show internal directories.
Click to hide internal directories.