Documentation ¶
Index ¶
- Constants
- func ParseError(resp *Response) error
- type APIError
- type Billing
- type Client
- func (c *Client) AddRecord(domainName string, record Record) (*Response, error)
- func (c *Client) DeleteRecord(domainName string, recordID int) (*Response, error)
- func (c *Client) GetRecords(domainName string, recordID int) (*Record, error)
- func (c *Client) GetUser(userID string) (*User, error)
- func (c *Client) ListRecords(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 ¶
type Client struct { BaseURL string HTTPClient *http.Client // contains filtered or unexported fields }
Client a Websupport DNS API client.
func (*Client) AddRecord ¶
AddRecord adds a DNS record. https://rest.websupport.sk/docs/v1.zone#post-record
func (*Client) DeleteRecord ¶
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 ¶
func (c *Client) ListRecords(domainName string) (*ListResponse, error)
ListRecords lists all records. https://rest.websupport.sk/docs/v1.zone#records
type ListResponse ¶
type Response ¶
type Response struct { Status string `json:"status"` Item *Record `json:"item"` 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.