domain

package
v5.8.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2019 License: MIT Imports: 4 Imported by: 74

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(c gotransip.Client, domainName string, endTime gotransip.CancellationTime) error

Cancel cancels a domain name, will automatically create and sign a cancellation document

func CancelDomainAction

func CancelDomainAction(c gotransip.Client, domain string) error

CancelDomainAction cancels a failed domain action

func GetAuthCode

func GetAuthCode(c gotransip.Client, domainName string) (string, error)

GetAuthCode returns the Auth code for a domainName

func GetDomainNames

func GetDomainNames(c gotransip.Client) ([]string, error)

GetDomainNames returns list with domain names or error when this failed

func GetIsLocked

func GetIsLocked(c gotransip.Client, domainName string) (bool, error)

GetIsLocked returns the lock status for a domainName

func GetWhois

func GetWhois(c gotransip.Client, domainName string) (string, error)

GetWhois returns the whois of a domain name

func Register

func Register(c gotransip.Client, domain Domain) error

Register registers a domain name and will automatically create and sign a proposition for it

func RetryCurrentDomainActionWithNewData

func RetryCurrentDomainActionWithNewData(c gotransip.Client, domain Domain) error

RetryCurrentDomainActionWithNewData retries a failed domain action with new domain data. The Domain.Name field must contain the name of the Domain. The Nameservers, Contacts, DNSEntries fields contain the new data for this domain.

func RetryTransferWithDifferentAuthCode

func RetryTransferWithDifferentAuthCode(c gotransip.Client, domain Domain, newAuthCode string) error

RetryTransferWithDifferentAuthCode retries a transfer action with a new authcode

func SetContacts

func SetContacts(c gotransip.Client, domainName, contacts WhoisContacts) error

SetContacts starts a contact change of a domain, this will replace all existing contacts

func SetDNSEntries

func SetDNSEntries(c gotransip.Client, domainName string, dnsEntries DNSEntries) error

SetDNSEntries sets the DnsEntries for this Domain, will replace all existing dns entries with the new entries

func SetLock

func SetLock(c gotransip.Client, domainName string) error

SetLock locks this domain

func SetNameservers

func SetNameservers(c gotransip.Client, domainName string, nameservers Nameservers) error

SetNameservers starts a nameserver change for this domain, will replace all existing nameservers with the new nameservers

func SetOwner

func SetOwner(c gotransip.Client, domainName, registrantWhoisContact WhoisContact) error

SetOwner starts an owner change of a domain

func TransferWithOwnerChange

func TransferWithOwnerChange(c gotransip.Client, domain, authCode string) error

TransferWithOwnerChange transfers a domain with changing the owner

func TransferWithoutOwnerChange

func TransferWithoutOwnerChange(c gotransip.Client, domain, authCode string) error

TransferWithoutOwnerChange transfers a domain without changing the owner

func UnsetLock

func UnsetLock(c gotransip.Client, domainName string) error

UnsetLock unlocks this domain

Types

type Action

type Action string

Action reflects the available actions to perform on a domain

var (
	// ActionRegister registers a domain
	ActionRegister Action = "register"
	// ActionTransfer transfers a domain to another provider
	ActionTransfer Action = "transfer"
	// ActionInternalPull transfers a domain to another account at TransIP
	ActionInternalPull Action = "internalpull"
)

type ActionResult

type ActionResult struct {
	Name      string `xml:"name"`
	HasFailed bool   `xml:"hasFailed"`
	Message   string `xml:"message"`
}

ActionResult represents a Transip_DomainAction object as described at https://api.transip.nl/docs/transip.nl/class-Transip_DomainAction.html

func GetCurrentDomainAction

func GetCurrentDomainAction(c gotransip.Client, domainName string) (ActionResult, error)

GetCurrentDomainAction returns info about the action this domain is currently running

type Branding

type Branding struct {
	CompanyName     string `xml:"companyName"`
	SupportEmail    string `xml:"supportEmail"`
	CompanyURL      string `xml:"companyUrl"`
	TermsOfUsageURL string `xml:"termsOfUsageUrl"`
	BannerLine1     string `xml:"bannerLine1"`
	BannerLine2     string `xml:"bannerLine2"`
	BannerLine3     string `xml:"bannerLine3"`
}

Branding represents a Transip_DomainBranding object as described at https://api.transip.nl/docs/transip.nl/class-Transip_DomainBranding.html

func (Branding) EncodeArgs

func (b Branding) EncodeArgs(key string) string

EncodeArgs returns Branding XML body ready to be passed in the SOAP call

func (Branding) EncodeParams

func (b Branding) EncodeParams(prm gotransip.ParamsContainer, prefix string)

EncodeParams returns WhoisContacts parameters ready to be used for constructing a signature the order of parameters added here has to match the order in the WSDL as described at http://api.transip.nl/wsdl/?service=DomainService

