balance

package
v2.14.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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) Add added in v2.12.0

func (r *Repository) Add(balance *models.Balance) error

func (*Repository) Delete added in v2.12.0

func (r *Repository) Delete(addressID, coinID uint) error

func (*Repository) DeleteAll

func (r *Repository) DeleteAll(balances []*models.Balance) 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)

func (*Repository) SaveAll

func (r *Repository) SaveAll(balances []*models.Balance) error

func (*Repository) UpdateAll

func (r *Repository) UpdateAll(balances []*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 (s *Service) SetChasingMode(chasingMode bool)

func (*Service) UpdateChannel added in v2.14.14

func (s *Service) UpdateChannel() chan models.BalanceUpdateData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL