pananames

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 11 Imported by: 0

README

pananames-go-client

Pananames API v2 Golang Client

Test Status

Developer Documentation

The actual API Documentation available on this link.

Usage

import "github.com/pananames/go-api-client"

pnClient, err := pananames.NewClient("token")
if err != nil {
  log.Fatalf("Failed to create client: %v", err)
}

// get all domains; default limit per_page is 30
domainsInfo, _, err := pnClient.GetDomains(nil)
if err != nil {
	log.Fatalf("Failed to get domains info: %v", err)
}

// get only domains with 'suspended' status
listOptions := &pananames.GetDomainsOptions{Status: "suspended"}
domainsInfo, _, err = pnClient.GetDomains(listOptions)
if err != nil {
	log.Fatalf("Failed to get domains info: %v", err)
}

for _,d := range domainsInfo {
	fmt.Println(d.Domain)
}
Examples

The examples directory contains serveral examples of using this library.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

Checks the API response for errors

Types

type AutoRenew

type AutoRenew struct {
	Domain    string `json:"domain"`
	AutoRenew bool   `json:"auto_renew"`
}

Represents an auto renew info

type Balance

type Balance struct {
	Balance float64 `json:"balance"`
}

Represents a balance info

type CancelTransferInOptions

type CancelTransferInOptions struct {
	Domain string `json:"domain,omitempty"`
}

Available options for CancelTransferIn()

type CheckDomainsBulkOptions

type CheckDomainsBulkOptions struct {
	Domains []string `url:"domains,omitempty"`
}

Available options for CheckDomainsBulk()

type ChildNameServer

type ChildNameServer struct {
	Hostname string `json:"hostname"`
	IPv4     string `json:"ipv4,omitempty"`
	IPv6     string `json:"ipv6,omitempty"`
}

Represents a child name server info

type ChildNameServerOptions

type ChildNameServerOptions ChildNameServer

Available options for AddChildNameServer() and UpdateChildNameServer()

type Claim

type Claim struct {
	TradeMark               string        `json:"trade_mark"`
	Jurisdiction            string        `json:"jurisdiction"`
	JurisdictionCountryCode string        `json:"jurisdiction_country_code"`
	Goods                   string        `json:"goods"`
	RegistrantContact       *ClaimContact `json:"registrant_contact"`
	AgentContact            *ClaimContact `json:"agent_contact"`
	Description             []string      `json:"description"`
}

Represents a claim info

type ClaimContact

type ClaimContact struct {
	Name         string `json:"name,omitempty"`
	Email        string `json:"email,omitempty"`
	City         string `json:"city,omitempty"`
	State        string `json:"state,omitempty"`
	Zip          string `json:"zip,omitempty"`
	Phone        string `json:"phone,omitempty"`
	Organization string `json:"organization,omitempty"`
	Street       string `json:"street,omitempty"`
	CountryCode  string `json:"country_code,omitempty"`
}

Represents a claim contact info

type Client

type Client struct {
	// contains filtered or unexported fields
}

Represents api client

func NewClient

func NewClient(token string, opts ...Option) (*Client, error)

Creates a new instance of api client

func (*Client) AddChildNameServer

func (c *Client) AddChildNameServer(domain string, opt *ChildNameServerOptions, options ...RequestOptionFunc) (*ChildNameServer, error)

Create a new child name server for the domain

func (*Client) AddNameServerRecord

func (c *Client) AddNameServerRecord(domain string, opt *NameServerRecord, options ...RequestOptionFunc) (*NameServerRecord, error)

Create a new name server record for the domain

func (*Client) CancelTransferIn

func (c *Client) CancelTransferIn(opt *CancelTransferInOptions, options ...RequestOptionFunc) error

Cancel transfer in process for domain

func (*Client) CancelTransferOut

func (c *Client) CancelTransferOut(domain string, options ...RequestOptionFunc) error

