Documentation
¶
Index ¶
- Constants
- type AdrestiaRequests
- func (a *AdrestiaRequests) DepositInfo(depositParams models.DepositParams) (depositInfo models.DepositInfo, err error)
- func (a *AdrestiaRequests) GetPath(fromCoin string, amount float64) (path models.VoucherPathResponse, err error)
- func (a *AdrestiaRequests) GetTradeStatus(tradeParams hestia.Trade) (tradeInfo hestia.ExchangeOrderInfo, err error)
- func (a *AdrestiaRequests) GetWithdrawalTxHash(withdrawParams models.WithdrawInfo) (txId string, err error)
- func (a *AdrestiaRequests) Trade(tradeParams hestia.Trade) (txId string, err error)
- func (a *AdrestiaRequests) Withdraw(withdrawParams models.WithdrawParamsV2) (withdrawal models.WithdrawInfo, err error)
- type AdrestiaService
- type BitcouRequests
- func (bs *BitcouRequests) GetAccountBalanceV2() (models.AccountInfo, error)
- func (bs *BitcouRequests) GetPhoneTopUpList(phoneNb string) ([]int, error)
- func (bs *BitcouRequests) GetPhoneTopUpListV2(phoneNb string) ([]int, error)
- func (bs *BitcouRequests) GetTransactionInformation(purchaseInfo models.PurchaseInfo) (models.PurchaseInfoResponse, error)
- func (bs *BitcouRequests) GetTransactionInformationV2(purchaseInfo models.PurchaseInfo) (models.PurchaseInfoResponseV2, error)
- type BitcouService
- type HestiaRequests
- func (h *HestiaRequests) GetCoinsConfig() ([]hestia.Coin, error)
- func (h *HestiaRequests) GetUserInfo(uid string) (info string, err error)
- func (h *HestiaRequests) GetVoucherInfo(voucherid string) (hestia.Voucher, error)
- func (h *HestiaRequests) GetVoucherInfoV2(country string, productId string) (models.LightVoucherV2, error)
- func (h *HestiaRequests) GetVoucherStatus() (hestia.Config, error)
- func (h *HestiaRequests) GetVoucherV2(voucherid string) (hestia.VoucherV2, error)
- func (h *HestiaRequests) GetVouchersByStatusV2(status hestia.VoucherStatusV2) ([]hestia.VoucherV2, error)
- func (h *HestiaRequests) GetVouchersByTimestamp(uid string, timestamp string) (vouchers []hestia.Voucher, err error)
- func (h *HestiaRequests) GetVouchersByTimestampV2(uid string, timestamp string) (vouchers []hestia.VoucherV2, err error)
- func (h *HestiaRequests) GetVouchersStatus() (hestia.Config, error)
- func (h *HestiaRequests) UpdateVoucher(voucherData hestia.Voucher) (string, error)
- func (h *HestiaRequests) UpdateVoucherV2(voucherData hestia.VoucherV2) (string, error)
- type HestiaService
- type PlutusRequests
- func (p *PlutusRequests) GetNewPaymentAddress(coin string) (addr string, err error)
- func (p *PlutusRequests) GetWalletBalance(coin string) (plutus.Balance, error)
- func (p *PlutusRequests) SubmitPayment(body plutus.SendAddressBodyReq) (txid string, err error)
- func (p *PlutusRequests) ValidateRawTx(body plutus.ValidateRawTxReq) (valid bool, err error)
- type PlutusService
- type VouchersData
Constants ¶
View Source
const (
UpdateVouchersTimeFrame = 60 * 60 * 24 // 1 day
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdrestiaRequests ¶
type AdrestiaRequests struct {
AdrestiaUrl string
}
func (*AdrestiaRequests) DepositInfo ¶
func (a *AdrestiaRequests) DepositInfo(depositParams models.DepositParams) (depositInfo models.DepositInfo, err error)
func (*AdrestiaRequests) GetPath ¶
func (a *AdrestiaRequests) GetPath(fromCoin string, amount float64) (path models.VoucherPathResponse, err error)
func (*AdrestiaRequests) GetTradeStatus ¶
func (a *AdrestiaRequests) GetTradeStatus(tradeParams hestia.Trade) (tradeInfo hestia.ExchangeOrderInfo, err error)
func (*AdrestiaRequests) GetWithdrawalTxHash ¶
func (a *AdrestiaRequests) GetWithdrawalTxHash(withdrawParams models.WithdrawInfo) (txId string, err error)
func (*AdrestiaRequests) Trade ¶
func (a *AdrestiaRequests) Trade(tradeParams hestia.Trade) (txId string, err error)
func (*AdrestiaRequests) Withdraw ¶
func (a *AdrestiaRequests) Withdraw(withdrawParams models.WithdrawParamsV2) (withdrawal models.WithdrawInfo, err error)
type AdrestiaService ¶
type AdrestiaService interface { DepositInfo(depositParams amodels.DepositParams) (depositInfo amodels.DepositInfo, err error) Trade(tradeParams hestia.Trade) (txId string, err error) GetTradeStatus(tradeParams hestia.Trade) (tradeInfo hestia.ExchangeOrderInfo, err error) Withdraw(withdrawParams amodels.WithdrawParamsV2) (withdrawal amodels.WithdrawInfo, err error) GetWithdrawalTxHash(withdrawParams amodels.WithdrawInfo) (txId string, err error) GetPath(fromCoin string, amount float64) (path amodels.VoucherPathResponse, err error) }
type BitcouRequests ¶
type BitcouRequests struct { BitcouURL string BitcouToken string VouchersList VouchersData DevMode bool }
func NewBitcouService ¶
func NewBitcouService(devMode bool, version int) *BitcouRequests
func (*BitcouRequests) GetAccountBalanceV2 ¶
func (bs *BitcouRequests) GetAccountBalanceV2() (models.AccountInfo, error)
func (*BitcouRequests) GetPhoneTopUpList ¶
func (bs *BitcouRequests) GetPhoneTopUpList(phoneNb string) ([]int, error)
func (*BitcouRequests) GetPhoneTopUpListV2 ¶
func (bs *BitcouRequests) GetPhoneTopUpListV2(phoneNb string) ([]int, error)
func (*BitcouRequests) GetTransactionInformation ¶
func (bs *BitcouRequests) GetTransactionInformation(purchaseInfo models.PurchaseInfo) (models.PurchaseInfoResponse, error)
func (*BitcouRequests) GetTransactionInformationV2 ¶
func (bs *BitcouRequests) GetTransactionInformationV2(purchaseInfo models.PurchaseInfo) (models.PurchaseInfoResponseV2, error)
type BitcouService ¶
type BitcouService interface { GetPhoneTopUpList(phoneNb string) ([]int, error) GetPhoneTopUpListV2(phoneNb string) ([]int, error) GetTransactionInformation(purchaseInfo models.PurchaseInfo) (models.PurchaseInfoResponse, error) GetTransactionInformationV2(purchaseInfo models.PurchaseInfo) (models.PurchaseInfoResponseV2, error) GetAccountBalanceV2() (models.AccountInfo, error) }
type HestiaRequests ¶
func (*HestiaRequests) GetCoinsConfig ¶
func (h *HestiaRequests) GetCoinsConfig() ([]hestia.Coin, error)
func (*HestiaRequests) GetUserInfo ¶
func (h *HestiaRequests) GetUserInfo(uid string) (info string, err error)
func (*HestiaRequests) GetVoucherInfo ¶
func (h *HestiaRequests) GetVoucherInfo(voucherid string) (hestia.Voucher, error)
func (*HestiaRequests) GetVoucherInfoV2 ¶
func (h *HestiaRequests) GetVoucherInfoV2(country string, productId string) (models.LightVoucherV2, error)
func (*HestiaRequests) GetVoucherStatus ¶
func (h *HestiaRequests) GetVoucherStatus() (hestia.Config, error)
func (*HestiaRequests) GetVoucherV2 ¶
func (h *HestiaRequests) GetVoucherV2(voucherid string) (hestia.VoucherV2, error)
func (*HestiaRequests) GetVouchersByStatusV2 ¶
func (h *HestiaRequests) GetVouchersByStatusV2(status hestia.VoucherStatusV2) ([]hestia.VoucherV2, error)
func (*HestiaRequests) GetVouchersByTimestamp ¶
func (*HestiaRequests) GetVouchersByTimestampV2 ¶
func (*HestiaRequests) GetVouchersStatus ¶
func (h *HestiaRequests) GetVouchersStatus() (hestia.Config, error)
func (*HestiaRequests) UpdateVoucher ¶
func (h *HestiaRequests) UpdateVoucher(voucherData hestia.Voucher) (string, error)
func (*HestiaRequests) UpdateVoucherV2 ¶
func (h *HestiaRequests) UpdateVoucherV2(voucherData hestia.VoucherV2) (string, error)
type HestiaService ¶
type HestiaService interface { GetVouchersStatus() (hestia.Config, error) GetCoinsConfig() ([]hestia.Coin, error) GetVoucherInfo(voucherid string) (hestia.Voucher, error) GetVoucherV2(voucherid string) (hestia.VoucherV2, error) GetVoucherInfoV2(country string, productId string) (models.LightVoucherV2, error) UpdateVoucher(voucherData hestia.Voucher) (string, error) UpdateVoucherV2(voucherData hestia.VoucherV2) (string, error) GetVouchersByStatusV2(status hestia.VoucherStatusV2) ([]hestia.VoucherV2, error) GetVouchersByTimestamp(uid string, timestamp string) (vouchers []hestia.Voucher, err error) GetVouchersByTimestampV2(uid string, timestamp string) (vouchers []hestia.VoucherV2, err error) GetUserInfo(uid string) (info string, err error) GetVoucherStatus() (hestia.Config, error) }
type PlutusRequests ¶
type PlutusRequests struct {
PlutusURL string
}
func (*PlutusRequests) GetNewPaymentAddress ¶
func (p *PlutusRequests) GetNewPaymentAddress(coin string) (addr string, err error)
func (*PlutusRequests) GetWalletBalance ¶
func (p *PlutusRequests) GetWalletBalance(coin string) (plutus.Balance, error)
func (*PlutusRequests) SubmitPayment ¶
func (p *PlutusRequests) SubmitPayment(body plutus.SendAddressBodyReq) (txid string, err error)
func (*PlutusRequests) ValidateRawTx ¶
func (p *PlutusRequests) ValidateRawTx(body plutus.ValidateRawTxReq) (valid bool, err error)
type PlutusService ¶
Click to show internal directories.
Click to hide internal directories.