Documentation
¶
Index ¶
- type DepositWebhookDto
- type ICallback
- type ProcessingWebhook
- type Service
- func (s *Service) HandleDepositCallback(ctx context.Context, dto DepositWebhookDto) error
- func (s *Service) HandleTransferCallback(ctx context.Context, dto TransferWebhookDto) error
- func (s *Service) HandleUpdateTransferStatusCallback(ctx context.Context, dto processing_request.TransferStatusWebhook) error
- type TransferWebhookDto
- type WebhookDtoInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepositWebhookDto ¶
type DepositWebhookDto struct {
Blockchain models.Blockchain `json:"blockchain"`
Hash string `json:"hash"`
NetworkCreatedAt time.Time `json:"network_created_at"`
FromAddress string `json:"from_address"`
ToAddress string `json:"to_address"`
Amount string `json:"amount"`
Fee string `json:"fee"`
ContractAddress string `json:"contract_address"`
Status models.TransactionStatus `json:"status"`
IsSystem bool `json:"is_system"`
Confirmations uint64 `json:"confirmations"`
WalletType models.WalletType `json:"wallet_type"`
TxUniqKey string `json:"tx_uniq_key,omitempty"`
ExternalWalletID *uuid.UUID `json:"external_wallet_id,omitempty"`
Currency *models.Currency
}
func (DepositWebhookDto) GetAddressForUpdateBalance ¶
func (dto DepositWebhookDto) GetAddressForUpdateBalance() string
func (DepositWebhookDto) GetCurrency ¶
func (dto DepositWebhookDto) GetCurrency() *models.Currency
func (DepositWebhookDto) GetStatus ¶
func (dto DepositWebhookDto) GetStatus() models.TransactionStatus
func (DepositWebhookDto) GetToAddress ¶
func (dto DepositWebhookDto) GetToAddress() string
type ICallback ¶
type ICallback interface {
HandleDepositCallback(ctx context.Context, dto DepositWebhookDto) error
HandleTransferCallback(ctx context.Context, dto TransferWebhookDto) error
HandleUpdateTransferStatusCallback(ctx context.Context, dto processing_request.TransferStatusWebhook) error
}
func New ¶
func New( logger logger.Logger, eventListener event.IListener, storage storage.IStorage, transactionsService transactions.ITransaction, unconfirmedTransactionsService transactions.IUnconfirmedTransaction, storeService store.IStore, currConvService currconv.ICurrencyConvertor, receiptsService receipts.IReceiptService, ) ICallback
type ProcessingWebhook ¶
type ProcessingWebhook struct {
Blockchain models.Blockchain `json:"blockchain"`
Hash string `json:"hash"`
NetworkCreatedAt time.Time `json:"network_created_at"`
FromAddress string `json:"from_address"`
ToAddress string `json:"to_address"`
Amount string `json:"amount"`
Fee string `json:"fee"`
ContractAddress string `json:"contract_address"`
Status models.TransactionStatus `json:"status"`
Confirmations uint64 `json:"confirmations"`
TransactionType models.TransactionsType `json:"transaction_type"`
TxUniqKey string `json:"tx_uniq_key,omitempty"`
ExternalWalletID uuid.UUID `json:"external_wallet_id,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) HandleDepositCallback ¶
func (s *Service) HandleDepositCallback(ctx context.Context, dto DepositWebhookDto) error
func (*Service) HandleTransferCallback ¶
func (s *Service) HandleTransferCallback(ctx context.Context, dto TransferWebhookDto) error
func (*Service) HandleUpdateTransferStatusCallback ¶
func (s *Service) HandleUpdateTransferStatusCallback(ctx context.Context, dto processing_request.TransferStatusWebhook) error
type TransferWebhookDto ¶
type TransferWebhookDto struct {
Blockchain models.Blockchain `json:"blockchain"`
TransferID uuid.NullUUID `json:"transfer_id"`
Hash string `json:"hash"`
NetworkCreatedAt time.Time `json:"network_created_at"`
FromAddress string `json:"from_address"`
ToAddress string `json:"to_address"`
Amount string `json:"amount"`
Fee string `json:"fee"`
ContractAddress string `json:"contract_address"`
Status models.TransactionStatus `json:"status"`
IsSystem bool `json:"is_system"`
Confirmations uint64 `json:"confirmations"`
TxUniqKey string `json:"tx_uniq_key,omitempty"`
WalletType models.WalletType `json:"wallet_type"`
ExternalWalletID *uuid.UUID `json:"external_wallet_id,omitempty"`
Currency *models.Currency
}
func (TransferWebhookDto) GetAddressForUpdateBalance ¶
func (dto TransferWebhookDto) GetAddressForUpdateBalance() string
func (TransferWebhookDto) GetCurrency ¶
func (dto TransferWebhookDto) GetCurrency() *models.Currency
func (TransferWebhookDto) GetStatus ¶
func (dto TransferWebhookDto) GetStatus() models.TransactionStatus
func (TransferWebhookDto) GetToAddress ¶
func (dto TransferWebhookDto) GetToAddress() string
type WebhookDtoInterface ¶
Click to show internal directories.
Click to hide internal directories.