Documentation
¶
Index ¶
- type APIKeyClient
- func (c APIKeyClient) Account(ID string) (Account, error)
- func (c APIKeyClient) Accounts(p ...PaginationParams) *AccountIterator
- func (c APIKeyClient) Request(method string, url string, params interface{}, result interface{}) (res *http.Response, err error)
- func (c APIKeyClient) User() (*User, error)
- type Account
- type AccountIterator
- type Buy
- type BuyIterator
- type Error
- type OAuthClient
- func (c OAuthClient) Account(ID string) (Account, error)
- func (c OAuthClient) Accounts(p ...PaginationParams) *AccountIterator
- func (o *OAuthClient) CreateAuthorizeUrl(scope []string, state string) string
- func (o *OAuthClient) RefreshTokens(refreshToken string) (*OAuthToken, error)
- func (c OAuthClient) Request(method string, url string, params interface{}, result interface{}) (res *http.Response, err error)
- func (o *OAuthClient) SetToken(token string)
- func (o *OAuthClient) Tokens(code string) (*OAuthToken, error)
- func (c OAuthClient) User() (*User, error)
- type OAuthToken
- type PaginationParams
- type SortOrder
- type Transaction
- type TransactionIterator
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyClient ¶
type APIKeyClient struct {
// contains filtered or unexported fields
}
func NewAPIKeyClient ¶
func NewAPIKeyClient(secret, key string) *APIKeyClient
func (APIKeyClient) Accounts ¶
func (c APIKeyClient) Accounts(p ...PaginationParams) *AccountIterator
type Account ¶
type Account struct {
Balance struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"balance"`
CreatedAt time.Time `json:"created_at"`
Currency struct {
AddressRegex string `json:"address_regex"`
Code string `json:"code"`
Color string `json:"color"`
Exponent int `json:"exponent"`
Name string `json:"name"`
Type string `json:"type"`
} `json:"currency"`
ID string `json:"id"`
Name string `json:"name"`
Primary bool `json:"primary"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
Type string `json:"type"`
UpdatedAt time.Time `json:"updated_at"`
// contains filtered or unexported fields
}
func (Account) Buys ¶
func (a Account) Buys(p ...PaginationParams) *BuyIterator
func (Account) Transaction ¶
func (a Account) Transaction(transactionID string) (Transaction, error)
func (Account) Transactions ¶
func (a Account) Transactions(p ...PaginationParams) *TransactionIterator
type AccountIterator ¶
type AccountIterator struct {
// contains filtered or unexported fields
}
func (*AccountIterator) Next ¶
func (it *AccountIterator) Next() (Account, error)
func (*AccountIterator) PageInfo ¶
func (it *AccountIterator) PageInfo() *iterator.PageInfo
type Buy ¶
type Buy struct {
ID string `json:"id"`
Status string `json:"status"`
PaymentMethod struct {
ID string `json:"id"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
} `json:"payment_method"`
Transaction struct {
ID string `json:"id"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
} `json:"transaction"`
Amount struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"amount"`
Total struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"total"`
Subtotal struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"subtotal"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
Committed bool `json:"committed"`
Instant bool `json:"instant"`
Fee struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"fee"`
PayoutAt string `json:"payout_at"`
}
type BuyIterator ¶
type BuyIterator struct {
// contains filtered or unexported fields
}
func (*BuyIterator) Next ¶
func (it *BuyIterator) Next() (Buy, error)
func (*BuyIterator) PageInfo ¶
func (it *BuyIterator) PageInfo() *iterator.PageInfo
type OAuthClient ¶
type OAuthClient struct {
// contains filtered or unexported fields
}
func NewOAuthClient ¶
func NewOAuthClient(clientID, clientSecret, redirectURL string) *OAuthClient
func (OAuthClient) Accounts ¶
func (c OAuthClient) Accounts(p ...PaginationParams) *AccountIterator
func (*OAuthClient) CreateAuthorizeUrl ¶
func (o *OAuthClient) CreateAuthorizeUrl(scope []string, state string) string
func (*OAuthClient) RefreshTokens ¶
func (o *OAuthClient) RefreshTokens(refreshToken string) (*OAuthToken, error)
func (*OAuthClient) SetToken ¶
func (o *OAuthClient) SetToken(token string)
func (*OAuthClient) Tokens ¶
func (o *OAuthClient) Tokens(code string) (*OAuthToken, error)
type OAuthToken ¶
type PaginationParams ¶
type Transaction ¶
type Transaction struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
Amount struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"amount"`
NativeAmount struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"native_amount"`
Description string `json:"description"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
Buy struct {
ID string `json:"id"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
} `json:"buy,omitempty"`
Details struct {
Title string `json:"title"`
Subtitle string `json:"subtitle"`
} `json:"details"`
To struct {
Resource string `json:"resource"`
Email string `json:"email"`
} `json:"to,omitempty"`
InstantExchange bool `json:"instant_exchange,omitempty"`
Sell struct {
ID string `json:"id"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
} `json:"sell,omitempty"`
Network struct {
Status string `json:"status"`
Name string `json:"name"`
} `json:"network,omitempty"`
}
type TransactionIterator ¶
type TransactionIterator struct {
// contains filtered or unexported fields
}
func (*TransactionIterator) Next ¶
func (it *TransactionIterator) Next() (Transaction, error)
func (*TransactionIterator) PageInfo ¶
func (it *TransactionIterator) PageInfo() *iterator.PageInfo
type User ¶
type User struct {
AvatarURL string `json:"avatar_url"`
BitcoinUnit string `json:"bitcoin_unit"`
Country struct {
Code string `json:"code"`
Name string `json:"name"`
} `json:"country"`
CreatedAt time.Time `json:"created_at"`
Email string `json:"email"`
ID string `json:"id"`
Name string `json:"name"`
NativeCurrency string `json:"native_currency"`
ProfileBio string `json:"profile_bio"`
ProfileLocation string `json:"profile_location"`
ProfileURL string `json:"profile_url"`
Resource string `json:"resource"`
ResourcePath string `json:"resource_path"`
State string `json:"state"`
Tiers struct {
Body string `json:"body"`
CompletedDescription string `json:"completed_description"`
Header string `json:"header"`
UpgradeButtonText string `json:"upgrade_button_text"`
} `json:"tiers"`
TimeZone string `json:"time_zone"`
Username string `json:"username"`
}
Click to show internal directories.
Click to hide internal directories.