Documentation
¶
Index ¶
- type Notifier
- func (nf *Notifier) BeforeAfterNotify(businessId string, isBefore bool, notifySuccess bool, ...) error
- func (nf *Notifier) BuildNotifyTransaction(deposits []database.Deposits, withdraws []database.Withdraws, ...) (*NotifyRequest, error)
- func (nf *Notifier) Start(ctx context.Context) error
- func (nf *Notifier) Stop(ctx context.Context) error
- func (nf *Notifier) Stopped() bool
- type NotifyClient
- type NotifyRequest
- type NotifyResponse
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
func (*Notifier) BeforeAfterNotify ¶
func (*Notifier) BuildNotifyTransaction ¶
type NotifyClient ¶
type NotifyClient struct {
// contains filtered or unexported fields
}
func NewNotifierClient ¶
func NewNotifierClient(baseUrl string) (*NotifyClient, error)
func (*NotifyClient) BusinessNotify ¶
func (nc *NotifyClient) BusinessNotify(notifyData *NotifyRequest) (bool, error)
type NotifyRequest ¶
type NotifyRequest struct {
Txn []Transaction `json:"txn"`
}
type NotifyResponse ¶
type NotifyResponse struct {
Success bool `json:"success"`
}
type Transaction ¶
type Transaction struct {
BlockHash string `json:"block_hash"`
BlockNumber uint64 `json:"block_number"`
Hash string `json:"hash"`
FromAddress string `json:"from_address"`
ToAddress string `json:"to_address"`
Value string `json:"value"`
Fee string `json:"fee"`
TxType string `json:"tx_type"` // 0: 充值,1:提现;2:归集,3:热转冷;4:冷转热
Confirms uint8 `json:"confirms"`
}
Click to show internal directories.
Click to hide internal directories.