Documentation ¶
Index ¶
- Variables
- type APIClient
- type APIKey
- type Address
- type AppApiService
- func (a *AppApiService) CreateAddress(ctx context.Context, appId string, coin string) (Address, *http.Response, error)
- func (a *AppApiService) CreateInvoice(ctx context.Context, appId string, appInvoice AppInvoice) (AppInvoiceCreated, *http.Response, error)
- func (a *AppApiService) CreateWalletInvoice(ctx context.Context, appId string, coin string, walletInvoice WalletInvoice) (WalletInvoiceCreated, *http.Response, error)
- func (a *AppApiService) GetBalance(ctx context.Context, appId string, coin string) (WalletBalance, *http.Response, error)
- func (a *AppApiService) GetInvoice(ctx context.Context, appId string, invoiceId string) (InvoiceStatus, *http.Response, error)
- func (a *AppApiService) SendOnePayment(ctx context.Context, appId string, coin string, payment Payment) (Transaction, *http.Response, error)
- func (a *AppApiService) SendPayments(ctx context.Context, appId string, coin string, payments Payments) (Transaction, *http.Response, error)
- type AppInvoice
- type AppInvoiceCreated
- type BasicAuth
- type Configuration
- type Error
- type GenericOpenAPIError
- type InvoiceStatus
- type InvoiceStatusData
- type Payment
- type Payments
- type Transaction
- type WalletBalance
- type WalletInvoice
- type WalletInvoiceCreated
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { AppApi *AppApiService // contains filtered or unexported fields }
APIClient manages communication with the Biwse API V1 Reference API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type Address ¶
type Address struct { // New receive address Address string `json:"address,omitempty"` }
type AppApiService ¶
type AppApiService service
func (*AppApiService) CreateAddress ¶
func (a *AppApiService) CreateAddress(ctx context.Context, appId string, coin string) (Address, *http.Response, error)
AppApiService Create new address Create new receive address for yor wallet.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param coin The wallet identidier
@return Address
func (*AppApiService) CreateInvoice ¶
func (a *AppApiService) CreateInvoice(ctx context.Context, appId string, appInvoice AppInvoice) (AppInvoiceCreated, *http.Response, error)
AppApiService Create invoice Create new invoice. In response you get url of invoice page
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param appInvoice
@return AppInvoiceCreated
func (*AppApiService) CreateWalletInvoice ¶
func (a *AppApiService) CreateWalletInvoice(ctx context.Context, appId string, coin string, walletInvoice WalletInvoice) (WalletInvoiceCreated, *http.Response, error)
AppApiService Create wallet invoice Create new invoice for specific wallet. In response you get url of invoice page.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param coin The wallet identidier
- @param walletInvoice
@return WalletInvoiceCreated
func (*AppApiService) GetBalance ¶
func (a *AppApiService) GetBalance(ctx context.Context, appId string, coin string) (WalletBalance, *http.Response, error)
AppApiService Retrieve wallet balance Retrieve wallet confirmed and total balance
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param coin The wallet identidier
@return WalletBalance
func (*AppApiService) GetInvoice ¶
func (a *AppApiService) GetInvoice(ctx context.Context, appId string, invoiceId string) (InvoiceStatus, *http.Response, error)
AppApiService Retreive invoice info Retrieve invoice with specified identifier string
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param invoiceId Invoice ID
@return InvoiceStatus
func (*AppApiService) SendOnePayment ¶
func (a *AppApiService) SendOnePayment(ctx context.Context, appId string, coin string, payment Payment) (Transaction, *http.Response, error)
AppApiService Send one payment Send one payments from wallet to one recipient
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param coin The wallet identidier
- @param payment
@return Transaction
func (*AppApiService) SendPayments ¶
func (a *AppApiService) SendPayments(ctx context.Context, appId string, coin string, payments Payments) (Transaction, *http.Response, error)
AppApiService Send payments Send payments from wallet to one or many recipents
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param appId The application identidier
- @param coin The wallet identidier
- @param payments
@return Transaction
type AppInvoice ¶
type AppInvoice struct { // Invoice's amount AmountUsd float32 `json:"amount_usd"` // Callback url CallbackLink string `json:"callback_link,omitempty"` // Redirect user after payment SuccessUrl string `json:"success_url,omitempty"` // Your invoice internal identifier InvoiceNumber string `json:"invoice_number,omitempty"` }
type AppInvoiceCreated ¶
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type InvoiceStatus ¶
type InvoiceStatus struct { // Invoice's amount Msg string `json:"msg,omitempty"` Data InvoiceStatusData `json:"data,omitempty"` }
type InvoiceStatusData ¶
type InvoiceStatusData struct { // Invoice's amount Amount float32 `json:"amount,omitempty"` // Number of transaction confirmations Confs float32 `json:"confs,omitempty"` // Payment receieved on address Address string `json:"address,omitempty"` // Transaction hash TxHash string `json:"tx_hash,omitempty"` // Currency type Type bool `json:"type,omitempty"` // Payment accepted or not Accepted bool `json:"accepted,omitempty"` // Verification hash VerificationHash string `json:"verification_hash,omitempty"` }
type Payments ¶
type Payments struct { // Payments array Payments []Payment `json:"payments,omitempty"` }
type Transaction ¶
type Transaction struct { // Sended transaction ID TxHash string `json:"tx_hash,omitempty"` }
type WalletBalance ¶
type WalletInvoice ¶
type WalletInvoiceCreated ¶
Source Files ¶
- api_app.go
- client.go
- configuration.go
- model_address.go
- model_app_invoice.go
- model_app_invoice_created.go
- model_error.go
- model_invoice_status.go
- model_invoice_status_data.go
- model_payment.go
- model_payments.go
- model_transaction.go
- model_wallet_balance.go
- model_wallet_invoice.go
- model_wallet_invoice_created.go