Documentation ¶
Index ¶
- type Repository
- func (r Repository) IndexTxAddress(txsId []uint64) error
- func (r *Repository) LinkWithValidators(links []*models.TransactionValidator) error
- func (r *Repository) Save(transaction *models.Transaction) error
- func (r *Repository) SaveAll(transactions []*models.Transaction) error
- func (r *Repository) SaveAllInvalid(transactions []*models.InvalidTransaction) error
- func (r *Repository) SaveAllTxOutputs(output []*models.TransactionOutput) error
- type Service
- func (s *Service) GetSaveInvalidTxsJobChannel() chan []*models.InvalidTransaction
- func (s *Service) GetSaveTxJobChannel() chan []*models.Transaction
- func (s *Service) GetSaveTxValidatorJobChannel() chan []*models.TransactionValidator
- func (s *Service) GetSaveTxsOutputJobChannel() chan []*models.Transaction
- func (s *Service) HandleTransactionsFromBlockResponse(blockHeight uint64, blockCreatedAt time.Time, ...) error
- func (s *Service) SaveAllTxOutputs(txList []*models.Transaction) error
- func (s *Service) SaveInvalidTransactionsWorker(jobs <-chan []*models.InvalidTransaction)
- func (s *Service) SaveTransactionsOutputWorker(jobs <-chan []*models.Transaction)
- func (s *Service) SaveTransactionsWorker(jobs <-chan []*models.Transaction)
- func (s *Service) SaveTxValidatorWorker(jobs <-chan []*models.TransactionValidator)
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) IndexTxAddress ¶
func (r Repository) IndexTxAddress(txsId []uint64) error
func (*Repository) LinkWithValidators ¶
func (r *Repository) LinkWithValidators(links []*models.TransactionValidator) error
func (*Repository) Save ¶
func (r *Repository) Save(transaction *models.Transaction) error
func (*Repository) SaveAll ¶
func (r *Repository) SaveAll(transactions []*models.Transaction) error
func (*Repository) SaveAllInvalid ¶
func (r *Repository) SaveAllInvalid(transactions []*models.InvalidTransaction) error
func (*Repository) SaveAllTxOutputs ¶
func (r *Repository) SaveAllTxOutputs(output []*models.TransactionOutput) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(env *models.ExtenderEnvironment, repository *Repository, addressRepository *address.Repository, validatorRepository *validator.Repository, coinRepository *coin.Repository, coinService *coin.Service, broadcastService *broadcast.Service, logger *logrus.Entry) *Service
func (*Service) GetSaveInvalidTxsJobChannel ¶
func (s *Service) GetSaveInvalidTxsJobChannel() chan []*models.InvalidTransaction
func (*Service) GetSaveTxJobChannel ¶
func (s *Service) GetSaveTxJobChannel() chan []*models.Transaction
func (*Service) GetSaveTxValidatorJobChannel ¶
func (s *Service) GetSaveTxValidatorJobChannel() chan []*models.TransactionValidator
func (*Service) GetSaveTxsOutputJobChannel ¶
func (s *Service) GetSaveTxsOutputJobChannel() chan []*models.Transaction
func (*Service) HandleTransactionsFromBlockResponse ¶
func (s *Service) HandleTransactionsFromBlockResponse(blockHeight uint64, blockCreatedAt time.Time, transactions []responses.Transaction) error
Handle response and save block to DB
func (*Service) SaveAllTxOutputs ¶
func (s *Service) SaveAllTxOutputs(txList []*models.Transaction) error
func (*Service) SaveInvalidTransactionsWorker ¶
func (s *Service) SaveInvalidTransactionsWorker(jobs <-chan []*models.InvalidTransaction)
func (*Service) SaveTransactionsOutputWorker ¶
func (s *Service) SaveTransactionsOutputWorker(jobs <-chan []*models.Transaction)
func (*Service) SaveTransactionsWorker ¶
func (s *Service) SaveTransactionsWorker(jobs <-chan []*models.Transaction)
func (*Service) SaveTxValidatorWorker ¶
func (s *Service) SaveTxValidatorWorker(jobs <-chan []*models.TransactionValidator)
Click to show internal directories.
Click to hide internal directories.