Cancel transfer out process for domain Domain will be locked again

func (*Client) CheckDomain

func (c *Client) CheckDomain(domain string, options ...RequestOptionFunc) (*DomainCheck, error)

Check domain availability and pricing This method provides crucial information needed for registration of a domain, as well as domain renewal, transfer and redemption costs

func (*Client) CheckDomainsBulk

func (c *Client) CheckDomainsBulk(opt *CheckDomainsBulkOptions, options ...RequestOptionFunc) ([]*DomainCheck, error)

Bulk check the domains availability Get information about the domains availability, prices and claim

func (*Client) DeleteChildNameServer

func (c *Client) DeleteChildNameServer(domain string, opt *DeleteChildNameServerOptions, options ...RequestOptionFunc) error

Delete a child name server for the domain by name

func (*Client) DeleteDomain

func (c *Client) DeleteDomain(domain string, options ...RequestOptionFunc) error

Delete domain

func (*Client) DeleteNameServerRecord

func (c *Client) DeleteNameServerRecord(domain string, opt *DeleteNameServerRecordsOptions, options ...RequestOptionFunc) error

Delete a specific name server record for the domain

func (*Client) DeleteNameServers

func (c *Client) DeleteNameServers(domain string, options ...RequestOptionFunc) error

Delete name servers for the domain

func (*Client) DisableDNSSec

func (c *Client) DisableDNSSec(domain string, options ...RequestOptionFunc) (*DNSSec, error)

Disable DNSSec for the domain

func (*Client) DisableDomainAutoRenew

func (c *Client) DisableDomainAutoRenew(domain string, options ...RequestOptionFunc) (*AutoRenew, error)

Disable auto renew of the domain

func (*Client) DisableDomainRedirect

func (c *Client) DisableDomainRedirect(domain string, options ...RequestOptionFunc) error

Disable redirect for the domain

func (*Client) DisableWhoisPrivacy

func (c *Client) DisableWhoisPrivacy(domain string, options ...RequestOptionFunc) (*WhoisPrivacy, error)

Disable WHOIS privacy of the domain

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)

Make an http request, check and parse response

func (*Client) EnableBulkDomainRedirect

func (c *Client) EnableBulkDomainRedirect(opt *EnableBulkDomainRedirectOptions, options ...RequestOptionFunc) (*RedirectBulk, error)

Puts in the queue the task of redirect for an array of domains The report of the operation will be sent by email

func (*Client) EnableDNSSec

func (c *Client) EnableDNSSec(domain string, opt *EnableDNSSecOptions, options ...RequestOptionFunc) (*DNSSec, error)

Enable DNSSec for the domain

func (*Client) EnableDomainAutoRenew

func (c *Client) EnableDomainAutoRenew(domain string, options ...RequestOptionFunc) (*AutoRenew, error)

Enable auto renew of the domain

func (*Client) EnableDomainRedirect

func (c *Client) EnableDomainRedirect(domain string, opt *EnableDomainRedirectOptions, options ...RequestOptionFunc) (*Redirect, error)

Enable or update redirect for the domain

func (*Client) EnableWhoisPrivacy

func (c *Client) EnableWhoisPrivacy(domain string, options ...RequestOptionFunc) (*WhoisPrivacy, error)

Enable WHOIS privacy of the domain

func (*Client) GetAccountBalance

func (c *Client) GetAccountBalance(options ...RequestOptionFunc) (*Balance, error)

Get current balance

func (*Client) GetAccountPayments

func (c *Client) GetAccountPayments(opt *GetAccountPaymentsOptions, options ...RequestOptionFunc) ([]*Payment, *Pagination, error)

Get paged list of payments from your account

func (*Client) GetChildNameServers

func (c *Client) GetChildNameServers(domain string, options ...RequestOptionFunc) ([]*ChildNameServer, error)

Get a list of child name servers for the domain

func (*Client) GetDNSSec

