Package cloud.google.com/go/domains/apiv1beta1

Package domains is an auto-generated package for the Cloud Domains API.

Enables management and configuration of domain names.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

CallOptions

type CallOptions struct {
	SearchDomains               []gax.CallOption
	RetrieveRegisterParameters  []gax.CallOption
	RegisterDomain              []gax.CallOption
	ListRegistrations           []gax.CallOption
	GetRegistration             []gax.CallOption
	UpdateRegistration          []gax.CallOption
	ConfigureManagementSettings []gax.CallOption
	ConfigureDnsSettings        []gax.CallOption
	ConfigureContactSettings    []gax.CallOption
	ExportRegistration          []gax.CallOption
	DeleteRegistration          []gax.CallOption
	RetrieveAuthorizationCode   []gax.CallOption
	ResetAuthorizationCode      []gax.CallOption
}

CallOptions contains the retry settings for each method of Client.

Client

type Client struct {

	// The call options for this service.
	CallOptions *CallOptions

	// LROClient is used internally to handle long-running operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient
	// contains filtered or unexported fields
}

Client is a client for interacting with Cloud Domains API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Cloud Domains API enables management and configuration of domain names.

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new domains client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

The Cloud Domains API enables management and configuration of domain names.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) ConfigureContactSettings

ConfigureContactSettings updates a Registration's contact settings. Some changes require confirmation by the domain’s registrant contact .

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.ConfigureContactSettingsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ConfigureContactSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ConfigureContactSettingsOperation

func (c *Client) ConfigureContactSettingsOperation(name string) *ConfigureContactSettingsOperation

ConfigureContactSettingsOperation returns a new ConfigureContactSettingsOperation from a given name. The name must be that of a previously created ConfigureContactSettingsOperation, possibly from a different process.

func (*Client) ConfigureDnsSettings

ConfigureDnsSettings updates a Registration's DNS settings.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.ConfigureDnsSettingsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ConfigureDnsSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ConfigureDnsSettingsOperation

func (c *Client) ConfigureDnsSettingsOperation(name string) *ConfigureDnsSettingsOperation

ConfigureDnsSettingsOperation returns a new ConfigureDnsSettingsOperation from a given name. The name must be that of a previously created ConfigureDnsSettingsOperation, possibly from a different process.

func (*Client) ConfigureManagementSettings

ConfigureManagementSettings updates a Registration's management settings.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.ConfigureManagementSettingsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ConfigureManagementSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ConfigureManagementSettingsOperation

func (c *Client) ConfigureManagementSettingsOperation(name string) *ConfigureManagementSettingsOperation

ConfigureManagementSettingsOperation returns a new ConfigureManagementSettingsOperation from a given name. The name must be that of a previously created ConfigureManagementSettingsOperation, possibly from a different process.

func (*Client) Connection

func (c *Client) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*Client) DeleteRegistration

DeleteRegistration deletes a Registration resource.

This method only works on resources in one of the following states:

state is EXPORTED with expire_time in the past

