Documentation ¶
Index ¶
- type APIParams
- type AccountInfo
- type AccountInfoResponse
- type AccountInfoService
- type Balance
- type BalanceBodyParams
- type BalanceParams
- type BalanceResponse
- type BalanceService
- type CallbackAddressBodyParams
- type CallbackAddressParams
- type Client
- type DepositAddress
- type DepositAddressBodyParams
- type DepositAddressParams
- type DepositAddressResponse
- type DepositAddressService
- type RateBodyParams
- type RateInfo
- type RateParams
- type RateResponse
- type RateService
- type Transaction
- type TransactionBodyParams
- type TransactionParams
- type TransactionResponse
- type TransactionResponseError
- type TransactionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfoResponse ¶
type AccountInfoResponse struct { Error string `json:"error"` Result *AccountInfo `json:"result"` }
type AccountInfoService ¶
type AccountInfoService struct { ApiPublicKey string Params APIParams // contains filtered or unexported fields }
func (*AccountInfoService) Show ¶
func (s *AccountInfoService) Show() (AccountInfoResponse, *http.Response, error)
type Balance ¶
type Balance struct { // Balance uint64 `json:"balance,string"` BalanceF string `json:"balancef"` CoinStatus string `json:"coin_status"` Status string `json:"status"` }
Balances struct for JSON Response `Balance` field is commented because the response has a mix of types for the field "balance" (satoshi)
func (*Balance) GetSatoshi ¶
type BalanceBodyParams ¶
type BalanceBodyParams struct { APIParams BalanceParams }
type BalanceParams ¶
type BalanceParams struct {
All uint8 `url:"all"`
}
type BalanceResponse ¶
type BalanceService ¶
type BalanceService struct { ApiPublicKey string Params BalanceBodyParams // contains filtered or unexported fields }
func (*BalanceService) Show ¶
func (s *BalanceService) Show(balanceParams *BalanceParams) (BalanceResponse, *http.Response, error)
type CallbackAddressBodyParams ¶
type CallbackAddressBodyParams struct { APIParams CallbackAddressParams }
type CallbackAddressParams ¶
type Client ¶
type Client struct { AccountInfo *AccountInfoService Rates *RateService Balances *BalanceService DepositAddresses *DepositAddressService Transactions *TransactionService // contains filtered or unexported fields }
type DepositAddress ¶
type DepositAddressBodyParams ¶
type DepositAddressBodyParams struct { APIParams DepositAddressParams }
type DepositAddressParams ¶
type DepositAddressParams struct {
Currency string `url:"currency"`
}
type DepositAddressResponse ¶
type DepositAddressResponse struct { Error string `json:"error"` Result *DepositAddress `json:"result"` }
type DepositAddressService ¶
type DepositAddressService struct { ApiPublicKey string Params DepositAddressBodyParams // contains filtered or unexported fields }
func (*DepositAddressService) GetNewAddress ¶
func (s *DepositAddressService) GetNewAddress(depositAddressParams *DepositAddressParams) (DepositAddressResponse, *http.Response, error)
func (*DepositAddressService) GetNewCallbackAddress ¶
func (s *DepositAddressService) GetNewCallbackAddress(callbackAddressParams *CallbackAddressParams) (DepositAddressResponse, *http.Response, error)
type RateBodyParams ¶
type RateBodyParams struct { APIParams RateParams }
type RateInfo ¶
type RateInfo struct { IsFiat uint8 `json:"is_fiat"` RateBTC string `json:"rate_btc"` LastUpdate string `json:"last_update"` TransactionFee string `json:"tx_fee"` Name string `json:"name"` Confirms string `json:"confirms"` CanConvert uint8 `json:"can_convert"` Status string `json:"status"` Capabilities []string `json:"capabilities"` }
type RateParams ¶
type RateResponse ¶
type RateService ¶
type RateService struct { ApiPublicKey string Params RateBodyParams // contains filtered or unexported fields }
func (*RateService) Show ¶
func (s *RateService) Show(params *RateParams) (RateResponse, *http.Response, error)
type Transaction ¶
type TransactionBodyParams ¶
type TransactionBodyParams struct { APIParams TransactionParams }
type TransactionParams ¶
type TransactionParams struct { Amount float64 `url:"amount"` Currency1 string `url:"currency1"` Currency2 string `url:"currency2"` Address string `url:"address"` BuyerEmail string `url:"buyer_email"` BuyerName string `url:"buyer_name"` ItemName string `url:"item_name"` ItemNumber string `url:"item_number"` Invoice string `url:"invoice"` Custom string `url:"custom"` IPNUrl string `url:"ipn_url"` }
type TransactionResponse ¶
type TransactionResponse struct { Error string `json:"error"` Result *Transaction `json:"result"` }
type TransactionResponseError ¶
type TransactionResponseError struct { Error string `json:"error"` Result []*Transaction `json:"result"` }
type TransactionService ¶
type TransactionService struct { ApiPublicKey string Params TransactionBodyParams // contains filtered or unexported fields }
func (*TransactionService) NewTransaction ¶
func (s *TransactionService) NewTransaction(transactionParams *TransactionParams) (TransactionResponse, *http.Response, error)
TODO: if we generate an error in the sling POST request, we get the error: json: cannot unmarshal array into Go struct field TransactionResponse.result of type coinpayments.Transaction" if you change TransactionResponse.Result to be of type []*Transaction then you can see the error message but when we don't get an error, it is a single *Transaction and the slice will throw an error
Click to show internal directories.
Click to hide internal directories.