func (c *Client) GetDNSSec(domain string, options ...RequestOptionFunc) (*DNSSec, error)

Get DNSSec status for the domain

func (*Client) GetDomain

func (c *Client) GetDomain(domain string, options ...RequestOptionFunc) (*Domain, error)

Get information about the domain

func (*Client) GetDomainClaim

func (c *Client) GetDomainClaim(domain string, options ...RequestOptionFunc) ([]*Claim, error)

Get claim information for the domain

func (*Client) GetDomainRedirect

func (c *Client) GetDomainRedirect(domain string, options ...RequestOptionFunc) (*Redirect, error)

Get current redirect URL and mode for the domain

func (*Client) GetDomainStatusCodes

func (c *Client) GetDomainStatusCodes(domain string, options ...RequestOptionFunc) ([]string, error)

Get list of status codes set for the domain EPP Status Code with description: https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en

func (*Client) GetDomains

func (c *Client) GetDomains(opt *GetDomainsOptions, options ...RequestOptionFunc) ([]*Domain, *Pagination, error)

Get paged list of domains available in your account

func (*Client) GetEmails

func (c *Client) GetEmails(opt *GetEmailsOptions, options ...RequestOptionFunc) ([]*Email, *Pagination, error)

Get account related emails

func (*Client) GetNameServerRecords

func (c *Client) GetNameServerRecords(domain string, options ...RequestOptionFunc) ([]*NameServerRecord, error)

Get name server records list for the domain

func (*Client) GetNameServers

func (c *Client) GetNameServers(domain string, options ...RequestOptionFunc) (*NameServers, error)

Get name servers list for the domain

func (*Client) GetTLDAddReq

func (c *Client) GetTLDAddReq(tld string, options ...RequestOptionFunc) (*TLDNotice, error)

Get Registration Notices for TLD

func (*Client) GetTLDAddReqList

func (c *Client) GetTLDAddReqList(options ...RequestOptionFunc) ([]*TLDNotice, error)

Get Registration Notices for all TLDs

func (*Client) GetTLDs

func (c *Client) GetTLDs(options ...RequestOptionFunc) ([]*TLD, error)

Get full list of available TLDs

func (*Client) GetTransfersIn

func (c *Client) GetTransfersIn(opt *GetTransfersInOptions, options ...RequestOptionFunc) ([]*TransferIn, *Pagination, error)

Get paged list of active transfers in

func (*Client) GetWhoisInfo

func (c *Client) GetWhoisInfo(domain string, opt *GetWhoisInfoOptions, options ...RequestOptionFunc) (*WhoisInfo, error)

Get WHOIS information for the domain. It works only for your domains

func (*Client) GetWhoisPrivacy

func (c *Client) GetWhoisPrivacy(domain string, options ...RequestOptionFunc) (*WhoisPrivacy, error)

Get WHOIS privacy status for the domain

func (*Client) InitTransferIn

func (c *Client) InitTransferIn(opt *InitTransferInOptions, options ...RequestOptionFunc) (*TransferIn, error)

Initiate transfer in process for domain You should provide correct WHOIS information

func (*Client) InitTransferOut

func (c *Client) InitTransferOut(domain string, options ...RequestOptionFunc) error

Prepare a domain for transferring out This will unlock a domain and send the authorization code to the domain’s registrant email

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, opt interface{}, options []RequestOptionFunc) (*http.Request, error)

Creates and validates a new request sets required headers

func (*Client) RedeemDomain

func (c *Client) RedeemDomain(domain string, options ...RequestOptionFunc) (*Redeem, error)

Restore domain name during Redemption Grace Period

func (*Client) RegisterDomain

func (c *Client) RegisterDomain(opt *RegisterDomainOptions, options ...RequestOptionFunc) (*Domain, error)

Register a domain name The premium price can be fetched via the CheckDomain() method

func (*Client) RenewDomain

