Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIKey = "" // send an email out to support@bitrefill.com for the API key
View Source
var APISecret = "" // send an email out to support@bitrefill.com for the API key
Functions ¶
func GetRequest ¶
GetRequest is a handler that makes it easy to send out GET requests we don't set timeouts here because block times can be variable and a single request can sometimes take a long while to complete
func PostRequest ¶
PostRequest is a handler that makes it easy to send out POST requests
func PutRequest ¶
PutRequest is a handler that makes it easy to send out PUT requests
func SetAPIParams ¶
Types ¶
type GetLnChannelInventoryReturn ¶
type GetLnChannelInventoryReturn struct { Operator struct { Name string `json:"name"` Slug string `json:"slug"` Currency string `json:"currency"` Packages []struct { Value string `json:"value"` EuroPrice string `json:"eurprice"` SatoshiPrice string `json:"satoshiPrice"` USDPrice string `json:"usdPrice"` UserPrice string `json:"userPrice"` } `json:"packages"` } `json:"operator"` }
func GetLnChannelInventory ¶
func GetLnChannelInventory() (GetLnChannelInventoryReturn, error)
func GetTurboLnChannelInventory ¶
func GetTurboLnChannelInventory() (GetLnChannelInventoryReturn, error)
type ThorOrderReturn ¶
type ThorOrderReturn struct { Id string `json:"id"` Email string `json:"email"` Expired bool `json:"expired"` Value string `json:"value"` Product string `json:"product"` Price int64 `json:"price"` PartialPayment bool `json:"partialPayment"` UserRef string `json:"userRef"` Status string `json:"status"` Payment struct { Address string `json:"address"` LightningInvoice string `json:"lightningInvoice"` SatoshiPrice string `json:"satoshiPrice"` AltcoinCode string `json:"altcoinCode"` } `json:"payment"` ThorInfo struct { Link string `json:"link"` K1 string `json:"k1"` LnURL string `json:"lnurl"` Other string `json:"other"` } `json:"thorInfo"` }
func GetOrderId ¶
func GetOrderId(orderId string) (ThorOrderReturn, error)
func PostOrder ¶
func PostOrder(paymentMode string, sendEmail string, email string) (ThorOrderReturn, error)
func PostPurchase ¶
func PostPurchase(paymentMode string, sendEmail string, email string) (ThorOrderReturn, error)
Click to show internal directories.
Click to hide internal directories.