Documentation ¶
Index ¶
- func SharedStore() models.Store
- type Store
- func (s *Store) AddAccount(account *models.Account) error
- func (s *Store) AddBills(bills []*models.Bill) error
- func (s *Store) AddFills(fills []*models.Fill) error
- func (s *Store) AddOrder(order *models.Order) error
- func (s *Store) AddTicks(ticks []*models.Tick) error
- func (s *Store) AddTrades(trades []*models.Trade) error
- func (s *Store) AddUser(user *models.User) error
- func (s *Store) BeginTx() (models.Store, error)
- func (s *Store) CommitTx() error
- func (s *Store) GetAccount(userId int64, currency string) (*models.Account, error)
- func (s *Store) GetAccountForUpdate(userId int64, currency string) (*models.Account, error)
- func (s *Store) GetAccountsByUserId(userId int64) ([]*models.Account, error)
- func (s *Store) GetConfigs() ([]*models.Config, error)
- func (s *Store) GetLastFillByProductId(productId string) (*models.Fill, error)
- func (s *Store) GetLastTickByProductId(productId string, granularity int64) (*models.Tick, error)
- func (s *Store) GetLastTradeByProductId(productId string) (*models.Trade, error)
- func (s *Store) GetOrderByClientOid(userId int64, clientOid string) (*models.Order, error)
- func (s *Store) GetOrderById(orderId int64) (*models.Order, error)
- func (s *Store) GetOrderByIdForUpdate(orderId int64) (*models.Order, error)
- func (s *Store) GetOrdersByUserId(userId int64, statuses []models.OrderStatus, side *models.Side, ...) ([]*models.Order, error)
- func (s *Store) GetProductById(id string) (*models.Product, error)
- func (s *Store) GetProducts() ([]*models.Product, error)
- func (s *Store) GetTicksByProductId(productId string, granularity int64, limit int) ([]*models.Tick, error)
- func (s *Store) GetTradesByProductId(productId string, count int) ([]*models.Trade, error)
- func (s *Store) GetUnsettledBills() ([]*models.Bill, error)
- func (s *Store) GetUnsettledBillsByUserId(userId int64, currency string) ([]*models.Bill, error)
- func (s *Store) GetUnsettledFills(count int32) ([]*models.Fill, error)
- func (s *Store) GetUnsettledFillsByOrderId(orderId int64) ([]*models.Fill, error)
- func (s *Store) GetUserByEmail(email string) (*models.User, error)
- func (s *Store) Rollback() error
- func (s *Store) UpdateAccount(account *models.Account) error
- func (s *Store) UpdateBill(bill *models.Bill) error
- func (s *Store) UpdateFill(fill *models.Fill) error
- func (s *Store) UpdateOrder(order *models.Order) error
- func (s *Store) UpdateOrderStatus(orderId int64, oldStatus, newStatus models.OrderStatus) (bool, error)
- func (s *Store) UpdateUser(user *models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SharedStore ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetAccount ¶
func (*Store) GetAccountForUpdate ¶
func (*Store) GetAccountsByUserId ¶
func (*Store) GetLastFillByProductId ¶
func (*Store) GetLastTickByProductId ¶
func (*Store) GetLastTradeByProductId ¶
func (*Store) GetOrderByClientOid ¶
func (*Store) GetOrderByIdForUpdate ¶
func (*Store) GetOrdersByUserId ¶
func (*Store) GetTicksByProductId ¶
func (*Store) GetTradesByProductId ¶
func (*Store) GetUnsettledBillsByUserId ¶
func (*Store) GetUnsettledFills ¶
func (*Store) GetUnsettledFillsByOrderId ¶
func (*Store) UpdateOrderStatus ¶
Click to show internal directories.
Click to hide internal directories.