Documentation ¶
Index ¶
- type CreateCoinData
- type Repository
- func (r *Repository) Add(c *models.Coin) error
- func (r *Repository) DeleteBySymbol(symbol string) error
- func (r *Repository) FindCoinIdBySymbol(symbol string) (uint, error)
- func (r *Repository) FindSymbolById(id uint) (string, error)
- func (r *Repository) GetAllCoins() ([]*models.Coin, error)
- func (r *Repository) GetById(id uint) (*models.Coin, error)
- func (r *Repository) GetCoinBySymbol(symbol string) ([]models.Coin, error)
- func (r *Repository) GetLastCoinId() (uint, error)
- func (r *Repository) RemoveFromCacheBySymbol(symbol string)
- func (r *Repository) Save(c *models.Coin) error
- func (r *Repository) SaveAllIfNotExist(coins []*models.Coin) error
- func (r *Repository) SaveAllNewIfNotExist(coins []*models.Coin) error
- func (r *Repository) Update(c *models.Coin) error
- func (r *Repository) UpdateAll(coins []*models.Coin) error
- func (r *Repository) UpdateOwnerBySymbol(symbol string, id uint) error
- type Service
- func (s *Service) BurnToken(tx *api_pb.TransactionResponse) error
- func (s *Service) ChangeOwner(symbol, owner string) error
- func (s *Service) CreateNewCoins(coins []*models.Coin) error
- func (s *Service) CreatePoolToken(tx *api_pb.TransactionResponse) (*models.Coin, error)
- func (s *Service) ExtractFromTx(tx *api_pb.TransactionResponse, blockId uint64) (*models.Coin, error)
- func (s *Service) GetBySymbolAndVersion(symbol string, version uint) (*models.Coin, error)
- func (s *Service) GetCoinFromNode(coinId uint64, optionalHeight ...uint64) (*models.Coin, error)
- func (s *Service) GetUpdateCoinsFromCoinsMapJobChannel() chan map[uint64]struct{}
- func (s *Service) GetUpdateCoinsFromTxsJobChannel() chan []*models.Transaction
- func (s Service) HandleCoinsFromBlock(block *api_pb.BlockResponse) error
- func (s *Service) MintToken(tx *api_pb.TransactionResponse) error
- func (s *Service) RecreateCoin(newCoin *models.Coin) error
- func (s *Service) RecreateToken(data *api_pb.RecreateTokenData, txTags map[string]string, height uint64) error
- func (s *Service) UpdateCoinsInfo(coinIds []uint64) error
- func (s Service) UpdateCoinsInfoFromCoinsMap(job <-chan map[uint64]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 { DB *pg.DB // 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) FindCoinIdBySymbol ¶
func (r *Repository) FindCoinIdBySymbol(symbol string) (uint, error)
Find coin id by symbol
func (*Repository) FindSymbolById ¶
func (r *Repository) FindSymbolById(id uint) (string, error)
func (*Repository) GetAllCoins ¶
func (r *Repository) GetAllCoins() ([]*models.Coin, error)
func (*Repository) GetCoinBySymbol ¶
func (r *Repository) GetCoinBySymbol(symbol string) ([]models.Coin, error)
func (*Repository) GetLastCoinId ¶
func (r *Repository) GetLastCoinId() (uint, error)
func (*Repository) RemoveFromCacheBySymbol ¶
func (r *Repository) RemoveFromCacheBySymbol(symbol string)
func (*Repository) SaveAllIfNotExist ¶
func (r *Repository) SaveAllIfNotExist(coins []*models.Coin) error
func (*Repository) SaveAllNewIfNotExist ¶
func (r *Repository) SaveAllNewIfNotExist(coins []*models.Coin) error
func (*Repository) UpdateOwnerBySymbol ¶
func (r *Repository) UpdateOwnerBySymbol(symbol string, id uint) error
type Service ¶
type Service struct { Storage *Repository // contains filtered or unexported fields }
func NewService ¶
func NewService(env *env.ExtenderEnvironment, nodeApi *grpc_client.Client, repository *Repository, addressRepository *address.Repository, logger *logrus.Entry) *Service
func (*Service) BurnToken ¶ added in v2.12.0
func (s *Service) BurnToken(tx *api_pb.TransactionResponse) error
func (*Service) ChangeOwner ¶
func (*Service) CreatePoolToken ¶ added in v2.12.0
func (*Service) ExtractFromTx ¶
func (*Service) GetBySymbolAndVersion ¶ added in v2.12.0
func (*Service) GetCoinFromNode ¶
func (*Service) GetUpdateCoinsFromCoinsMapJobChannel ¶
func (*Service) GetUpdateCoinsFromTxsJobChannel ¶
func (s *Service) GetUpdateCoinsFromTxsJobChannel() chan []*models.Transaction
func (Service) HandleCoinsFromBlock ¶ added in v2.12.0
func (s Service) HandleCoinsFromBlock(block *api_pb.BlockResponse) error
func (*Service) MintToken ¶ added in v2.12.0
func (s *Service) MintToken(tx *api_pb.TransactionResponse) error
func (*Service) RecreateToken ¶ added in v2.12.0
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.