Documentation ¶
Index ¶
- Constants
- func CheckResponse(r *Response) error
- type Client
- type Contact
- type DomainCheckResponse
- type DomainInfoResponse
- type DomainList
- type DomainListRequest
- type DomainRegisterRequest
- type DomainRegisterResponse
- type DomainService
- type DomainServiceOp
- func (s *DomainServiceOp) Check(domains []string) ([]DomainCheckResponse, error)
- func (s *DomainServiceOp) Delete(domain string, scheduledDate time.Time) error
- func (s *DomainServiceOp) Info(domain string, roId int) (*DomainInfoResponse, error)
- func (s *DomainServiceOp) List(request *DomainListRequest) (*DomainList, error)
- func (s *DomainServiceOp) Register(request *DomainRegisterRequest) (*DomainRegisterResponse, error)
- func (s *DomainServiceOp) Whois(domain string) (string, error)
- type ErrorResponse
- type NameserverCheckResponse
- type NameserverDomain
- type NameserverRecord
- type NameserverRecordRequest
- type NameserverService
- type NameserverServiceOp
- func (s *NameserverServiceOp) Check(domain string, nameservers []string) (*NameserverCheckResponse, error)
- func (s *NameserverServiceOp) CreateRecord(request *NameserverRecordRequest) (int, error)
- func (s *NameserverServiceOp) DeleteRecord(recId int) error
- func (s *NameserverServiceOp) Info(domain string, domainId int) (*NamserverInfoResponse, error)
- func (s *NameserverServiceOp) List(domain string) (*NamserverListResponse, error)
- func (s *NameserverServiceOp) UpdateRecord(recId int, request *NameserverRecordRequest) error
- type NamserverInfoResponse
- type NamserverListResponse
- type Request
- type Response
Constants ¶
View Source
const ( APIBaseUrl = "https://api.domrobot.com/xmlrpc/" APISandboxBaseUrl = "https://api.ote.domrobot.com/xmlrpc/" APILanguage = "eng" )
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present.
Types ¶
type Client ¶
type Client struct { // HTTP client used to communicate with the INWX API. RPCClient *xmlrpc.Client // Base URL for API requests. BaseURL *url.URL // API username Username string // API password Password string // User agent for client APILanguage string // Services used for communicating with the API Domains DomainService Nameservers NameserverService }
Client manages communication with INWX API.
type Contact ¶
type Contact struct { RoId int Id int Type string Name string Org string Street string City string PostalCode string `mapstructure:"pc"` StateProvince string `mapstructure:"sp"` Country string `mapstructure:"cc"` Phone string `mapstructure:"voice"` Fax string Email string Remarks string Protection int }
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"` }
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 int `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 string `mapstructure:"noDelegation"` Contacts map[string]Contact `mapstructure:"contact"` }
type DomainList ¶
type DomainList struct { Count int Domains []DomainInfoResponse `mapstructure:"domain"` }
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"` }
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"` }
type DomainRegisterResponse ¶
type DomainService ¶
type DomainService interface { Check(domains []string) ([]DomainCheckResponse, error) Register(request *DomainRegisterRequest) (*DomainRegisterResponse, error) Delete(domain string, scheduledDate time.Time) error Info(domain string, roId int) (*DomainInfoResponse, error) List(*DomainListRequest) (*DomainList, error) Whois(domain string) (string, error) }
type DomainServiceOp ¶
type DomainServiceOp struct {
// contains filtered or unexported fields
}
func (*DomainServiceOp) Check ¶
func (s *DomainServiceOp) Check(domains []string) ([]DomainCheckResponse, error)
func (*DomainServiceOp) Delete ¶
func (s *DomainServiceOp) Delete(domain string, scheduledDate time.Time) error
func (*DomainServiceOp) Info ¶
func (s *DomainServiceOp) Info(domain string, roId int) (*DomainInfoResponse, error)
func (*DomainServiceOp) List ¶
func (s *DomainServiceOp) List(request *DomainListRequest) (*DomainList, error)
func (*DomainServiceOp) Register ¶
func (s *DomainServiceOp) Register(request *DomainRegisterRequest) (*DomainRegisterResponse, error)
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 NameserverCheckResponse ¶
type NameserverDomain ¶ added in v0.2.0
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"` }
type NameserverRecord ¶
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"` 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"` }
type NameserverService ¶
type NameserverService interface { Check(domain string, nameservers []string) (*NameserverCheckResponse, error) Info(domain string, domainId int) (*NamserverInfoResponse, error) List(domain string) (*NamserverListResponse, error) CreateRecord(*NameserverRecordRequest) (int, error) UpdateRecord(recId int, request *NameserverRecordRequest) error DeleteRecord(recId int) error }
type NameserverServiceOp ¶
type NameserverServiceOp struct {
// contains filtered or unexported fields
}
func (*NameserverServiceOp) Check ¶
func (s *NameserverServiceOp) Check(domain string, nameservers []string) (*NameserverCheckResponse, error)
func (*NameserverServiceOp) CreateRecord ¶
func (s *NameserverServiceOp) CreateRecord(request *NameserverRecordRequest) (int, error)
func (*NameserverServiceOp) DeleteRecord ¶
func (s *NameserverServiceOp) DeleteRecord(recId int) error
func (*NameserverServiceOp) Info ¶
func (s *NameserverServiceOp) Info(domain string, domainId int) (*NamserverInfoResponse, error)
func (*NameserverServiceOp) List ¶ added in v0.2.0
func (s *NameserverServiceOp) List(domain string) (*NamserverListResponse, error)
func (*NameserverServiceOp) UpdateRecord ¶
func (s *NameserverServiceOp) UpdateRecord(recId int, request *NameserverRecordRequest) error
type NamserverInfoResponse ¶
type NamserverListResponse ¶ added in v0.2.0
type NamserverListResponse struct { Count int Domains []NameserverDomain `mapstructure:"domains"` }
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.
Click to show internal directories.
Click to hide internal directories.