func (c *Client) RenewDomain(domain string, opt *RenewDomainOptions, options ...RequestOptionFunc) (*Renew, error)

Renew tne domain. The domain may be renewed only for a period 1 to 10 years An information about minimum and maximum registration period is available via GetTLDs() method

func (*Client) ResendDomainEmail

func (c *Client) ResendDomainEmail(domain string, options ...RequestOptionFunc) error

Resend verification email

func (*Client) SetBulkNameServerRecords

func (c *Client) SetBulkNameServerRecords(domain string, opt []*NameServerRecord, options ...RequestOptionFunc) ([]*NameServerRecord, error)

Create a list of new name server records for the domain

func (*Client) SetNameServers

func (c *Client) SetNameServers(domain string, opt *SetNameServersOptions, options ...RequestOptionFunc) (*NameServers, error)

Set name servers for the domain

func (*Client) UpdateBulkNameServerRecords

func (c *Client) UpdateBulkNameServerRecords(domain string, opt []*NameServerRecord, options ...RequestOptionFunc) ([]*NameServerRecord, error)

Update list of existing name server records for the domain

func (*Client) UpdateChildNameServer

func (c *Client) UpdateChildNameServer(domain string, opt *ChildNameServerOptions, options ...RequestOptionFunc) (*ChildNameServer, error)

Update an existing child name server for the domain

func (*Client) UpdateNameServerRecord

func (c *Client) UpdateNameServerRecord(domain string, opt *NameServerRecord, options ...RequestOptionFunc) (*NameServerRecord, error)

Update an existing name server record for the domain

func (*Client) UpdateWhoisInfo

func (c *Client) UpdateWhoisInfo(domain string, opt *UpdateWhoisInfoOptions, options ...RequestOptionFunc) (*WhoisInfo, string, error)

Update WHOIS information for the domain Return notice if confirmation is needed as second param

type Contact

type Contact struct {
	Org     string   `json:"org,omitempty"`
	Name    string   `json:"name,omitempty"`
	Email   string   `json:"email,omitempty"`
	Address string   `json:"address,omitempty"`
	City    string   `json:"city,omitempty"`
	State   string   `json:"state,omitempty"`
	Zip     string   `json:"zip,omitempty"`
	Country string   `json:"country,omitempty"`
	Phone   string   `json:"phone,omitempty"`
	Extras  []string `json:"extras,omitempty"`
}

Represents a contact info

type DNSSec

type DNSSec struct {
	Domain  string `json:"domain"`
	DSData  string `json:"ds_data"`
	Enabled bool   `json:"enabled"`
}

Represents a DNSSec info

type DeleteChildNameServerOptions

type DeleteChildNameServerOptions struct {
	Hostname string `json:"hostname,omitempty"`
}

Available options for DeleteChildNameServer()

type DeleteNameServerRecordsOptions

type DeleteNameServerRecordsOptions struct {
	ID string `json:"id,omitempty"`
}

Available options for DeleteNameServerRecords()

type Domain

type Domain struct {
	Domain           string             `json:"domain"`
	DomainIDN        string             `json:"domain_idn"`
	Premium          bool               `json:"premium"`
	AutoRenew        bool               `json:"auto_renew"`
	WhoisPrivacy     bool               `json:"whois_privacy"`
	LockStatus       string             `json:"lock_status"`
	RegistrationDate *PnTime            `json:"registration_date"`
	ExpirationDate   *PnTime            `json:"expiration_date"`
	DeletionDate     *PnTime            `json:"deletion_date"`
	Status           string             `json:"status"`
	NameServers      *NameServers       `json:"name_servers"`
	ChildNameServers []*ChildNameServer `json:"child_name_servers"`
}

Represents a domain info

type DomainCheck

