Documentation
¶
Index ¶
- Variables
- type Address
- type Alias
- type Avatar
- type AvatarImage
- type Client
- func (c *Client) CreateDeviceServer(description string, permittedIPs []net.IP) (*DeviceServer, error)
- func (c *Client) CreateInstallation() (*Installation, error)
- func (c *Client) CreateSession() (*Session, error)
- func (c *Client) GetDevice(id int) (interface{}, error)
- func (c *Client) GetDeviceServer(id int) (*DeviceServer, error)
- func (c *Client) GetInstallation(id int) (*Installation, error)
- func (c *Client) GetInstallationID() (int, error)
- func (c *Client) GetUser(id int) (interface{}, error)
- func (c *Client) ListDeviceServers() ([]*DeviceServer, error)
- func (c *Client) ListDevices() ([]interface{}, error)
- func (c *Client) ListUsers() ([]interface{}, error)
- func (c *Client) SetPrivateKey(r io.Reader) error
- type DevicePhone
- type DeviceServer
- type DirectorAlias
- type Error
- type Errors
- type Installation
- type InstallationToken
- type Limit
- type NotificationFilter
- type Session
- type SessionToken
- type Time
- type UBO
- type UserCompany
Constants ¶
This section is empty.
Variables ¶
var ErrDeviceNotFound = errors.New("device not found")
ErrDeviceNotFound is returned when a single Device resource was not found.
var ErrDeviceServerNotFound = errors.New("device server not found")
ErrDeviceServerNotFound is returned when a single DeviceServer resource was not found.
var ErrInstallationNotFound = errors.New("installation not found")
ErrInstallationNotFound is returned when a single Installation resource was not found.
var ErrUserNotFound = errors.New("user not found")
ErrUserNotFound is returned when a single User resource was not found.
Functions ¶
This section is empty.
Types ¶
type Avatar ¶
type Avatar struct {
UUID string `json:"uuid"`
AnchorUUID string `json:"anchor_uuid"`
Image []AvatarImage `json:"image"`
}
type AvatarImage ¶
type Client ¶
type Client struct {
HTTPClient *http.Client
BaseURL string
APIKey string
Token string
PrivateKey *rsa.PrivateKey
}
Client is the API client for the public bunq API.
func (*Client) CreateDeviceServer ¶
func (c *Client) CreateDeviceServer(description string, permittedIPs []net.IP) (*DeviceServer, error)
CreateDeviceServer creates a DeviceServer resource at the bunq API.
func (*Client) CreateInstallation ¶
func (c *Client) CreateInstallation() (*Installation, error)
CreateInstallation creates an installation resource at the bunq API.
func (*Client) CreateSession ¶
CreateSession creates a new session for a DeviceServer at the bunq API.
func (*Client) GetDeviceServer ¶
func (c *Client) GetDeviceServer(id int) (*DeviceServer, error)
GetDeviceServer gets a DeviceServer resource at the bunq API.
func (*Client) GetInstallation ¶
func (c *Client) GetInstallation(id int) (*Installation, error)
GetInstallation gets an Installation resource at the bunq API.
func (*Client) GetInstallationID ¶
GetInstallationID gets the installation ID of the Installation used for the current session.
func (*Client) ListDeviceServers ¶
func (c *Client) ListDeviceServers() ([]*DeviceServer, error)
ListDeviceServers gets a list of DeviceServer resources at the bunq API.
func (*Client) ListDevices ¶
ListDevices gets a list of Device resources at the bunq API.
type DevicePhone ¶
type DevicePhone struct {
ID int
CreatedAt time.Time
UpdatedAt time.Time
Description string
PhoneNumber string
OS string
Status string
}
A DevicePhone represents a Device at the bunq API.
type DeviceServer ¶
type DeviceServer struct {
ID int
CreatedAt time.Time
UpdatedAt time.Time
Description string
IP net.IP
Status string
}
A DeviceServer represents a DeviceServe at the bunq API.
type DirectorAlias ¶
type Installation ¶
type Installation struct {
ID int
Token InstallationToken
ServerPublicKey string
}
An Installation represents an installation resource at the bunq API.
type InstallationToken ¶
An InstallationToken is used for authenticating requests to the bunq API.
type NotificationFilter ¶
type Session ¶
type Session struct {
ID int
Token SessionToken
UserCompany UserCompany
}
A Session represents a SessionServer at the bunq API.
type SessionToken ¶
A SessionToken is used for authenticating requests to the bunq API.
type Time ¶
Time represents a parsed timestamp returned by the bunq API.
func (*Time) MarshalText ¶
MarshalText implements the encoding.MarshalText interface for custom time type.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON is being used to parse timestamps from the bunq API. Bunq timestamps come into this format: "2015-06-13 23:19:16.215235"
type UserCompany ¶
type UserCompany struct {
ID int `json:"id"`
CreatedAt Time `json:"created"`
UpdatedAt Time `json:"updated"`
PublicUUID string `json:"public_uuid"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
PublicNickName string `json:"public_nick_name"`
Alias []Alias `json:"alias"`
ChamberOfCommerceNumber string `json:"chamber_of_commerce_number"`
TypeOfBusinessEntity string `json:"type_of_business_entity"`
SectorOfIndustry string `json:"sector_of_industry"`
CounterBankIBAN string `json:"counter_bank_IBAN"`
Avatar Avatar `json:"avatar"`
AddressMain Address `json:"address_main"`
AddressPostal Address `json:"address_postal"`
VersionTermsOfService string `json:"version_terms_of_service"`
DirectorAlias DirectorAlias `json:"director_alias"`
Language string `json:"language"`
Region string `json:"region"`
UBO []UBO `json:"UBO"`
Status string `json:"status"`
SubStatus string `json:"sub_status"`
SessionTimeout int `json:"session_timeout"`
DailyLimitWithoutConfirmationLogin Limit `json:"daily_limit_without_confirmation_login"`
NotificationFilters []NotificationFilter `json:"notification_filters"`
}