Documentation ¶
Index ¶
- type Repository
- func (r *Repository) Add(balance *models.Balance) error
- func (r *Repository) Delete(addressID, coinID uint) error
- func (r *Repository) DeleteAll(balances []*models.Balance) error
- func (r *Repository) DeleteByAddressIds(addressIds []uint) error
- func (r *Repository) DeleteByCoinId(coinId uint) error
- func (r *Repository) DeleteUselessCoins(exist map[uint][]uint64) error
- func (r *Repository) FindAllByAddress(addresses []string) ([]*models.Balance, error)
- func (r *Repository) GetByCoinIdAndAddressId(addressID, coinID uint) (*models.Balance, error)
- func (r *Repository) SaveAll(balances []*models.Balance) error
- func (r *Repository) UpdateAll(balances []*models.Balance) error
- type Service
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) Delete ¶ added in v2.12.0
func (r *Repository) Delete(addressID, coinID uint) error
func (*Repository) DeleteByAddressIds ¶ added in v2.12.0
func (r *Repository) DeleteByAddressIds(addressIds []uint) error
func (*Repository) DeleteByCoinId ¶
func (r *Repository) DeleteByCoinId(coinId uint) error
func (*Repository) DeleteUselessCoins ¶ added in v2.12.0
func (r *Repository) DeleteUselessCoins(exist map[uint][]uint64) error
DeleteUselessCoins Exist is a map with a key is AddressId and value is a slice of coin ids
func (*Repository) FindAllByAddress ¶
func (r *Repository) FindAllByAddress(addresses []string) ([]*models.Balance, error)
func (*Repository) GetByCoinIdAndAddressId ¶ added in v2.12.0
func (r *Repository) GetByCoinIdAndAddressId(addressID, coinID uint) (*models.Balance, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(env *env.ExtenderEnvironment, repository *Repository, nodeApi *grpc_client.Client, addressService *address.Service, coinRepository *coin.Repository, broadcastService *broadcast.Service, logger *logrus.Entry) *Service
func (*Service) BalanceManager ¶ added in v2.12.0
func (s *Service) BalanceManager()
func (*Service) SetChasingMode ¶ added in v2.8.0
func (*Service) UpdateChannel ¶ added in v2.14.14
func (s *Service) UpdateChannel() chan models.BalanceUpdateData
Click to show internal directories.
Click to hide internal directories.