type DomainCheck struct {
	Domain                string             `json:"domain"`
	DomainIDN             string             `json:"domain_idn"`
	Available             bool               `json:"available"`
	Premium               bool               `json:"premium"`
	Prices                *Prices            `json:"prices"`
	PromoPrices           *Prices            `json:"promo_prices"`
	PromoTwoYearsPrices   *Prices            `json:"promo_two_years_prices"`
	PromoMultiYearsPrices map[string]*Prices `json:"promo_multi_years_prices"`
	Claim                 bool               `json:"claim"`
	AddReq                bool               `json:"add_req"`
}

Represents a domain check info

type DomainRedirect

type DomainRedirect struct {
	Domain       string `json:"domain"`
	DomainQueued bool   `json:"domain_queued"`
	Error        string `json:"error"`
}

Represents a domain redirect info

type DomainStatus

type DomainStatus struct {
	Domain string `json:"domain"`
	Status string `json:"status"`
}

Represents a domain status info

type Email

type Email struct {
	Email          string          `json:"email"`
	FirstEmailDate *PnTime         `json:"first_email_date"`
	VerifyDate     *PnTime         `json:"verify_date"`
	SuspendDate    *PnTime         `json:"suspend_date"`
	Status         string          `json:"status"`
	Domains        []*DomainStatus `json:"domains"`
}

Represents an Email info

type EnableBulkDomainRedirectOptions

type EnableBulkDomainRedirectOptions struct {
	EnableDomainRedirectOptions
	DomainList []string `json:"domain_list,omitempty"`
}

Available option for EnableBulkDomainRedirect()

type EnableDNSSecOptions

type EnableDNSSecOptions struct {
	DS string `json:"ds,omitempty"`
}

Available options for UpdateDNSSec()

type EnableDomainRedirectOptions

type EnableDomainRedirectOptions Redirect

Available options for EnableDomainRedirect()

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response
	Errors   []struct {
		Code        int    `json:"code"`
		Message     string `json:"message"`
		Description string `json:"description"`
	} `json:"errors"`
}

Represents error api response with Response struct

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type GetAccountPaymentsOptions

type GetAccountPaymentsOptions struct {
	ListOptions
	ID         int    `url:"id"`
	DomainLike string `url:"domain_like,omitempty"`
	PayType    string `url:"pay_type"`
	DateFrom   string `url:"date_from"`
	DateEnd    string `url:"date_end"`
}

Available options for GetAccountPayments()

type GetDomainsOptions

type GetDomainsOptions struct {
	ListOptions
	DomainLike string `url:"domain_like,omitempty"`
	Status     string `url:"status,omitempty"`
	LockStatus string `url:"lock_status,omitempty"`
}

Available options for GetDomains()

type GetEmailsOptions

type GetEmailsOptions struct {
	ListOptions
	EmailLike   string `url:"email_like,omitempty"`
	Status      string `url:"status,omitempty"`
	EmailStatus string `url:"email_status,omitempty"`
}

Available GetEmails() options

type GetTransfersInOptions

type GetTransfersInOptions struct {
	ListOptions
	DomainLike string `url:"domain_like,omitempty"`
	Status     string `url:"status,omitempty"`
}

Available options for GetTransfersIn()

type GetWhoisInfoOptions

type GetWhoisInfoOptions struct {
	Preview bool `url:"preview,omitempty"`
}

Available options for GetWhoisInfo()

type InitTransferInOptions

type InitTransferInOptions struct {
	Domain            string              `json:"domain,omitempty"`
	AuthCode          string              `json:"auth_code,omitempty"`
	PremiumPrice      float64             `json:"premium_price,omitempty"`
	WhoisPrivacy      bool                `json:"whois_privacy"`
	RegistrantContact *Contact            `json:"registrant_contact,omitempty"`
	AdminContact      *Contact            `json:"admin_contact,omitempty"`
	TechContact       *Contact            `json:"tech_contact,omitempty"`
	BillingContact    *Contact            `json:"billing_contact,omitempty"`
	NameServers       *NameServers        `json:"name_servers,omitempty"`
	NameServerRecords []*NameServerRecord `json:"name_servers_records,omitempty"`
}