type Capability

type Capability string

Capability represents the possible capabilities a TLD can have

var (
	// CapabilityRequiresAuthCode defines this TLD requires an auth code
	// to be transferred
	CapabilityRequiresAuthCode Capability = "requiresAuthCode"
	// CapabilityCanRegister defines this TLD can be registered
	CapabilityCanRegister Capability = "canRegister"
	// CapabilityCanTransferWithOwnerChange defines this TLD can be transferred
	// with change of ownership
	CapabilityCanTransferWithOwnerChange Capability = "canTransferWithOwnerChange"
	// CapabilityCanTransferWithoutOwnerChange defines this TLD can be
	// transferred without change of ownership
	CapabilityCanTransferWithoutOwnerChange Capability = "canTransferWithoutOwnerChange"
	// CapabilityCanSetLock defines this TLD allows to be locked
	CapabilityCanSetLock Capability = "canSetLock"
	// CapabilityCanSetOwner defines this TLD supports setting an owner
	CapabilityCanSetOwner Capability = "canSetOwner"
	// CapabilityCanSetContacts defines this TLD supports setting contacts
	CapabilityCanSetContacts Capability = "canSetContacts"
	// CapabilityCanSetNameservers defines this TLD supports setting nameservers
	CapabilityCanSetNameservers Capability = "canSetNameservers"
)

type CheckResult

type CheckResult struct {
	DomainName string   `xml:"domainName"`
	Status     Status   `xml:"status"`
	Actions    []Action `xml:"actions>item"`
}

CheckResult represents a Transip_DomainCheckResult object as described at https://api.transip.nl/docs/transip.nl/class-Transip_DomainCheckResult.html

func BatchCheckAvailability

func BatchCheckAvailability(c gotransip.Client, domainNames []string) ([]CheckResult, error)

BatchCheckAvailability checks the availability of multiple domains

type DNSEntries

type DNSEntries []DNSEntry

DNSEntries is just an array of DNSEntry basically only here so it can implement paramsEncoder

func (DNSEntries) EncodeArgs

func (d DNSEntries) EncodeArgs(key string) string

EncodeArgs returns DNSEntries XML body ready to be passed in the SOAP call

func (DNSEntries) EncodeParams

func (d DNSEntries) EncodeParams(prm gotransip.ParamsContainer, prefix string)

EncodeParams returns DNSEntries parameters ready to be used for constructing a signature the order of parameters added here has to match the order in the WSDL as described at http://api.transip.nl/wsdl/?service=DomainService

type DNSEntry

type DNSEntry struct {
	Name    string       `xml:"name"`
	TTL     int64        `xml:"expire"`
	Type    DNSEntryType `xml:"type"`
	Content string       `xml:"content"`
}

DNSEntry represents a Transip_DnsEntry object as described at https://api.transip.nl/docs/transip.nl/class-Transip_DnsEntry.html

type DNSEntryType

type DNSEntryType string

DNSEntryType represents the possible types of DNS entries

var (
	// DNSEntryTypeA represents an A-record
	DNSEntryTypeA DNSEntryType = "A"
	// DNSEntryTypeAAAA represents an AAAA-record
	DNSEntryTypeAAAA DNSEntryType = "AAAA"
	// DNSEntryTypeCNAME represents a CNAME-record
	DNSEntryTypeCNAME DNSEntryType = "CNAME"
	// DNSEntryTypeMX represents an MX-record
	DNSEntryTypeMX DNSEntryType = "MX"
	// DNSEntryTypeNS represents an NS-record
	DNSEntryTypeNS DNSEntryType = "NS"
	// DNSEntryTypeTXT represents a TXT-record
	DNSEntryTypeTXT DNSEntryType = "TXT"
	// DNSEntryTypeSRV represents an SRV-record
	DNSEntryTypeSRV DNSEntryType = "SRV"
)

type Domain

type Domain struct {
	Name              string         `xml:"name"`
	Nameservers       []Nameserver   `xml:"nameservers>item"`
	Contacts          []WhoisContact `xml:"contacts>item"`
	DNSEntries        []DNSEntry     `xml:"dnsEntries>item"`
	Branding          Branding       `xml:"branding"`
	AuthorizationCode string         `xml:"authCode"`
	IsLocked          bool           `xml:"isLocked"`
	RegistrationDate  util.XMLTime   `xml:"registrationDate"`
	RenewalDate       util.XMLTime   `xml:"renewalDate"`
}

Domain represents a Transip_Domain object as described at https://api.transip.nl/docs/transip.nl/class-Transip_Domain.html

func BatchGetInfo

func BatchGetInfo(c gotransip.Client, domainNames []string) ([]Domain, error)

BatchGetInfo returns array of Domain for given name or error when this failed

func GetInfo

func GetInfo(c gotransip.Client, domainName string) (Domain, error)

