registrar

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainGetParams

type DomainGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type DomainGetResponse

type DomainGetResponse interface {
	ImplementsRegistrarDomainGetResponse()
}

Union satisfied by registrar.DomainGetResponseUnknown, registrar.DomainGetResponseArray or shared.UnionString.

type DomainGetResponseArray

type DomainGetResponseArray []interface{}

func (DomainGetResponseArray) ImplementsRegistrarDomainGetResponse

func (r DomainGetResponseArray) ImplementsRegistrarDomainGetResponse()

type DomainGetResponseEnvelope

type DomainGetResponseEnvelope struct {
	Errors   []DomainGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DomainGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DomainGetResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success DomainGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    domainGetResponseEnvelopeJSON    `json:"-"`
}

func (*DomainGetResponseEnvelope) UnmarshalJSON

func (r *DomainGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DomainGetResponseEnvelopeErrors

type DomainGetResponseEnvelopeErrors struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    domainGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DomainGetResponseEnvelopeErrors) UnmarshalJSON

func (r *DomainGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DomainGetResponseEnvelopeMessages

type DomainGetResponseEnvelopeMessages struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    domainGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DomainGetResponseEnvelopeMessages) UnmarshalJSON

func (r *DomainGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DomainGetResponseEnvelopeSuccess

type DomainGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainGetResponseEnvelopeSuccessTrue DomainGetResponseEnvelopeSuccess = true
)

type DomainListParams

type DomainListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type DomainListResponse

type DomainListResponse struct {
	// Domain identifier.
	ID string `json:"id"`
	// Shows if a domain is available for transferring into Cloudflare Registrar.
	Available bool `json:"available"`
	// Indicates if the domain can be registered as a new domain.
	CanRegister bool `json:"can_register"`
	// Shows time of creation.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Shows name of current registrar.
	CurrentRegistrar string `json:"current_registrar"`
	// Shows when domain name registration expires.
	ExpiresAt time.Time `json:"expires_at" format:"date-time"`
	// Shows whether a registrar lock is in place for a domain.
	Locked bool `json:"locked"`
	// Shows contact information for domain registrant.
	RegistrantContact DomainListResponseRegistrantContact `json:"registrant_contact"`
	// A comma-separated list of registry status codes. A full list of status codes can
	// be found at
	// [EPP Status Codes](https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en).
	RegistryStatuses string `json:"registry_statuses"`
	// Whether a particular TLD is currently supported by Cloudflare Registrar. Refer
	// to [TLD Policies](https://www.cloudflare.com/tld-policies/) for a list of
	// supported TLDs.
	SupportedTld bool `json:"supported_tld"`
	// Statuses for domain transfers into Cloudflare Registrar.
	TransferIn DomainListResponseTransferIn `json:"transfer_in"`
	// Last updated.
	UpdatedAt time.Time              `json:"updated_at" format:"date-time"`
	JSON      domainListResponseJSON `json:"-"`
}

func (*DomainListResponse) UnmarshalJSON

func (r *DomainListResponse) UnmarshalJSON(data []byte) (err error)

type DomainListResponseEnvelope

