Documentation
¶
Index ¶
- Constants
- func ParseError(resp *Response) error
- type APIError
- type Billing
- type Client
- func (c *Client) AddRecord(ctx context.Context, domainName string, record Record) (*Response, error)
- func (c *Client) DeleteRecord(ctx context.Context, domainName string, recordID int) (*Response, error)
- func (c *Client) GetRecords(ctx context.Context, domainName string, recordID int) (*Record, error)
- func (c *Client) GetUser(ctx context.Context, userID string) (*User, error)
- func (c *Client) ListRecords(ctx context.Context, domainName string) (*ListResponse, error)
- type Errors
- type ListResponse
- type Market
- type Pager
- type Record
- type Response
- type User
- type Zone
Constants ¶
View Source
const StatusSuccess = "success"
StatusSuccess expected status text when success.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Billing ¶
type Billing struct {
ID int `json:"id"`
Profile string `json:"profile"`
IsDefault bool `json:"isDefault"`
Name string `json:"name"`
City string `json:"city"`
Street string `json:"street"`
CompanyRegID int `json:"companyRegId"`
TaxID int `json:"taxId"`
VatID int `json:"vatId"`
Zip string `json:"zip"`
Country string `json:"country"`
ISIC string `json:"isic"`
}
type Client ¶
Client a Websupport DNS API client.
func (*Client) AddRecord ¶
func (c *Client) AddRecord(ctx context.Context, domainName string, record Record) (*Response, error)
AddRecord adds a DNS record. https://rest.websupport.sk/docs/v1.zone#post-record
func (*Client) DeleteRecord ¶
func (c *Client) DeleteRecord(ctx context.Context, domainName string, recordID int) (*Response, error)
DeleteRecord deletes a DNS record. https://rest.websupport.sk/docs/v1.zone#delete-record
func (*Client) GetRecords ¶
GetRecords gets a DNS record.
func (*Client) GetUser ¶
GetUser gets a user detail. https://rest.websupport.sk/docs/v1.user#user
func (*Client) ListRecords ¶
ListRecords lists all records. https://rest.websupport.sk/docs/v1.zone#records
type ListResponse ¶
type Response ¶
type Response struct {
Item *Record `json:"item"`
Status string `json:"status"`
Errors json.RawMessage `json:"errors"`
}
type User ¶
type User struct {
ID int `json:"id"`
Login string `json:"login"`
ParentID int `json:"parentId"`
Active bool `json:"active"`
CreateTime int `json:"createTime"`
Group string `json:"group"`
Email string `json:"email"`
Phone string `json:"phone"`
ContactPerson string `json:"contactPerson"`
AwaitingTosConfirmation string `json:"awaitingTosConfirmation"`
UserLanguage string `json:"userLanguage"`
Credit int `json:"credit"`
VerifyURL string `json:"verifyUrl"`
Billing []Billing `json:"billing"`
Market Market `json:"market"`
}
Click to show internal directories.
Click to hide internal directories.