Available options for InitTransferIn()

type ListOptions

type ListOptions struct {
	Limit int `url:"per_page,omitempty"`
	Page  int `url:"current_page,omitempty"`
}

Represents pagination options

type Meta

type Meta struct {
	Pagination
	Notice string `json:"notice"`
}

Represents meta field from response

type NameServerRecord

type NameServerRecord struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	Value    string `json:"value"`
	Priority int    `json:"priority"`
	TTL      int    `json:"ttl"`
}

Represents a name server record info

type NameServers

type NameServers []string

Represents a list of name servers

type Option

type Option func(*Client) error

Represents option func to customize api client

func WithBaseURL added in v1.1.0

func WithBaseURL(baseURL string) Option

WithBaseURL Set BaseURL for api client

func WithHTTPClient added in v1.1.0

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient Set configured http.Client for api client

func WithUserAgent added in v1.1.0

func WithUserAgent(userAgent string) Option

WithUserAgent Set user agent for api client

type Pagination

type Pagination struct {
	Total int `json:"total_entries"`
	Limit int `json:"per_page"`
	Page  int `json:"current_page"`
	Pages int `json:"total_pages"`
}

Represents pagination info

func (*Pagination) NextPage

func (p *Pagination) NextPage() int

Method returns next page if available

func (*Pagination) PreviousPage

func (p *Pagination) PreviousPage() int

Method returns previous page if available

type Payment

type Payment struct {
	TxID       string  `json:"txid"`
	TxDate     *PnTime `json:"txdate"`
	TxType     string  `json:"txtype"`
	Domain     string  `json:"domain"`
	Period     string  `json:"period"`
	Descripton string  `json:"description"`
	Total      float64 `json:"total"`
}

Represents a payment info

type PnTime

type PnTime struct {
	time.Time
}

Custom type for DateTime data, inherits time.Time Needs to avoid JSON unmarshall error when DateTime in JSON returns as empty string ""

func (*PnTime) UnmarshalJSON

func (t *PnTime) UnmarshalJSON(data []byte) error

Custom Unmarshall for PnTime

type Prices

type Prices struct {
	Currency string  `json:"currency"`
	Register float64 `json:"register"`
	Renew    float64 `json:"renew"`
	Transfer float64 `json:"transfer"`
	Redeem   float64 `json:"redeem"`
}

Represents prices info

type PromoMultiYears

type PromoMultiYears struct {
	PromoMultiYearsPrices *Prices `json:"promo_multi_years_prices"`
	PromoMultiYearsUntil  *PnTime `json:"promo_multi_years_untill"`
}

Represents a promo for multi years prices

type Redeem

type Redeem Renew

Represents a domain redeem info

type Redirect

type Redirect struct {
	Url            string `json:"url,omitempty"`
	MaskingEnabled bool   `json:"masking_enabled,omitempty"`
	MaskingTitle   string `json:"masking_title,omitempty"`
	MaskingDesc    string `json:"masking_desc,omitempty"`
	MaskingKwd     string `json:"masking_kwd,omitempty"`
}

Represents a redirect info

type RedirectBulk

type RedirectBulk struct {
	Redirect
	DomainList []*DomainRedirect `json:"domain_list"`
}

Represents a redirect bulk info

type RegisterDomainOptions

type RegisterDomainOptions struct {
	Domain            string   `json:"domain,omitempty"`
	Period            int      `json:"period,omitempty"`
	WhoisPrivacy      bool     `json:"whois_privacy"`
	PremiumPrice      float64  `json:"premium_price,omitempty"`
	ClaimsAccepted    bool     `json:"claims_accepted,omitempty"`
	AddReqAccepted    bool     `json:"add_req_accepted,omitempty"`
	RegistrantContact *Contact `json:"registrant_contact,omitempty"`
	AdminContact      *Contact `json:"admin_contact,omitempty"`
	TechContact       *Contact `json:"tech_contact,omitempty"`
	BillingContact    *Contact `json:"billing_contact,omitempty"`
}

