Documentation ¶
Index ¶
- type Action
- type Availability
- type AvailabilityStatus
- type Branding
- type Contact
- type DNSEntry
- type DNSSecEntry
- type Domain
- type Nameserver
- type PerformAction
- type Register
- type Repository
- func (r *Repository) AddDNSEntry(domainName string, dnsEntry DNSEntry) error
- func (r *Repository) Cancel(domainName string, endTime gotransip.CancellationTime) error
- func (r *Repository) CancelDomainAction(domainName string) error
- func (r *Repository) GetAll() ([]Domain, error)
- func (r *Repository) GetAllByTags(tags []string) ([]Domain, error)
- func (r *Repository) GetAvailability(domainName string) (Availability, error)
- func (r *Repository) GetAvailabilityForMultipleDomains(domainNames []string) ([]Availability, error)
- func (r *Repository) GetBranding(domainName string) (Branding, error)
- func (r *Repository) GetByDomainName(domainName string) (Domain, error)
- func (r *Repository) GetContacts(domainName string) ([]WhoisContact, error)
- func (r *Repository) GetDNSEntries(domainName string) ([]DNSEntry, error)
- func (r *Repository) GetDNSSecEntries(domainName string) ([]DNSSecEntry, error)
- func (r *Repository) GetDomainAction(domainName string) (Action, error)
- func (r *Repository) GetNameservers(domainName string) ([]Nameserver, error)
- func (r *Repository) GetSSLCertificateByID(domainName string, certificateID int64) (SslCertificate, error)
- func (r *Repository) GetSSLCertificates(domainName string) ([]SslCertificate, error)
- func (r *Repository) GetSelection(page int, itemsPerPage int) ([]Domain, error)
- func (r *Repository) GetTLDByTLD(tld string) (Tld, error)
- func (r *Repository) GetTLDs() ([]Tld, error)
- func (r *Repository) GetWHOIS(domainName string) (string, error)
- func (r *Repository) OrderWhitelabel() error
- func (r *Repository) Register(domainRegister Register) error
- func (r *Repository) RemoveDNSEntry(domainName string, dnsEntry DNSEntry) error
- func (r *Repository) ReplaceDNSEntries(domainName string, dnsEntries []DNSEntry) error
- func (r *Repository) ReplaceDNSSecEntries(domainName string, dnsSecEntries []DNSSecEntry) error
- func (r *Repository) RetryDomainAction(domainName string, authCode string, dnsEntries []DNSEntry, ...) error
- func (r *Repository) Transfer(domainTransfer Transfer) error
- func (r *Repository) Update(domain Domain) error
- func (r *Repository) UpdateBranding(domainName string, branding Branding) error
- func (r *Repository) UpdateContacts(domainName string, contacts []WhoisContact) error
- func (r *Repository) UpdateDNSEntry(domainName string, dnsEntry DNSEntry) error
- func (r *Repository) UpdateNameservers(domainName string, nameservers []Nameserver) error
- type SslCertificate
- type Tld
- type Transfer
- type WhoisContact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // If this action has failed, this field will be true. HasFailed bool `json:"hasFailed,omitempty"` // If this action has failed, this field will contain an descriptive message. Message string `json:"message,omitempty"` // The name of this Action. Name string `json:"name"` }
Action struct for a domain Action
type Availability ¶
type Availability struct { // List of available actions to perform on this domain. Possible actions are: 'register', 'transfer', 'internalpull' and 'internalpush' Actions []PerformAction `json:"actions"` // The name of the domain DomainName string `json:"domainName"` // The status for this domain. Possible statuses are: 'inyouraccount', 'unavailable', 'notfree', 'free', 'internalpull' and 'internalpush' Status AvailabilityStatus `json:"status"` }
Availability struct for an Availability
type AvailabilityStatus ¶
type AvailabilityStatus string
AvailabilityStatus is the status for a domain. Returned during queries upon the availability Possible statuses are: 'inyouraccount', 'unavailable', 'notfree', 'free', 'internalpull', 'internalpush'
const ( // AvailabilityStatusInYourAccount is the availability status for when a domain is already in your account AvailabilityStatusInyouraccount AvailabilityStatus = "inyouraccount" AvailabilityStatusUnavailable AvailabilityStatus = "unavailable" // AvailabilityStatusNotFree is the availability status for when a domain is already taken AvailabilityStatusNotFree AvailabilityStatus = "notfree" // AvailabilityStatusFree is the availability status for when a domain is free to register AvailabilityStatusFree AvailabilityStatus = "free" // AvailabilityStatusInternalPull is the availability status, // for when a domain is at transip and can be handovered pushed/pulled towards a different account AvailabilityStatusInternalPull AvailabilityStatus = "internalpull" // AvailabilityStatusInternalPush is the availability status, // for when a domain is at transip and can be handovered pushed/pulled towards a different account AvailabilityStatusInternalPush AvailabilityStatus = "internalpush" )
define all possible availability statuses
type Branding ¶
type Branding struct { // The first generic bannerLine displayed in whois-branded whois output. BannerLine1 string `json:"bannerLine1"` // The second generic bannerLine displayed in whois-branded whois output. BannerLine2 string `json:"bannerLine2"` // The third generic bannerLine displayed in whois-branded whois output. BannerLine3 string `json:"bannerLine3"` // The company name displayed in transfer-branded e-mails CompanyName string `json:"companyName"` // The company url displayed in transfer-branded e-mails CompanyURL string `json:"companyUrl"` // The support email used for transfer-branded e-mails SupportEmail string `json:"supportEmail"` // The terms of usage url as displayed in transfer-branded e-mails TermsOfUsageURL string `json:"termsOfUsageUrl"` }
Branding struct for a Branding, this information is shown in the whois information
type Contact ¶
type Contact struct { // Email address of the contact Email string `json:"email"` // ID number of the contact ID int64 `json:"id"` // Name of the contact Name string `json:"name"` // Telephone number of the contact Telephone string `json:"telephone"` }
Contact struct for a Contact
type DNSEntry ¶
type DNSEntry struct { // The name of the dns entry, for example '@' or 'www' Name string `json:"name"` // The expiration period of the dns entry, in seconds. For example 86400 for a day of expiration Expire int `json:"expire"` // The type of dns entry. Possbible types are 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'TXT', 'SRV', 'SSHFP' and 'TLSA' Type string `json:"type"` // The content of of the dns entry, for example '10 mail', '127.0.0.1' or 'www' Content string `json:"content"` }
DNSEntry struct for a DNSEntry
type DNSSecEntry ¶
type DNSSecEntry struct { // The algorithm type that is used, // see: https://www.transip.nl/vragen/461-domeinnaam-nameservers-gebruikt-beveiligen-dnssec/ for the possible options. Algorithm int `json:"algorithm"` // The signing key number, either 256 (Zone Signing Key) or 257 (Key Signing Key) Flags int `json:"flags"` // A 5-digit key of the Zonesigner KeyTag int `json:"keyTag"` // The public key PublicKey string `json:"publicKey"` }
DNSSecEntry struct for a DNSSecEntry
type Domain ¶
type Domain struct { // The custom tags added to this domain. Tags []string `json:"tags"` // The authcode for this domain as generated by the registry. AuthCode string `json:"authCode,omitempty"` // Cancellation data, in YYYY-mm-dd h:i:s format, null if the domain is active. CancellationDate rest.Time `json:"cancellationDate,omitempty"` // Cancellation status, null if the domain is active, 'cancelled' when the domain is cancelled. CancellationStatus string `json:"cancellationStatus,omitempty"` // Whether this domain is DNS only IsDNSOnly bool `json:"isDnsOnly,omitempty"` // If this domain supports transfer locking, this flag is true when the domains ability to transfer is locked at the registry. IsTransferLocked bool `json:"isTransferLocked"` // If this domain is added to your whitelabel. IsWhitelabel bool `json:"isWhitelabel"` // The name, including the tld of this domain Name string `json:"name"` // Registration date of the domain, in YYYY-mm-dd format. RegistrationDate rest.Date `json:"registrationDate,omitempty"` // Next renewal date of the domain, in YYYY-mm-dd format. RenewalDate rest.Date `json:"renewalDate,omitempty"` // Status of the domain Status string `json:"status,omitempty"` }
Domain struct for a Domain
type Nameserver ¶
type Nameserver struct { // The hostname of this nameserver Hostname string `json:"hostname"` // Optional ipv4 glue record for this nameserver IPv4 net.IP `json:"ipv4,omitempty"` // Optional ipv6 glue record for this nameserver IPv6 net.IP `json:"ipv6,omitempty"` }
Nameserver struct for a Nameserver
type PerformAction ¶
type PerformAction string
PerformAction List of available actions to perform on this domain. Possible actions are: 'register', 'transfer', 'internalpull' and 'internalpush'
const ( // PerformActionTransfer is the available perform transfer action PerformActionTransfer PerformAction = "transfer" // PerformActionInternalPull is the available perform internalpull action, // for when a domain is at transip and can be handovered pushed/pulled towards a different account PerformActionInternalPull PerformAction = "internalpull" // PerformActionInternalPush is the available perform internalpush action, // for when a domain is at transip and can be handovered pushed/pulled towards a different account PerformActionInternalPush PerformAction = "internalpush" )
define all possible actions that a user can perform on a domain
type Register ¶
type Register struct { // The name, including the tld of the domain DomainName string `json:"domainName"` // Optionally you can set whois contacts Contacts []Contact `json:"contacts,omitempty"` // Optionally you can set the domain dns entries before transferring DNSEntries []DNSEntry `json:"dnsEntries,omitempty"` // Optionally you can set the domain nameservers before transferring Nameservers []Nameserver `json:"nameservers,omitempty"` }
Register struct used when registering a new domain
type Repository ¶
type Repository repository.RestRepository
Repository can be used to get a list of your domains, order new ones and changing specific domain properties
func (*Repository) AddDNSEntry ¶
func (r *Repository) AddDNSEntry(domainName string, dnsEntry DNSEntry) error
AddDNSEntry allows you to add a single dns entry to a domain
func (*Repository) Cancel ¶
func (r *Repository) Cancel(domainName string, endTime gotransip.CancellationTime) error
Cancel cancels the specified domain. Depending on the time you want to cancel the domain, specify gotransip.CancellationTimeEnd or gotransip.CancellationTimeImmediately for the endTime attribute.
func (*Repository) CancelDomainAction ¶
func (r *Repository) CancelDomainAction(domainName string) error
CancelDomainAction allows you to cancel a domain action while it is still pending or being processed
func (*Repository) GetAll ¶
func (r *Repository) GetAll() ([]Domain, error)
GetAll returns all domains listed in your account
func (*Repository) GetAllByTags ¶
func (r *Repository) GetAllByTags(tags []string) ([]Domain, error)
GetAllByTags returns a list of all Domains that match the tags provided
func (*Repository) GetAvailability ¶
func (r *Repository) GetAvailability(domainName string) (Availability, error)
GetAvailability method allows you to check the availability for a domain name
func (*Repository) GetAvailabilityForMultipleDomains ¶
func (r *Repository) GetAvailabilityForMultipleDomains(domainNames []string) ([]Availability, error)
GetAvailabilityForMultipleDomains method allows you to check the availability for a list of domain names
func (*Repository) GetBranding ¶
func (r *Repository) GetBranding(domainName string) (Branding, error)
GetBranding returns a Branding struct for the given domain. Branding can be altered using the method below
func (*Repository) GetByDomainName ¶
func (r *Repository) GetByDomainName(domainName string) (Domain, error)
GetByDomainName returns a Domain struct for a specific domain name.
Requires a domainName, for example: 'example.com'
func (*Repository) GetContacts ¶
func (r *Repository) GetContacts(domainName string) ([]WhoisContact, error)
GetContacts returns a list of contacts for the given domain name
func (*Repository) GetDNSEntries ¶
func (r *Repository) GetDNSEntries(domainName string) ([]DNSEntry, error)
GetDNSEntries returns a list of all DNS entries for a domain by domainName
func (*Repository) GetDNSSecEntries ¶
func (r *Repository) GetDNSSecEntries(domainName string) ([]DNSSecEntry, error)
GetDNSSecEntries returns a list of all DNS Sec entries for a domain by domainName
func (*Repository) GetDomainAction ¶
func (r *Repository) GetDomainAction(domainName string) (Action, error)
GetDomainAction allows you to get the current domain action running for the given domain. Domain actions are kept track of by TransIP. Domain actions include, for example, changing nameservers.
func (*Repository) GetNameservers ¶
func (r *Repository) GetNameservers(domainName string) ([]Nameserver, error)
GetNameservers will list all nameservers currently set for a domain.
func (*Repository) GetSSLCertificateByID ¶
func (r *Repository) GetSSLCertificateByID(domainName string, certificateID int64) (SslCertificate, error)
GetSSLCertificateByID allows you to get a single SSL certificate by id.
func (*Repository) GetSSLCertificates ¶
func (r *Repository) GetSSLCertificates(domainName string) ([]SslCertificate, error)
GetSSLCertificates allows you to get a list of SSL certificates for a specific domain
func (*Repository) GetSelection ¶
func (r *Repository) GetSelection(page int, itemsPerPage int) ([]Domain, error)
GetSelection returns a limited list of all domains in your account, specify how many and which page/chunk of domains you want to retrieve
func (*Repository) GetTLDByTLD ¶
func (r *Repository) GetTLDByTLD(tld string) (Tld, error)
GetTLDByTLD returns information about a specific TLD. General details such as price, renewal price and minimum registration length are outlined.
func (*Repository) GetTLDs ¶
func (r *Repository) GetTLDs() ([]Tld, error)
GetTLDs will return a list of all available TLDs currently offered by TransIP
func (*Repository) GetWHOIS ¶
func (r *Repository) GetWHOIS(domainName string) (string, error)
GetWHOIS will return the WHOIS information for a domain name as a string
func (*Repository) OrderWhitelabel ¶
func (r *Repository) OrderWhitelabel() error
OrderWhitelabel allows you to order a whitelabel account. Note that you do not need to order a whitelabel account for every registered domain name.
func (*Repository) Register ¶
func (r *Repository) Register(domainRegister Register) error
Register allows you to registers a new domain. You can set the contacts, nameservers and DNS entries immediately, but it’s not mandatory for registration.
func (*Repository) RemoveDNSEntry ¶
func (r *Repository) RemoveDNSEntry(domainName string, dnsEntry DNSEntry) error
RemoveDNSEntry allows you to remove a single DNS entry from a domain
func (*Repository) ReplaceDNSEntries ¶
func (r *Repository) ReplaceDNSEntries(domainName string, dnsEntries []DNSEntry) error
ReplaceDNSEntries will wipe the entire zone replacing it with the given dns entries
func (*Repository) ReplaceDNSSecEntries ¶
func (r *Repository) ReplaceDNSSecEntries(domainName string, dnsSecEntries []DNSSecEntry) error
ReplaceDNSSecEntries allows you to replace all DNSSEC entries with the ones that are provided
func (*Repository) RetryDomainAction ¶
func (r *Repository) RetryDomainAction(domainName string, authCode string, dnsEntries []DNSEntry, nameservers []Nameserver, contacts []WhoisContact) error
RetryDomainAction allows you to retry a failed domain action. Domain actions can fail due to wrong information, this method allows you to retry an action.
func (*Repository) Transfer ¶
func (r *Repository) Transfer(domainTransfer Transfer) error
Transfer allows you to transfer a domain to TransIP using its transfer key (or ‘EPP code’) by specifying it in the authCode parameter
func (*Repository) Update ¶
func (r *Repository) Update(domain Domain) error
Update an existing domain. To apply or release a lock, change the IsTransferLocked property. To change tags, update the tags property.
func (*Repository) UpdateBranding ¶
func (r *Repository) UpdateBranding(domainName string, branding Branding) error
UpdateBranding allows you to change the branding information on a domain
func (*Repository) UpdateContacts ¶
func (r *Repository) UpdateContacts(domainName string, contacts []WhoisContact) error
UpdateContacts allows you to replace the whois contacts currently on a domain
func (*Repository) UpdateDNSEntry ¶
func (r *Repository) UpdateDNSEntry(domainName string, dnsEntry DNSEntry) error
UpdateDNSEntry updates the content of a single DNS entry, the dns entry is identified by the 'Name', 'Expire' and 'Type' properties of the DNSEntry struct
func (*Repository) UpdateNameservers ¶
func (r *Repository) UpdateNameservers(domainName string, nameservers []Nameserver) error
UpdateNameservers allows you to change the nameservers for a domain
type SslCertificate ¶
type SslCertificate struct { // The id of the certificate, can be used to retrieve additional info CertificateID int `json:"certificateId"` // The domain name that the SSL certificate is added to. Start with '*.' when the certificate is a wildcard. CommonName string `json:"commonName"` // Expiration date ExpirationDate string `json:"expirationDate"` // The current status, either 'active', 'inactive' or 'expired' Status string `json:"status"` }
SslCertificate struct for a SslCertificate
type Tld ¶
type Tld struct { // Number of days a domain needs to be canceled before the renewal date. CancelTimeFrame int `json:"cancelTimeFrame,omitempty"` // A list of the capabilities that this Tld has (the things that can be done with a domain under this tld). // Possible capabilities are: 'requiresAuthCode', 'canRegister', 'canTransferWithOwnerChange', // 'canTransferWithoutOwnerChange', 'canSetLock', 'canSetOwner', 'canSetContacts', 'canSetNameservers', // 'supportsDnsSec' Capabilities []string `json:"capabilities,omitempty"` // The maximum amount of characters need for registering a domain under this TLD. MaxLength int `json:"maxLength,omitempty"` // The minimum amount of characters need for registering a domain under this TLD. MinLength int `json:"minLength,omitempty"` // The name of this TLD, including the starting dot. E.g. .nl or .com. Name string `json:"name"` // Price of the TLD in cents Price int `json:"price,omitempty"` // Price for renewing the TLD in cents RecurringPrice int `json:"recurringPrice,omitempty"` // Length in months of each registration or renewal period. RegistrationPeriodLength int `json:"registrationPeriodLength,omitempty"` }
Tld struct for a Tld
type Transfer ¶
type Transfer struct { // The name, including the tld of the domain DomainName string `json:"domainName"` // The authcode for this domain as generated by the registry. AuthCode string `json:"authCode"` // Optionally you can set whois contacts Contacts []Contact `json:"contacts,omitempty"` // Optionally you can set the domain dns entries before transferring DNSEntries []DNSEntry `json:"dnsEntries,omitempty"` // Optionally you can set the domain nameservers before transferring Nameservers []Nameserver `json:"nameservers,omitempty"` }
Transfer struct used when transferring a domain to transip
type WhoisContact ¶
type WhoisContact struct { // The type of this Contact, 'registrant', 'administrative' or 'technical' Type string `json:"type"` // The firstName of this Contact FirstName string `json:"firstName"` // The lastName of this Contact LastName string `json:"lastName"` // The companyName of this Contact, in case of a company CompanyName string `json:"companyName"` // The kvk number of this Contact, in case of a company CompanyKvk string `json:"companyKvk"` // The type number of this Contact, in case of a company. // Possible types are: 'BV', 'BVI/O', 'COOP', 'CV', 'EENMANSZAAK', 'KERK', 'NV', // 'OWM', 'REDR', 'STICHTING', 'VERENIGING', 'VOF', 'BEG', 'BRO', 'EESV' and 'ANDERS' CompanyType string `json:"companyType"` // The street of the address of this Contact Street string `json:"street"` // The number part of the address of this Contact Number string `json:"number"` // The postalCode part of the address of this Contact PostalCode string `json:"postalCode"` // The city part of the address of this Contact City string `json:"city"` // The phoneNumber of this Contact PhoneNumber string `json:"phoneNumber"` // The faxNumber of this Contact FaxNumber string `json:"faxNumber,omitempty"` // The email address of this Contact Email string `json:"email"` // The country of this Contact, one of the ISO 3166-1 2 letter country codes, must be lowercase. Country string `json:"country"` }
WhoisContact struct for a whois contact