type DomainListResponseEnvelope struct {
	Errors   []DomainListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DomainListResponseEnvelopeMessages `json:"messages,required"`
	Result   []DomainListResponse                 `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DomainListResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DomainListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       domainListResponseEnvelopeJSON       `json:"-"`
}

func (*DomainListResponseEnvelope) UnmarshalJSON

func (r *DomainListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DomainListResponseEnvelopeErrors

type DomainListResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    domainListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DomainListResponseEnvelopeErrors) UnmarshalJSON

func (r *DomainListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DomainListResponseEnvelopeMessages

type DomainListResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    domainListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DomainListResponseEnvelopeMessages) UnmarshalJSON

func (r *DomainListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DomainListResponseEnvelopeResultInfo

type DomainListResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service
	Count float64 `json:"count"`
	// Current page within paginated list of results
	Page float64 `json:"page"`
	// Number of results per page of results
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters
	TotalCount float64                                  `json:"total_count"`
	JSON       domainListResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*DomainListResponseEnvelopeResultInfo) UnmarshalJSON

func (r *DomainListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type DomainListResponseEnvelopeSuccess

type DomainListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainListResponseEnvelopeSuccessTrue DomainListResponseEnvelopeSuccess = true
)

type DomainListResponseRegistrantContact

type DomainListResponseRegistrantContact struct {
	// Address.
	Address string `json:"address,required"`
	// City.
	City string `json:"city,required"`
	// The country in which the user lives.
	Country string `json:"country,required,nullable"`
	// User's first name
	FirstName string `json:"first_name,required,nullable"`
	// User's last name
	LastName string `json:"last_name,required,nullable"`
	// Name of organization.
	Organization string `json:"organization,required"`
	// User's telephone number
	Phone string `json:"phone,required,nullable"`
	// State.
	State string `json:"state,required"`
	// The zipcode or postal code where the user lives.
	Zip string `json:"zip,required,nullable"`
	// Contact Identifier.
	ID string `json:"id"`
	// Optional address line for unit, floor, suite, etc.
	Address2 string `json:"address2"`
	// The contact email address of the user.
	Email string `json:"email"`
	// Contact fax number.
	Fax  string                                  `json:"fax"`
	JSON domainListResponseRegistrantContactJSON `json:"-"`
}

Shows contact information for domain registrant.

func (*DomainListResponseRegistrantContact) UnmarshalJSON

func (r *DomainListResponseRegistrantContact) UnmarshalJSON(data []byte) (err error)

type DomainListResponseTransferIn

type DomainListResponseTransferIn struct {
	// Form of authorization has been accepted by the registrant.
	AcceptFoa interface{} `json:"accept_foa"`
	// Shows transfer status with the registry.
	ApproveTransfer interface{} `json:"approve_transfer"`
	// Indicates if cancellation is still possible.
	CanCancelTransfer bool `json:"can_cancel_transfer"`
	// Privacy guards are disabled at the foreign registrar.
	DisablePrivacy interface{} `json:"disable_privacy"`
	// Auth code has been entered and verified.
	EnterAuthCode interface{} `json:"enter_auth_code"`
	// Domain is unlocked at the foreign registrar.
	UnlockDomain interface{}                      `json:"unlock_domain"`
	JSON         domainListResponseTransferInJSON `json:"-"`
}

Statuses for domain transfers into Cloudflare Registrar.

func (*DomainListResponseTransferIn) UnmarshalJSON

func (r *DomainListResponseTransferIn) UnmarshalJSON(data []byte) (err error)

type DomainService

type DomainService struct {
	Options []option.RequestOption
}

DomainService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDomainService method instead.

func NewDomainService

func NewDomainService(opts ...option.RequestOption) (r *DomainService)

NewDomainService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DomainService) Get

func (r *DomainService) Get(ctx context.Context, domainName string, query DomainGetParams, opts ...option.RequestOption) (res *DomainGetResponse, err error)

Show individual domain.

func (*DomainService) List

func (r *DomainService) List(ctx context.Context, query DomainListParams, opts ...option.RequestOption) (res *[]DomainListResponse, err error)

List domains handled by Registrar.

func (*DomainService) Update

func (r *DomainService) Update(ctx context.Context, domainName string, params DomainUpdateParams, opts ...option.RequestOption) (res *DomainUpdateResponse, err error)

Update individual domain.

type DomainUpdateParams

type DomainUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Auto-renew controls whether subscription is automatically renewed upon domain
	// expiration.
	AutoRenew param.Field[bool] `json:"auto_renew"`
	// Shows whether a registrar lock is in place for a domain.
	Locked param.Field[bool] `json:"locked"`
	// Privacy option controls redacting WHOIS information.
	Privacy param.Field[bool] `json:"privacy"`
}

func (DomainUpdateParams) MarshalJSON

func (r DomainUpdateParams) MarshalJSON() (data []byte, err error)

type DomainUpdateResponse

type DomainUpdateResponse interface {
	ImplementsRegistrarDomainUpdateResponse()
}

Union satisfied by registrar.DomainUpdateResponseUnknown, registrar.DomainUpdateResponseArray or shared.UnionString.

type DomainUpdateResponseArray

type DomainUpdateResponseArray []interface{}

func (DomainUpdateResponseArray) ImplementsRegistrarDomainUpdateResponse

func (r DomainUpdateResponseArray) ImplementsRegistrarDomainUpdateResponse()

type DomainUpdateResponseEnvelope

type DomainUpdateResponseEnvelope struct {
	Errors   []DomainUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DomainUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   DomainUpdateResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success DomainUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    domainUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DomainUpdateResponseEnvelope) UnmarshalJSON

func (r *DomainUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DomainUpdateResponseEnvelopeErrors

type DomainUpdateResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    domainUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DomainUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *DomainUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DomainUpdateResponseEnvelopeMessages

type DomainUpdateResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    domainUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DomainUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *DomainUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DomainUpdateResponseEnvelopeSuccess

type DomainUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainUpdateResponseEnvelopeSuccessTrue DomainUpdateResponseEnvelopeSuccess = true
)

type Error

type Error = apierror.Error

type RegistrarService

type RegistrarService struct {
	Options []option.RequestOption
	Domains *DomainService
}

RegistrarService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistrarService method instead.

func NewRegistrarService

func NewRegistrarService(opts ...option.RequestOption) (r *RegistrarService)

NewRegistrarService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

Jump to

Keyboard shortcuts

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