Documentation
¶
Index ¶
- type Repository
- func (r *Repository) DeleteAddressLiquidityPool(addressId uint, liquidityPoolId uint64) error
- func (r *Repository) GetAddressLiquidityPool(addressId uint, liquidityPoolId uint64) (*models.AddressLiquidityPool, error)
- func (r *Repository) GetAddressLiquidityPoolByCoinId(addressId uint, liquidityPoolId uint64) (*models.AddressLiquidityPool, error)
- func (r *Repository) GetAll() ([]models.LiquidityPool, error)
- func (r *Repository) GetAllByIds(ids []uint64) ([]models.LiquidityPool, error)
- func (r *Repository) GetLastSnapshot() (*models.LiquidityPoolSnapshot, error)
- func (r *Repository) GetSnapshotsByDate(date time.Time) ([]models.LiquidityPoolSnapshot, error)
- func (r *Repository) LinkAddressLiquidityPool(addressId uint, liquidityPoolId uint64) error
- func (r *Repository) RemoveEmptyAddresses() error
- func (r *Repository) SaveAllLiquidityPoolTrades(links []*models.LiquidityPoolTrade) error
- func (r *Repository) SaveLiquidityPoolSnapshots(snap []models.LiquidityPoolSnapshot) error
- func (r *Repository) UpdateAddressLiquidityPool(alp *models.AddressLiquidityPool) error
- func (r *Repository) UpdateAllLiquidityPool(pools []*models.AddressLiquidityPool) error
- func (r *Repository) UpdateLiquidityPool(lp *models.LiquidityPool) error
- func (r *Repository) UpdateLiquidityPoolById(lp *models.LiquidityPool) error
- type Service
- func (s *Service) AddressLiquidityPoolWorker()
- func (s *Service) CreateLiquidityPool(tx *api_pb.TransactionResponse) error
- func (s *Service) CreateSnapshot(height uint64, date time.Time) error
- func (s *Service) GetLiquidityPoolsIdFromTx(tx *api_pb.TransactionResponse) ([]uint64, error)
- func (s *Service) GetPoolByPairString(pair string) (*models.LiquidityPool, error)
- func (s *Service) GetPoolsByTxTags(tags map[string]string) ([]models.LiquidityPool, error)
- func (s *Service) JobUpdateLiquidityPoolChannel() chan *api_pb.TransactionResponse
- func (s *Service) LiquidityPoolTradesChannel() chan []*models.Transaction
- func (s *Service) LiquidityPoolTradesSaveChannel() chan []*models.LiquidityPoolTrade
- func (s *Service) LiquidityPoolTradesWorker(data <-chan []*models.Transaction)
- func (s *Service) LiquidityPoolWorker(data <-chan *api_pb.BlockResponse)
- func (s *Service) SaveLiquidityPoolTradesWorker(data <-chan []*models.LiquidityPoolTrade)
- func (s *Service) SetChasingMode(chasingMode bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *pg.DB) *Repository
func (*Repository) DeleteAddressLiquidityPool ¶
func (r *Repository) DeleteAddressLiquidityPool(addressId uint, liquidityPoolId uint64) error
func (*Repository) GetAddressLiquidityPool ¶
func (r *Repository) GetAddressLiquidityPool(addressId uint, liquidityPoolId uint64) (*models.AddressLiquidityPool, error)
func (*Repository) GetAddressLiquidityPoolByCoinId ¶
func (r *Repository) GetAddressLiquidityPoolByCoinId(addressId uint, liquidityPoolId uint64) (*models.AddressLiquidityPool, error)
func (*Repository) GetAll ¶ added in v2.13.5
func (r *Repository) GetAll() ([]models.LiquidityPool, error)
func (*Repository) GetAllByIds ¶
func (r *Repository) GetAllByIds(ids []uint64) ([]models.LiquidityPool, error)
func (*Repository) GetLastSnapshot ¶ added in v2.13.5
func (r *Repository) GetLastSnapshot() (*models.LiquidityPoolSnapshot, error)
func (*Repository) GetSnapshotsByDate ¶ added in v2.13.5
func (r *Repository) GetSnapshotsByDate(date time.Time) ([]models.LiquidityPoolSnapshot, error)
func (*Repository) LinkAddressLiquidityPool ¶
func (r *Repository) LinkAddressLiquidityPool(addressId uint, liquidityPoolId uint64) error
func (*Repository) RemoveEmptyAddresses ¶ added in v2.14.14
func (r *Repository) RemoveEmptyAddresses() error
func (*Repository) SaveAllLiquidityPoolTrades ¶
func (r *Repository) SaveAllLiquidityPoolTrades(links []*models.LiquidityPoolTrade) error
func (*Repository) SaveLiquidityPoolSnapshots ¶ added in v2.13.5
func (r *Repository) SaveLiquidityPoolSnapshots(snap []models.LiquidityPoolSnapshot) error
func (*Repository) UpdateAddressLiquidityPool ¶
func (r *Repository) UpdateAddressLiquidityPool(alp *models.AddressLiquidityPool) error
func (*Repository) UpdateAllLiquidityPool ¶
func (r *Repository) UpdateAllLiquidityPool(pools []*models.AddressLiquidityPool) error
func (*Repository) UpdateLiquidityPool ¶
func (r *Repository) UpdateLiquidityPool(lp *models.LiquidityPool) error
func (*Repository) UpdateLiquidityPoolById ¶ added in v2.14.14
func (r *Repository) UpdateLiquidityPoolById(lp *models.LiquidityPool) error
type Service ¶
type Service struct { Storage *Repository // contains filtered or unexported fields }
func NewService ¶
func NewService(repository *Repository, addressRepository *address.Repository, coinService *coin.Service, balanceService *balance.Service, swapService *swap.Service, nodeApi *grpc_client.Client, logger *logrus.Entry) *Service
func (*Service) AddressLiquidityPoolWorker ¶ added in v2.14.14
func (s *Service) AddressLiquidityPoolWorker()
func (*Service) CreateLiquidityPool ¶ added in v2.13.5
func (s *Service) CreateLiquidityPool(tx *api_pb.TransactionResponse) error
func (*Service) CreateSnapshot ¶ added in v2.13.5
func (*Service) GetLiquidityPoolsIdFromTx ¶ added in v2.14.14
func (s *Service) GetLiquidityPoolsIdFromTx(tx *api_pb.TransactionResponse) ([]uint64, error)
func (*Service) GetPoolByPairString ¶
func (s *Service) GetPoolByPairString(pair string) (*models.LiquidityPool, error)
func (*Service) GetPoolsByTxTags ¶
func (*Service) JobUpdateLiquidityPoolChannel ¶
func (s *Service) JobUpdateLiquidityPoolChannel() chan *api_pb.TransactionResponse
func (*Service) LiquidityPoolTradesChannel ¶
func (s *Service) LiquidityPoolTradesChannel() chan []*models.Transaction
func (*Service) LiquidityPoolTradesSaveChannel ¶
func (s *Service) LiquidityPoolTradesSaveChannel() chan []*models.LiquidityPoolTrade
func (*Service) LiquidityPoolTradesWorker ¶
func (s *Service) LiquidityPoolTradesWorker(data <-chan []*models.Transaction)
func (*Service) LiquidityPoolWorker ¶ added in v2.14.14
func (s *Service) LiquidityPoolWorker(data <-chan *api_pb.BlockResponse)
func (*Service) SaveLiquidityPoolTradesWorker ¶
func (s *Service) SaveLiquidityPoolTradesWorker(data <-chan []*models.LiquidityPoolTrade)
func (*Service) SetChasingMode ¶ added in v2.13.5
Click to show internal directories.
Click to hide internal directories.