GetInfo returns Domain for given name or error when this failed

func (Domain) EncodeArgs

func (d Domain) EncodeArgs(key string) string

EncodeArgs returns Domain XML body ready to be passed in the SOAP call

func (Domain) EncodeParams

func (d Domain) EncodeParams(prm gotransip.ParamsContainer, prefix string)

EncodeParams returns Domain parameters ready to be used for constructing a signature the order of parameters added here has to match the order in the WSDL as described at http://api.transip.nl/wsdl/?service=DomainService

type Nameserver

type Nameserver struct {
	Hostname    string `xml:"hostname"`
	IPv4Address net.IP `xml:"ipv4"`
	IPv6Address net.IP `xml:"ipv6"`
}

Nameserver represents a Transip_Nameserver object as described at https://api.transip.nl/docs/transip.nl/class-Transip_Nameserver.html

type Nameservers

type Nameservers []Nameserver

Nameservers is just an array of Nameserver basically only here so it can implement paramsEncoder

func (Nameservers) EncodeArgs

func (n Nameservers) EncodeArgs(key string) string

EncodeArgs returns Nameservers XML body ready to be passed in the SOAP call

func (Nameservers) EncodeParams

func (n Nameservers) EncodeParams(prm gotransip.ParamsContainer, prefix string)

EncodeParams returns Nameservers parameters ready to be used for constructing a signature the order of parameters added here has to match the order in the WSDL as described at http://api.transip.nl/wsdl/?service=DomainService

type Status

type Status string

Status reflects the current status of a domain in a check result

var (
	// StatusInYourAccount means he domain name is already in your account
	StatusInYourAccount Status = "inyouraccount"
	// StatusUnavailable means the domain name is currently unavailable and can not be registered due to unknown reasons.
	StatusUnavailable Status = "unavailable"
	// StatusNotFree means the domain name has already been registered
	StatusNotFree Status = "notfree"
	// StatusFree means the domain name is currently free, is available and can be registered
	StatusFree Status = "free"
	// StatusInternalPull means the domain name is currently registered at TransIP and is available to be pulled from another account to yours.
	StatusInternalPull Status = "internalpull"
	// StatusInternalPush means the domain name is currently registered at TransIP in your accounta and is available to be pushed to another account.
	StatusInternalPush Status = "internalpush"
)

func CheckAvailability

func CheckAvailability(c gotransip.Client, domainName string) (Status, error)

CheckAvailability returns the availability status of a domain.

type TLD

type TLD struct {
	Name                     string       `xml:"name"`
	Price                    float64      `xml:"price"`
	RenewalPrice             float64      `xml:"renewalPrice"`
	Capabilities             []Capability `xml:"capabilities>item"`
	RegistrationPeriodLength int64        `xml:"registrationPeriodLength"`
	CancelTimeFrame          int64        `xml:"cancelTimeFrame"`
}

TLD represents a Transip_Tld object as described at https://api.transip.nl/docs/transip.nl/class-Transip_Tld.html

func GetAllTLDInfos

func GetAllTLDInfos(c gotransip.Client) ([]TLD, error)

GetAllTLDInfos returns slice with TLD objects or error when this failed

func GetTldInfo

func GetTldInfo(c gotransip.Client, tldName string) (TLD, error)

GetTldInfo returns info about a specific TLD

type WhoisContact

type WhoisContact struct {
	Type        string `xml:"type"`
	FirstName   string `xml:"firstName"`
	MiddleName  string `xml:"middleName"`
	LastName    string `xml:"lastName"`
	CompanyName string `xml:"companyName"`
	CompanyKvk  string `xml:"companyKvk"`
	CompanyType string `xml:"companyType"`
	Street      string `xml:"street"`
	Number      string `xml:"number"`
	PostalCode  string `xml:"postalCode"`
	City        string `xml:"city"`
	PhoneNumber string `xml:"phoneNumber"`
	FaxNumber   string `xml:"faxNumber"`
	Email       string `xml:"email"`
	Country     string `xml:"country"`
}

WhoisContact represents a TransIP_WhoisContact object as described at https://api.transip.nl/docs/transip.nl/class-Transip_WhoisContact.html

type WhoisContacts

type WhoisContacts []WhoisContact

WhoisContacts is just an array of WhoisContact basically only here so it can implement paramsEncoder

func (WhoisContacts) EncodeArgs

func (w WhoisContacts) EncodeArgs(key string) string

EncodeArgs returns WhoisContacts XML body ready to be passed in the SOAP call

func (WhoisContacts) EncodeParams

func (w WhoisContacts) EncodeParams(prm gotransip.ParamsContainer, prefix string)

EncodeParams returns WhoisContacts parameters ready to be used for constructing a signature the order of parameters added here has to match the order in the WSDL as described at http://api.transip.nl/wsdl/?service=DomainService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL