Documentation
¶
Index ¶
- Constants
- type AccountService
- type Client
- type ClientOptions
- type Contact
- type ContactCreateRequest
- type ContactInfoResponse
- type ContactListResponse
- type ContactService
- func (s *ContactService) Create(request *ContactCreateRequest) (int, error)
- func (s *ContactService) Delete(roID int) error
- func (s *ContactService) Info(contactID int) (*ContactInfoResponse, error)
- func (s *ContactService) List(search string) (*ContactListResponse, error)
- func (s *ContactService) Update(request *ContactUpdateRequest) error
- type ContactUpdateRequest
- type DomainCheckResponse
- type DomainInfoResponse
- type DomainList
- type DomainListRequest
- type DomainPriceResponse
- type DomainRegisterRequest
- type DomainRegisterResponse
- type DomainService
- func (s *DomainService) Check(domains []string) ([]DomainCheckResponse, error)
- func (s *DomainService) Delete(domain string, scheduledDate time.Time) error
- func (s *DomainService) GetPrices(tlds []string) ([]DomainPriceResponse, error)
- func (s *DomainService) Info(domain string, roID int) (*DomainInfoResponse, error)
- func (s *DomainService) List(request *DomainListRequest) (*DomainList, error)
- func (s *DomainService) Register(request *DomainRegisterRequest) (*DomainRegisterResponse, error)
- func (s *DomainService) Update(request *DomainUpdateRequest) (float32, error)
- func (s *DomainService) Whois(domain string) (string, error)
- type DomainUpdateRequest
- type DomainUpdateResponse
- type ErrorResponse
- type LoginResponse
- type NameserverCheckResponse
- type NameserverCreateRequest
- type NameserverDomain
- type NameserverInfoRequest
- type NameserverInfoResponse
- type NameserverListRequest
- type NameserverListResponse
- type NameserverRecord
- type NameserverRecordRequest
- type NameserverService
- func (s *NameserverService) Check(domain string, nameservers []string) (*NameserverCheckResponse, error)
- func (s *NameserverService) Create(request *NameserverCreateRequest) (int, error)
- func (s *NameserverService) CreateRecord(request *NameserverRecordRequest) (int, error)
- func (s *NameserverService) DeleteRecord(recID int) error
- func (s *NameserverService) FindRecordByID(recID int) (*NameserverRecord, *NameserverDomain, error)
- func (s *NameserverService) Info(request *NameserverInfoRequest) (*NameserverInfoResponse, error)
- func (s *NameserverService) List(domain string) (*NameserverListResponse, error)
- func (s *NameserverService) ListWithParams(request *NameserverListRequest) (*NameserverListResponse, error)
- func (s *NameserverService) UpdateRecord(recID int, request *NameserverRecord) error
- type NamserverInfoResponse
- type NamserverListResponse
- type Request
- type Response
- type SlaveInfo
Constants ¶
const ( APIBaseURL = "https://api.domrobot.com/xmlrpc/" APISandboxBaseURL = "https://api.ote.domrobot.com/xmlrpc/" APILanguage = "en" )
API information.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountService ¶
type AccountService service
AccountService API access to Account.
func (*AccountService) Login ¶
func (s *AccountService) Login() (*LoginResponse, error)
Login Account login.
func (*AccountService) Unlock ¶
func (s *AccountService) Unlock(tan string) error
Unlock Account unlock.
type Client ¶
type Client struct {
// HTTP client used to communicate with the INWX API.
RPCClient *xmlrpc.Client
// Services used for communicating with the API
Account *AccountService
Domains *DomainService
Nameservers *NameserverService
Contacts *ContactService
// contains filtered or unexported fields
}
Client manages communication with INWX API.
func NewClient ¶
func NewClient(username, password string, opts *ClientOptions) *Client
NewClient returns a new INWX API client.
type ClientOptions ¶
type ClientOptions struct {
Sandbox bool
// Language of the return message. (en/de/es)
Lang string
// Base URL for API requests (only for client testing purpose).
BaseURL *url.URL
}
ClientOptions Options of the API client.
type Contact ¶
type Contact struct {
RoID int `mapstructure:"roId"`
ID string `mapstructure:"id"`
Type string `mapstructure:"type"`
Name string `mapstructure:"name"`
Org string `mapstructure:"org"`
Street string `mapstructure:"street"`
City string `mapstructure:"city"`
PostalCode string `mapstructure:"pc"`
StateProvince string `mapstructure:"sp"`
Country string `mapstructure:"cc"`
Phone string `mapstructure:"voice"`
Fax string `mapstructure:"fax"`
Email string `mapstructure:"email"`
Remarks string `mapstructure:"remarks"`
Protection string `mapstructure:"protection"`
}
Contact API model.
type ContactCreateRequest ¶
type ContactCreateRequest struct {
Type string `structs:"type"`
Name string `structs:"name"`
Org string `structs:"org,omitempty"`
Street string `structs:"street"`
City string `structs:"city"`
PostalCode string `structs:"pc"`
StateProvince string `structs:"sp,omitempty"`
CountryCode string `structs:"cc"`
Voice string `structs:"voice"`
Fax string `structs:"fax,omitempty"`
Email string `structs:"email"`
Remarks string `structs:"remarks,omitempty"`
Protection bool `structs:"protection,omitempty"`
Testing bool `structs:"testing,omitempty"`
}
ContactCreateRequest API model.
type ContactInfoResponse ¶
type ContactInfoResponse struct {
Contact Contact `mapstructure:"contact"`
}
ContactInfoResponse API model.
type ContactListResponse ¶
type ContactListResponse struct {
Count int `mapstructure:"count"`
Contacts []Contact `mapstructure:"contact"`
}
ContactListResponse API model.
type ContactService ¶
type ContactService service
ContactService API access to Contact.
func (*ContactService) Create ¶
func (s *ContactService) Create(request *ContactCreateRequest) (int, error)
Create Creates a contact.
func (*ContactService) Delete ¶
func (s *ContactService) Delete(roID int) error
Delete Deletes a contact.
func (*ContactService) Info ¶
func (s *ContactService) Info(contactID int) (*ContactInfoResponse, error)
Info Get information about a contact.
func (*ContactService) List ¶
func (s *ContactService) List(search string) (*ContactListResponse, error)
List Search contacts.
func (*ContactService) Update ¶
func (s *ContactService) Update(request *ContactUpdateRequest) error
Update Updates a contact.
type ContactUpdateRequest ¶
type ContactUpdateRequest struct {
ID int `structs:"id"`
Name string `structs:"name,omitempty"`
Org string `structs:"org,omitempty"`
Street string `structs:"street,omitempty"`
City string `structs:"city,omitempty"`
PostalCode string `structs:"pc,omitempty"`
StateProvince string `structs:"sp,omitempty"`
CountryCode string `structs:"cc,omitempty"`
Voice string `structs:"voice,omitempty"`
Fax string `structs:"fax,omitempty"`
Email string `structs:"email,omitempty"`
Remarks string `structs:"remarks,omitempty"`
Protection bool `structs:"protection,omitempty"`
Testing bool `structs:"testing,omitempty"`
}
ContactUpdateRequest API model.
type DomainCheckResponse ¶
type DomainCheckResponse struct {
Available int `mapstructure:"avail"`
Status string `mapstructure:"status"`
Name string `mapstructure:"name"`
Domain string `mapstructure:"domain"`
TLD string `mapstructure:"tld"`
CheckMethod string `mapstructure:"checkmethod"`
Price float32 `mapstructure:"price"`
CheckTime float32 `mapstructure:"checktime"`
}
DomainCheckResponse API model.
type DomainInfoResponse ¶
type DomainInfoResponse struct {
RoID int `mapstructure:"roId"`
Domain string `mapstructure:"domain"`
DomainAce string `mapstructure:"domainAce"`
Period string `mapstructure:"period"`
CrDate time.Time `mapstructure:"crDate"`
ExDate time.Time `mapstructure:"exDate"`
UpDate time.Time `mapstructure:"upDate"`
ReDate time.Time `mapstructure:"reDate"`
ScDate time.Time `mapstructure:"scDate"`
TransferLock bool `mapstructure:"transferLock"`
Status string `mapstructure:"status"`
AuthCode string `mapstructure:"authCode"`
RenewalMode string `mapstructure:"renewalMode"`
TransferMode string `mapstructure:"transferMode"`
Registrant int `mapstructure:"registrant"`
Admin int `mapstructure:"admin"`
Tech int `mapstructure:"tech"`
Billing int `mapstructure:"billing"`
Nameservers []string `mapstructure:"ns"`
NoDelegation bool `mapstructure:"noDelegation"`
Contacts map[string]Contact `mapstructure:"contact"`
}
DomainInfoResponse API model.
type DomainList ¶
type DomainList struct {
Count int `mapstructure:"count"`
Domains []DomainInfoResponse `mapstructure:"domain"`
}
DomainList API model.
type DomainListRequest ¶
type DomainListRequest struct {
Domain string `structs:"domain,omitempty"`
RoID int `structs:"roId,omitempty"`
Status int `structs:"status,omitempty"`
Registrant int `structs:"registrant,omitempty"`
Admin int `structs:"admin,omitempty"`
Tech int `structs:"tech,omitempty"`
Billing int `structs:"billing,omitempty"`
RenewalMode int `structs:"renewalMode,omitempty"`
TransferLock int `structs:"transferLock,omitempty"`
NoDelegation int `structs:"noDelegation,omitempty"`
Tag int `structs:"tag,omitempty"`
Order int `structs:"order,omitempty"`
Page int `structs:"page,omitempty"`
PageLimit int `structs:"pagelimit,omitempty"`
}
DomainListRequest API model.
type DomainPriceResponse ¶
type DomainPriceResponse struct {
Tld string `mapstructure:"tld"`
Currency string `mapstructure:"currency"`
CreatePrice float32 `mapstructure:"createPrice"`
MonthlyCreatePrice float32 `mapstructure:"monthlyCreatePrice"`
TransferPrice float32 `mapstructure:"transferPrice"`
RenewalPrice float32 `mapstructure:"renewalPrice"`
MonthlyRenewalPrice float32 `mapstructure:"monthlyRenewalPrice"`
UpdatePrice float32 `mapstructure:"updatePrice"`
TradePrice float32 `mapstructure:"tradePrice"`
TrusteePrice float32 `mapstructure:"trusteePrice"`
MonthlyTrusteePrice float32 `mapstructure:"monthlyTrusteePrice"`
CreatePeriod int `mapstructure:"createPeriod"`
TransferPeriod int `mapstructure:"transferPeriod"`
RenewalPeriod int `mapstructure:"renewalPeriod"`
TradePeriod int `mapstructure:"tradePeriod"`
}
DomainPriceResponse API model.
type DomainRegisterRequest ¶
type DomainRegisterRequest struct {
Domain string `structs:"domain"`
Period string `structs:"period,omitempty"`
Registrant int `structs:"registrant"`
Admin int `structs:"admin"`
Tech int `structs:"tech"`
Billing int `structs:"billing"`
Nameservers []string `structs:"ns,omitempty"`
TransferLock string `structs:"transferLock,omitempty"`
RenewalMode string `structs:"renewalMode,omitempty"`
WhoisProvider string `structs:"whoisProvider,omitempty"`
WhoisURL string `structs:"whoisUrl,omitempty"`
ScDate string `structs:"scDate,omitempty"`
ExtDate string `structs:"extDate,omitempty"`
Asynchron string `structs:"asynchron,omitempty"`
Voucher string `structs:"voucher,omitempty"`
Testing string `structs:"testing,omitempty"`
}
DomainRegisterRequest API model.
type DomainRegisterResponse ¶
type DomainRegisterResponse struct {
RoID int `mapstructure:"roId"`
Price float32 `mapstructure:"price"`
Currency string `mapstructure:"currency"`
}
DomainRegisterResponse API model.
type DomainService ¶
type DomainService service
DomainService API access to Domain.
func (*DomainService) Check ¶
func (s *DomainService) Check(domains []string) ([]DomainCheckResponse, error)
Check checks domains.
func (*DomainService) Delete ¶
func (s *DomainService) Delete(domain string, scheduledDate time.Time) error
Delete deletes a domain.
func (*DomainService) GetPrices ¶
func (s *DomainService) GetPrices(tlds []string) ([]DomainPriceResponse, error)
GetPrices gets TLDS prices.
func (*DomainService) Info ¶
func (s *DomainService) Info(domain string, roID int) (*DomainInfoResponse, error)
Info gets information about a domain.
func (*DomainService) List ¶
func (s *DomainService) List(request *DomainListRequest) (*DomainList, error)
List lists domains.
func (*DomainService) Register ¶
func (s *DomainService) Register(request *DomainRegisterRequest) (*DomainRegisterResponse, error)
Register registers a domain.
func (*DomainService) Update ¶
func (s *DomainService) Update(request *DomainUpdateRequest) (float32, error)
Update updates domain information.
type DomainUpdateRequest ¶
type DomainUpdateRequest struct {
Domain string `structs:"domain"`
Nameservers []string `structs:"ns,omitempty"`
TransferLock int `structs:"transferLock,omitempty"`
RenewalMode string `structs:"renewalMode,omitempty"`
TransferMode string `structs:"transferMode,omitempty"`
}
DomainUpdateRequest API model.
type DomainUpdateResponse ¶
type DomainUpdateResponse struct {
Price float32 `mapstructure:"price"`
}
DomainUpdateResponse API model.
type ErrorResponse ¶
type ErrorResponse struct {
Code int `xmlrpc:"code"`
Message string `xmlrpc:"msg"`
ReasonCode string `xmlrpc:"reasonCode"`
Reason string `xmlrpc:"reason"`
}
An ErrorResponse reports the error caused by an API request.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type LoginResponse ¶
type LoginResponse struct {
CustomerID int64 `mapstructure:"customerId"`
AccountID int64 `mapstructure:"accountId"`
TFA string `mapstructure:"tfa"`
BuildDate string `mapstructure:"builddate"`
Version string `mapstructure:"version"`
}
LoginResponse API model.
type NameserverCheckResponse ¶
type NameserverCheckResponse struct {
Details []string `mapstructure:"details"`
Status string `mapstructure:"status"`
}
NameserverCheckResponse API model.
type NameserverCreateRequest ¶
type NameserverCreateRequest struct {
Domain string `structs:"domain"`
Type string `structs:"type"`
Nameservers []string `structs:"ns,omitempty"`
MasterIP string `structs:"masterIp,omitempty"`
Web string `structs:"web,omitempty"`
Mail string `structs:"mail,omitempty"`
SoaEmail string `structs:"soaEmail,omitempty"`
URLRedirectType string `structs:"urlRedirectType,omitempty"`
URLRedirectTitle string `structs:"urlRedirectTitle,omitempty"`
URLRedirectDescription string `structs:"urlRedirectDescription,omitempty"`
URLRedirectFavIcon string `structs:"urlRedirectFavIcon,omitempty"`
URLRedirectKeywords string `structs:"urlRedirectKeywords,omitempty"`
Testing bool `structs:"testing,omitempty"`
}
NameserverCreateRequest API model.
type NameserverDomain ¶
type NameserverDomain struct {
RoID int `mapstructure:"roId"`
Domain string `mapstructure:"domain"`
Type string `mapstructure:"type"`
MasterIP string `mapstructure:"masterIp"`
Mail string `mapstructure:"mail"`
Web string `mapstructure:"web"`
URL string `mapstructure:"url"`
Ipv4 string `mapstructure:"ipv4"`
Ipv6 string `mapstructure:"ipv6"`
}
NameserverDomain API model.
type NameserverInfoRequest ¶
type NameserverInfoRequest struct {
Domain string `structs:"domain,omitempty"`
RoID int `structs:"roId,omitempty"`
RecordID int `structs:"recordId,omitempty"`
Type string `structs:"type,omitempty"`
Name string `structs:"name,omitempty"`
Content string `structs:"content,omitempty"`
TTL int `structs:"ttl,omitempty"`
Priority int `structs:"prio,omitempty"`
}
NameserverInfoRequest API model.
type NameserverInfoResponse ¶
type NameserverInfoResponse struct {
RoID int `mapstructure:"roId"`
Domain string `mapstructure:"domain"`
Type string `mapstructure:"type"`
MasterIP string `mapstructure:"masterIp"`
LastZoneCheck time.Time `mapstructure:"lastZoneCheck"`
SlaveDNS []SlaveInfo `mapstructure:"slaveDns"`
SOASerial string `mapstructure:"SOAserial"`
Count int `mapstructure:"count"`
Records []NameserverRecord `mapstructure:"record"`
}
NameserverInfoResponse API model.
type NameserverListRequest ¶
type NameserverListRequest struct {
Domain string `structs:"domain,omitempty"`
Wide int `structs:"wide,omitempty"`
Page int `structs:"page,omitempty"`
PageLimit int `structs:"pagelimit,omitempty"`
}
NameserverListRequest API model.
type NameserverListResponse ¶
type NameserverListResponse struct {
Count int `mapstructure:"count"`
Domains []NameserverDomain `mapstructure:"domains"`
}
NameserverListResponse API model.
type NameserverRecord ¶
type NameserverRecord struct {
ID int `structs:"id"`
Name string `structs:"name"`
Type string `structs:"type"`
Content string `structs:"content"`
TTL int `structs:"TTL"`
Priority int `structs:"prio"`
URLAppend bool `structs:"urlAppend,omitempty"`
URLRedirectType string `structs:"urlRedirectType,omitempty"`
URLRedirectTitle string `structs:"urlRedirectTitle,omitempty"`
URLRedirectDescription string `structs:"urlRedirectDescription,omitempty"`
URLRedirectFavIcon string `structs:"urlRedirectFavIcon,omitempty"`
URLRedirectKeywords string `structs:"urlRedirectKeywords,omitempty"`
}
NameserverRecord API model.
type NameserverRecordRequest ¶
type NameserverRecordRequest struct {
RoID int `structs:"roId,omitempty"`
Domain string `structs:"domain,omitempty"`
Type string `structs:"type"`
Content string `structs:"content"`
Name string `structs:"name,omitempty"`
TTL int `structs:"ttl,omitempty"`
Priority int `structs:"prio,omitempty"`
URLAppend bool `structs:"urlAppend,omitempty"`
URLRedirectType string `structs:"urlRedirectType,omitempty"`
URLRedirectTitle string `structs:"urlRedirectTitle,omitempty"`
URLRedirectDescription string `structs:"urlRedirectDescription,omitempty"`
URLRedirectFavIcon string `structs:"urlRedirectFavIcon,omitempty"`
URLRedirectKeywords string `structs:"urlRedirectKeywords,omitempty"`
}
NameserverRecordRequest API model.
type NameserverService ¶
type NameserverService service
NameserverService API access to Nameservers.
func (*NameserverService) Check ¶
func (s *NameserverService) Check(domain string, nameservers []string) (*NameserverCheckResponse, error)
Check checks a domain on nameservers.
func (*NameserverService) Create ¶
func (s *NameserverService) Create(request *NameserverCreateRequest) (int, error)
Create creates a nameserver.
func (*NameserverService) CreateRecord ¶
func (s *NameserverService) CreateRecord(request *NameserverRecordRequest) (int, error)
CreateRecord creates a DNS record.
func (*NameserverService) DeleteRecord ¶
func (s *NameserverService) DeleteRecord(recID int) error
DeleteRecord deletes a DNS record.
func (*NameserverService) FindRecordByID ¶
func (s *NameserverService) FindRecordByID(recID int) (*NameserverRecord, *NameserverDomain, error)
FindRecordByID search a DNS record by ID.
func (*NameserverService) Info ¶
func (s *NameserverService) Info(request *NameserverInfoRequest) (*NameserverInfoResponse, error)
Info gets information.
func (*NameserverService) List ¶
func (s *NameserverService) List(domain string) (*NameserverListResponse, error)
List lists nameservers for a domain. Deprecated: use ListWithParams instead.
func (*NameserverService) ListWithParams ¶
func (s *NameserverService) ListWithParams(request *NameserverListRequest) (*NameserverListResponse, error)
ListWithParams lists nameservers for a domain.
func (*NameserverService) UpdateRecord ¶
func (s *NameserverService) UpdateRecord(recID int, request *NameserverRecord) error
UpdateRecord updates a DNS record.
type NamserverInfoResponse ¶
type NamserverInfoResponse = NameserverInfoResponse
NamserverInfoResponse API model. Deprecated: Use NameserverInfoResponse instead.
type NamserverListResponse ¶
type NamserverListResponse = NameserverListResponse
NamserverListResponse API model. Deprecated: Use NameserverListResponse instead.
type Response ¶
type Response struct {
Code int `xmlrpc:"code"`
Message string `xmlrpc:"msg"`
ReasonCode string `xmlrpc:"reasonCode"`
Reason string `xmlrpc:"reason"`
ResponseData map[string]interface{} `xmlrpc:"resData"`
}
Response is a INWX API response. This wraps the standard http.Response returned from INWX.