Documentation
¶
Index ¶
- Constants
- type Account
- type BuyProductDTO
- type ChangeServicePasswordDTO
- type Client
- func (client *Client) BuyProduct(name string, autoProlong bool, osId int, productId int, term string) (*Service, *Transaction, error)
- func (client *Client) ChangeServicePassword(id int, password string) (*Service, error)
- func (client *Client) DeleteService(id int) (bool, error)
- func (client *Client) GetAccount() (*Account, error)
- func (client *Client) GetAccountLimits() ([]Limit, error)
- func (client *Client) GetOS(id int) (*OS, error)
- func (client *Client) GetOSList() ([]OS, error)
- func (client *Client) GetProduct(id int) (*Product, error)
- func (client *Client) GetProducts() ([]Product, error)
- func (client *Client) GetService(id int) (*Service, error)
- func (client *Client) GetServices() ([]Service, error)
- type Configuration
- type DeleteServiceResponse
- type Error
- type Group
- type Limit
- type OS
- type Parameters
- type Price
- type Product
- type Response
- type SecureParameters
- type Service
- type Transaction
Constants ¶
View Source
const Version = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID int `json:"id"`
EMail string `json:"email"`
Balance float64 `json:"balance"`
BonusBalance float64 `json:"bonusBalance"`
BonusUsed float64 `json:"bonusUsed"`
BonusState string `json:"bonusState"`
CreatedAt int64 `json:"createdAt"`
IsSupportLocked bool `json:"isSupportLocked"`
IsOnline bool `json:"isOnline"`
}
type BuyProductDTO ¶
type ChangeServicePasswordDTO ¶
type ChangeServicePasswordDTO struct {
Password string `json:"password"`
}
type Client ¶
type Client struct {
BaseURL string
// contains filtered or unexported fields
}
func (*Client) BuyProduct ¶
func (*Client) ChangeServicePassword ¶
func (*Client) GetAccount ¶
func (*Client) GetAccountLimits ¶
func (*Client) GetProducts ¶
func (*Client) GetServices ¶
type Configuration ¶
type DeleteServiceResponse ¶
type Parameters ¶
type Product ¶
type Product struct {
ID int `json:"id"`
Type string `json:"type"`
GroupID int `json:"groupId"`
Order int `json:"order"`
InstallPrice int `json:"installPrice"`
Name string `json:"name"`
// DefaultParameters
Configuration []Configuration `json:"configuration"`
RawPrices map[string]int `json:"rawPrices"`
IsPrivate bool `json:"isPrivate"`
Group Group `json:"group"`
Prices map[string]Price `json:"prices"`
ServiceHandler string `json:"serviceHandler"`
}
type Response ¶
type Response struct {
Data struct {
SelectorMode *string `json:"selectorMode,omitempty"`
Items json.RawMessage `json:"items"`
TotalItems *int `json:"total,omitempty"`
Transaction *Transaction `json:"transaction,omitempty"`
} `json:"data,omitempty"`
Error Error `json:"error,omitempty"`
}
type SecureParameters ¶
type Service ¶
type Service struct {
ID int `json:"id"`
OwnerID int `json:"ownerId"`
ProductID int `json:"productId"`
Name string `json:"name"`
IP string `json:"ip"`
PaymentTerm string `json:"paymentTerm"`
Parameters Parameters `json:"parameters"`
SecureParameters SecureParameters `json:"secureParameters"`
AutoProlong bool `json:"autoProlong"`
Backups bool `json:"backups"`
Status string `json:"status"`
LastStatus string `json:"lastStatus"`
Product Product `json:"product"`
LocationCode string `json:"locationCode"`
Prices map[string]Price `json:"prices"`
CurrentStatus string `json:"currentStatus"`
}
type Transaction ¶
type Transaction struct {
ID int `json:"id"`
OwnerId int `json:"ownerId"`
Amount int `json:"amount"`
BonusAmount int `json:"bonusAmount"`
Mode string `json:"mode"`
Status string `json:"status"`
PerformedAt int `json:"performedAt"`
CreatedAt int `json:"createdAt"`
Type string `json:"type"`
OrderInfo json.RawMessage `json:"orderInfo"`
}
Click to show internal directories.
Click to hide internal directories.