Documentation
¶
Index ¶
- type CreateCoinData
- type Repository
- func (r Repository) DeleteBySymbol(symbol string) error
- func (r *Repository) FindIdBySymbol(symbol string) (uint64, error)
- func (r *Repository) FindSymbolById(id uint64) (string, error)
- func (r *Repository) GetAllCoins() ([]*models.Coin, error)
- func (r *Repository) Save(c *models.Coin) error
- func (r Repository) SaveAllIfNotExist(coins []*models.Coin) error
- type Service
- func (s *Service) CreateNewCoins(coins []*models.Coin) error
- func (s Service) ExtractCoinsFromTransactions(transactions []responses.Transaction) ([]*models.Coin, error)
- func (s *Service) ExtractFromTx(tx responses.Transaction) (*models.Coin, error)
- func (s *Service) GetCoinFromNode(symbol string) (*models.Coin, error)
- func (s *Service) GetUpdateCoinsFromCoinsMapJobChannel() chan map[string]struct{}
- func (s *Service) GetUpdateCoinsFromTxsJobChannel() chan []*models.Transaction
- func (s *Service) UpdateCoinsInfo(symbols []string) error
- func (s Service) UpdateCoinsInfoFromCoinsMap(job <-chan map[string]struct{})
- func (s *Service) UpdateCoinsInfoFromTxsWorker(jobs <-chan []*models.Transaction)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCoinData ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *pg.DB) *Repository
func (Repository) DeleteBySymbol ¶
func (r Repository) DeleteBySymbol(symbol string) error
func (*Repository) FindIdBySymbol ¶
func (r *Repository) FindIdBySymbol(symbol string) (uint64, error)
Find coin id by symbol
func (*Repository) FindSymbolById ¶
func (r *Repository) FindSymbolById(id uint64) (string, error)
func (*Repository) GetAllCoins ¶
func (r *Repository) GetAllCoins() ([]*models.Coin, error)
func (Repository) SaveAllIfNotExist ¶
func (r Repository) SaveAllIfNotExist(coins []*models.Coin) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(env *models.ExtenderEnvironment, nodeApi *minter_node_go_api.MinterNodeApi, repository *Repository, addressRepository *address.Repository, logger *logrus.Entry) *Service
func (Service) ExtractCoinsFromTransactions ¶
func (*Service) ExtractFromTx ¶
func (*Service) GetCoinFromNode ¶
func (*Service) GetUpdateCoinsFromCoinsMapJobChannel ¶
func (*Service) GetUpdateCoinsFromTxsJobChannel ¶
func (s *Service) GetUpdateCoinsFromTxsJobChannel() chan []*models.Transaction
func (*Service) UpdateCoinsInfo ¶
func (Service) UpdateCoinsInfoFromCoinsMap ¶
func (*Service) UpdateCoinsInfoFromTxsWorker ¶
func (s *Service) UpdateCoinsInfoFromTxsWorker(jobs <-chan []*models.Transaction)
Click to show internal directories.
Click to hide internal directories.