state is REGISTRATION_FAILED

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.DeleteRegistrationRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteRegistration(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteRegistrationOperation

func (c *Client) DeleteRegistrationOperation(name string) *DeleteRegistrationOperation

DeleteRegistrationOperation returns a new DeleteRegistrationOperation from a given name. The name must be that of a previously created DeleteRegistrationOperation, possibly from a different process.

func (*Client) ExportRegistration

ExportRegistration exports a Registration that you no longer want to use with Cloud Domains. You can continue to use the domain in Google Domains (at https://domains.google/) until it expires.

If the export is successful:

The resource’s state becomes EXPORTED, meaning that it is no longer managed by Cloud Domains

Because individual users can own domains in Google Domains, the calling user becomes the domain’s sole owner. Permissions for the domain are subsequently managed in Google Domains.

Without further action, the domain does not renew automatically. The new owner can set up billing in Google Domains to renew the domain if needed.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.ExportRegistrationRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ExportRegistration(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ExportRegistrationOperation

func (c *Client) ExportRegistrationOperation(name string) *ExportRegistrationOperation

ExportRegistrationOperation returns a new ExportRegistrationOperation from a given name. The name must be that of a previously created ExportRegistrationOperation, possibly from a different process.

func (*Client) GetRegistration

func (c *Client) GetRegistration(ctx context.Context, req *domainspb.GetRegistrationRequest, opts ...gax.CallOption) (*domainspb.Registration, error)

GetRegistration gets the details of a Registration resource.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.GetRegistrationRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetRegistration(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ListRegistrations

func (c *Client) ListRegistrations(ctx context.Context, req *domainspb.ListRegistrationsRequest, opts ...gax.CallOption) *RegistrationIterator

ListRegistrations lists the Registration resources in a project.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	"google.golang.org/api/iterator"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.ListRegistrationsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListRegistrations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) RegisterDomain

RegisterDomain registers a new domain name and creates a corresponding Registration resource.

Call RetrieveRegisterParameters first to check availability of the domain name and determine parameters like price that are needed to build a call to this method.

A successful call creates a Registration resource in state REGISTRATION_PENDING, which resolves to ACTIVE within 1-2 minutes, indicating that the domain was successfully registered. If the resource ends up in state REGISTRATION_FAILED, it indicates that the domain was not registered successfully, and you can safely delete the resource and retry registration.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.RegisterDomainRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.RegisterDomain(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) RegisterDomainOperation

func (c *Client) RegisterDomainOperation(name string) *RegisterDomainOperation

RegisterDomainOperation returns a new RegisterDomainOperation from a given name. The name must be that of a previously created RegisterDomainOperation, possibly from a different process.

func (*Client) ResetAuthorizationCode

func (c *Client) ResetAuthorizationCode(ctx context.Context, req *domainspb.ResetAuthorizationCodeRequest, opts ...gax.CallOption) (*domainspb.AuthorizationCode, error)

ResetAuthorizationCode resets the authorization code of the Registration to a new random string.

You can call this method only after 60 days have elapsed since the initial domain registration.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.ResetAuthorizationCodeRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.ResetAuthorizationCode(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) RetrieveAuthorizationCode

func (c *Client) RetrieveAuthorizationCode(ctx context.Context, req *domainspb.RetrieveAuthorizationCodeRequest, opts ...gax.CallOption) (*domainspb.AuthorizationCode, error)

RetrieveAuthorizationCode gets the authorization code of the Registration for the purpose of transferring the domain to another registrar.

You can call this method only after 60 days have elapsed since the initial domain registration.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.RetrieveAuthorizationCodeRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.RetrieveAuthorizationCode(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) RetrieveRegisterParameters

RetrieveRegisterParameters gets parameters needed to register a new domain name, including price and up-to-date availability. Use the returned values to call RegisterDomain.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.RetrieveRegisterParametersRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.RetrieveRegisterParameters(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) SearchDomains

SearchDomains searches for available domain names similar to the provided query.

Availability results from this method are approximate; call RetrieveRegisterParameters on a domain before registering to confirm availability.

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.SearchDomainsRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.SearchDomains(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) UpdateRegistration

UpdateRegistration updates select fields of a Registration resource, notably labels. To update other fields, use the appropriate custom update method:

To update management settings, see ConfigureManagementSettings

To update DNS configuration, see ConfigureDnsSettings

To update contact information, see ConfigureContactSettings

Example

package main

import (
	domains "cloud.google.com/go/domains/apiv1beta1"
	"context"
	domainspb "google.golang.org/genproto/googleapis/cloud/domains/v1beta1"
)

func main() {
	ctx := context.Background()
	c, err := domains.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &domainspb.UpdateRegistrationRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateRegistration(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) UpdateRegistrationOperation

func (c *Client) UpdateRegistrationOperation(name string) *UpdateRegistrationOperation

UpdateRegistrationOperation returns a new UpdateRegistrationOperation from a given name. The name must be that of a previously created UpdateRegistrationOperation, possibly from a different process.

ConfigureContactSettingsOperation

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

ConfigureContactSettingsOperation manages a long-running operation from ConfigureContactSettings.

func (*ConfigureContactSettingsOperation) Done

Done reports whether the long-running operation has completed.

func (*ConfigureContactSettingsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ConfigureContactSettingsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ConfigureContactSettingsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ConfigureContactSettingsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ConfigureDnsSettingsOperation

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

ConfigureDnsSettingsOperation manages a long-running operation from ConfigureDnsSettings.

func (*ConfigureDnsSettingsOperation) Done

Done reports whether the long-running operation has completed.

func (*ConfigureDnsSettingsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ConfigureDnsSettingsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ConfigureDnsSettingsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ConfigureDnsSettingsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ConfigureManagementSettingsOperation

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

ConfigureManagementSettingsOperation manages a long-running operation from ConfigureManagementSettings.

func (*ConfigureManagementSettingsOperation) Done

Done reports whether the long-running operation has completed.

func (*ConfigureManagementSettingsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ConfigureManagementSettingsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ConfigureManagementSettingsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ConfigureManagementSettingsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteRegistrationOperation

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

DeleteRegistrationOperation manages a long-running operation from DeleteRegistration.

func (*DeleteRegistrationOperation) Done

func (op *DeleteRegistrationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteRegistrationOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteRegistrationOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteRegistrationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteRegistrationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ExportRegistrationOperation

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

ExportRegistrationOperation manages a long-running operation from ExportRegistration.

func (*ExportRegistrationOperation) Done

func (op *ExportRegistrationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ExportRegistrationOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ExportRegistrationOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ExportRegistrationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ExportRegistrationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

RegisterDomainOperation

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

RegisterDomainOperation manages a long-running operation from RegisterDomain.

func (*RegisterDomainOperation) Done

func (op *RegisterDomainOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*RegisterDomainOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*RegisterDomainOperation) Name

func (op *RegisterDomainOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*RegisterDomainOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RegisterDomainOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

RegistrationIterator

type RegistrationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*domainspb.Registration, nextPageToken string, err error)
	// contains filtered or unexported fields
}

RegistrationIterator manages a stream of *domainspb.Registration.

func (*RegistrationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*RegistrationIterator) PageInfo

func (it *RegistrationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

UpdateRegistrationOperation

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

UpdateRegistrationOperation manages a long-running operation from UpdateRegistration.

func (*UpdateRegistrationOperation) Done

func (op *UpdateRegistrationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateRegistrationOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateRegistrationOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateRegistrationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateRegistrationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.