Available options for RegisterDomain()

type Renew

type Renew struct {
	Domain            string  `json:"domain"`
	NewExpirationDate *PnTime `json:"new_expiration_date"`
}

Represents a domain renew info

type RenewDomainOptions

type RenewDomainOptions struct {
	Period       string  `json:"period,omitempty"`
	PremiumPrice float64 `json:"premium_price,omitempty"`
}

Available options for RenewDomain()

type RequestOptionFunc

type RequestOptionFunc func(*http.Request) error

Represents option func to customize API request

func WithContext

func WithContext(ctx context.Context) RequestOptionFunc

Run API request with provided context

type Response

type Response struct {
	Data json.RawMessage `json:"data"`
	Meta Meta            `json:"meta"`
}

Represents api response

type SetNameServersOptions

type SetNameServersOptions struct {
	NameServers NameServers `json:"name_servers"`
}

Available options for SetNameServers()

func (*SetNameServersOptions) Validate

func (opt *SetNameServersOptions) Validate() error

Validate SetNameServersOptions for required options

type TLD

type TLD struct {
	TLD                   string                      `json:"tld"`
	IDN                   bool                        `json:"idn"`
	DNSSec                bool                        `json:"dnssec"`
	Prices                *Prices                     `json:"prices"`
	PromoPrices           *Prices                     `json:"promo_prices"`
	PromoUntil            *PnTime                     `json:"promo_untill"`
	PromoTwoYearsUntil    *PnTime                     `json:"promo_two_years_untill"`
	PromoTwoYearsPrices   *Prices                     `json:"promo_two_years_prices"`
	PromoMultiYearsPrices map[string]*PromoMultiYears `json:"promo_multi_years_prices"`
}

Represents a TLD info

type TLDNotice

type TLDNotice struct {
	TLD     string   `json:"tld"`
	Notices []string `json:"notices"`
}

Represents a TLD notice info

type TransferIn

type TransferIn struct {
	Domain            string              `json:"domain"`
	TransferStatus    string              `json:"transfer_status"`
	InitDate          *PnTime             `json:"init_date"`
	PremiumPrice      float64             `json:"premium_price"`
	WhoisPrivacy      bool                `json:"whois_privacy"`
	RegistrantContact *Contact            `json:"registrant_contact"`
	AdminContact      *Contact            `json:"admin_contact"`
	TechContact       *Contact            `json:"tech_contact"`
	BillingContact    *Contact            `json:"billing_contact"`
	NameServers       *NameServers        `json:"name_servers"`
	NameServerRecords []*NameServerRecord `json:"name_server_records"`
}

Represents a transfer in info

type UpdateWhoisInfoOptions

type UpdateWhoisInfoOptions struct {
	RegistrantContact *Contact `json:"registrant_contact,omitempty"`
	AdminContact      *Contact `json:"admin_contact,omitempty"`
	TechContact       *Contact `json:"tech_contact,omitempty"`
	BillingContact    *Contact `json:"billing_contact,omitempty"`
}

Available options for UpdateWhoisInfo()

type WhoisInfo

type WhoisInfo struct {
	WhoisPrivacy      bool     `json:"whois_privacy"`
	Preview           bool     `json:"preview"`
	RegistrantContact *Contact `json:"registrant_contact"`
	AdminContact      *Contact `json:"admin_contact"`
	TechContact       *Contact `json:"tech_contact"`
	BillingContact    *Contact `json:"billing_contact"`
}

Represents a whois info

type WhoisPrivacy

type WhoisPrivacy struct {
	Domain  string `json:"domain"`
	Enabled bool   `json:"enabled"`
}

Represents a whois privacy info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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