Documentation ¶
Overview ¶
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.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ConfigureContactSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ConfigureContactSettingsRequest. } 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
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.
Index ¶
- func DefaultAuthScopes() []string
- type CallOptions
- type Client
- func (c *Client) Close() error
- func (c *Client) ConfigureContactSettings(ctx context.Context, req *domainspb.ConfigureContactSettingsRequest, ...) (*ConfigureContactSettingsOperation, error)
- func (c *Client) ConfigureContactSettingsOperation(name string) *ConfigureContactSettingsOperation
- func (c *Client) ConfigureDnsSettings(ctx context.Context, req *domainspb.ConfigureDnsSettingsRequest, ...) (*ConfigureDnsSettingsOperation, error)
- func (c *Client) ConfigureDnsSettingsOperation(name string) *ConfigureDnsSettingsOperation
- func (c *Client) ConfigureManagementSettings(ctx context.Context, req *domainspb.ConfigureManagementSettingsRequest, ...) (*ConfigureManagementSettingsOperation, error)
- func (c *Client) ConfigureManagementSettingsOperation(name string) *ConfigureManagementSettingsOperation
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) DeleteRegistration(ctx context.Context, req *domainspb.DeleteRegistrationRequest, ...) (*DeleteRegistrationOperation, error)
- func (c *Client) DeleteRegistrationOperation(name string) *DeleteRegistrationOperation
- func (c *Client) ExportRegistration(ctx context.Context, req *domainspb.ExportRegistrationRequest, ...) (*ExportRegistrationOperation, error)
- func (c *Client) ExportRegistrationOperation(name string) *ExportRegistrationOperation
- func (c *Client) GetRegistration(ctx context.Context, req *domainspb.GetRegistrationRequest, ...) (*domainspb.Registration, error)
- func (c *Client) ListRegistrations(ctx context.Context, req *domainspb.ListRegistrationsRequest, ...) *RegistrationIterator
- func (c *Client) RegisterDomain(ctx context.Context, req *domainspb.RegisterDomainRequest, ...) (*RegisterDomainOperation, error)
- func (c *Client) RegisterDomainOperation(name string) *RegisterDomainOperation
- func (c *Client) ResetAuthorizationCode(ctx context.Context, req *domainspb.ResetAuthorizationCodeRequest, ...) (*domainspb.AuthorizationCode, error)
- func (c *Client) RetrieveAuthorizationCode(ctx context.Context, req *domainspb.RetrieveAuthorizationCodeRequest, ...) (*domainspb.AuthorizationCode, error)
- func (c *Client) RetrieveRegisterParameters(ctx context.Context, req *domainspb.RetrieveRegisterParametersRequest, ...) (*domainspb.RetrieveRegisterParametersResponse, error)
- func (c *Client) RetrieveTransferParameters(ctx context.Context, req *domainspb.RetrieveTransferParametersRequest, ...) (*domainspb.RetrieveTransferParametersResponse, error)
- func (c *Client) SearchDomains(ctx context.Context, req *domainspb.SearchDomainsRequest, ...) (*domainspb.SearchDomainsResponse, error)
- func (c *Client) TransferDomain(ctx context.Context, req *domainspb.TransferDomainRequest, ...) (*TransferDomainOperation, error)
- func (c *Client) TransferDomainOperation(name string) *TransferDomainOperation
- func (c *Client) UpdateRegistration(ctx context.Context, req *domainspb.UpdateRegistrationRequest, ...) (*UpdateRegistrationOperation, error)
- func (c *Client) UpdateRegistrationOperation(name string) *UpdateRegistrationOperation
- type ConfigureContactSettingsOperation
- func (op *ConfigureContactSettingsOperation) Done() bool
- func (op *ConfigureContactSettingsOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *ConfigureContactSettingsOperation) Name() string
- func (op *ConfigureContactSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *ConfigureContactSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- type ConfigureDnsSettingsOperation
- func (op *ConfigureDnsSettingsOperation) Done() bool
- func (op *ConfigureDnsSettingsOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *ConfigureDnsSettingsOperation) Name() string
- func (op *ConfigureDnsSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *ConfigureDnsSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- type ConfigureManagementSettingsOperation
- func (op *ConfigureManagementSettingsOperation) Done() bool
- func (op *ConfigureManagementSettingsOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *ConfigureManagementSettingsOperation) Name() string
- func (op *ConfigureManagementSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *ConfigureManagementSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- type DeleteRegistrationOperation
- func (op *DeleteRegistrationOperation) Done() bool
- func (op *DeleteRegistrationOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *DeleteRegistrationOperation) Name() string
- func (op *DeleteRegistrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteRegistrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type ExportRegistrationOperation
- func (op *ExportRegistrationOperation) Done() bool
- func (op *ExportRegistrationOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *ExportRegistrationOperation) Name() string
- func (op *ExportRegistrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *ExportRegistrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- type RegisterDomainOperation
- func (op *RegisterDomainOperation) Done() bool
- func (op *RegisterDomainOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *RegisterDomainOperation) Name() string
- func (op *RegisterDomainOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *RegisterDomainOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- type RegistrationIterator
- type TransferDomainOperation
- func (op *TransferDomainOperation) Done() bool
- func (op *TransferDomainOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *TransferDomainOperation) Name() string
- func (op *TransferDomainOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *TransferDomainOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- type UpdateRegistrationOperation
- func (op *UpdateRegistrationOperation) Done() bool
- func (op *UpdateRegistrationOperation) Metadata() (*domainspb.OperationMetadata, error)
- func (op *UpdateRegistrationOperation) Name() string
- func (op *UpdateRegistrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
- func (op *UpdateRegistrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Examples ¶
- Client.ConfigureContactSettings
- Client.ConfigureDnsSettings
- Client.ConfigureManagementSettings
- Client.DeleteRegistration
- Client.ExportRegistration
- Client.GetRegistration
- Client.ListRegistrations
- Client.ListRegistrations (All)
- Client.RegisterDomain
- Client.ResetAuthorizationCode
- Client.RetrieveAuthorizationCode
- Client.RetrieveRegisterParameters
- Client.RetrieveTransferParameters
- Client.SearchDomains
- Client.TransferDomain
- Client.UpdateRegistration
- NewClient
- NewRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type CallOptions ¶
type CallOptions struct { SearchDomains []gax.CallOption RetrieveRegisterParameters []gax.CallOption RegisterDomain []gax.CallOption RetrieveTransferParameters []gax.CallOption TransferDomain []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.
type 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 ¶
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewRESTClient ¶ added in v0.5.0
NewRESTClient creates a new domains rest client.
The Cloud Domains API enables management and configuration of domain names.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) ConfigureContactSettings ¶
func (c *Client) ConfigureContactSettings(ctx context.Context, req *domainspb.ConfigureContactSettingsRequest, opts ...gax.CallOption) (*ConfigureContactSettingsOperation, error)
ConfigureContactSettings updates a Registration's contact settings. Some changes require confirmation by the domain’s registrant contact .
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ConfigureContactSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ConfigureContactSettingsRequest. } 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 }
Output:
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 ¶
func (c *Client) ConfigureDnsSettings(ctx context.Context, req *domainspb.ConfigureDnsSettingsRequest, opts ...gax.CallOption) (*ConfigureDnsSettingsOperation, error)
ConfigureDnsSettings updates a Registration's DNS settings.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ConfigureDnsSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ConfigureDnsSettingsRequest. } 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 }
Output:
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 ¶
func (c *Client) ConfigureManagementSettings(ctx context.Context, req *domainspb.ConfigureManagementSettingsRequest, opts ...gax.CallOption) (*ConfigureManagementSettingsOperation, error)
ConfigureManagementSettings updates a Registration's management settings.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ConfigureManagementSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ConfigureManagementSettingsRequest. } 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 }
Output:
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
deprecated
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) DeleteRegistration ¶
func (c *Client) DeleteRegistration(ctx context.Context, req *domainspb.DeleteRegistrationRequest, opts ...gax.CallOption) (*DeleteRegistrationOperation, error)
DeleteRegistration deletes a Registration resource.
This method works on any Registration resource using Subscription or Commitment billing (at /domains/pricing#billing-models), provided that the resource was created at least 1 day in the past.
For Registration resources using Monthly billing (at /domains/pricing#billing-models), this method works if:
state is EXPORTED with expire_time in the past state is REGISTRATION_FAILED state is TRANSFER_FAILED
When an active registration is successfully deleted, you can continue to use the domain in Google Domains (at https://domains.google/) until it expires. The calling user becomes the domain’s sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.DeleteRegistrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#DeleteRegistrationRequest. } op, err := c.DeleteRegistration(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
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 ¶
func (c *Client) ExportRegistration(ctx context.Context, req *domainspb.ExportRegistrationRequest, opts ...gax.CallOption) (*ExportRegistrationOperation, error)
ExportRegistration exports a Registration resource, such that it is no longer managed by Cloud Domains.
When an active domain is successfully exported, you can continue to use the domain in Google Domains (at https://domains.google/) until it expires. The calling user becomes the domain’s sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ExportRegistrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ExportRegistrationRequest. } 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 }
Output:
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.GetRegistrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#GetRegistrationRequest. } resp, err := c.GetRegistration(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ListRegistrationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ListRegistrationsRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*domainspb.ListRegistrationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ListRegistrationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ListRegistrationsRequest. } for resp, err := range c.ListRegistrations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) RegisterDomain ¶
func (c *Client) RegisterDomain(ctx context.Context, req *domainspb.RegisterDomainRequest, opts ...gax.CallOption) (*RegisterDomainOperation, error)
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.RegisterDomainRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#RegisterDomainRequest. } 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 }
Output:
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.ResetAuthorizationCodeRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#ResetAuthorizationCodeRequest. } resp, err := c.ResetAuthorizationCode(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.RetrieveAuthorizationCodeRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#RetrieveAuthorizationCodeRequest. } resp, err := c.RetrieveAuthorizationCode(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) RetrieveRegisterParameters ¶
func (c *Client) RetrieveRegisterParameters(ctx context.Context, req *domainspb.RetrieveRegisterParametersRequest, opts ...gax.CallOption) (*domainspb.RetrieveRegisterParametersResponse, error)
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.RetrieveRegisterParametersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#RetrieveRegisterParametersRequest. } resp, err := c.RetrieveRegisterParameters(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) RetrieveTransferParameters ¶ added in v0.2.0
func (c *Client) RetrieveTransferParameters(ctx context.Context, req *domainspb.RetrieveTransferParametersRequest, opts ...gax.CallOption) (*domainspb.RetrieveTransferParametersResponse, error)
RetrieveTransferParameters gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported.
Use the returned values to call TransferDomain.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.RetrieveTransferParametersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#RetrieveTransferParametersRequest. } resp, err := c.RetrieveTransferParameters(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) SearchDomains ¶
func (c *Client) SearchDomains(ctx context.Context, req *domainspb.SearchDomainsRequest, opts ...gax.CallOption) (*domainspb.SearchDomainsResponse, error)
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.SearchDomainsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#SearchDomainsRequest. } resp, err := c.SearchDomains(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) TransferDomain ¶ added in v0.2.0
func (c *Client) TransferDomain(ctx context.Context, req *domainspb.TransferDomainRequest, opts ...gax.CallOption) (*TransferDomainOperation, error)
TransferDomain transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported.
Before calling this method, go to the domain’s current registrar to unlock the domain for transfer and retrieve the domain’s transfer authorization code. Then call RetrieveTransferParameters to confirm that the domain is unlocked and to get values needed to build a call to this method.
A successful call creates a Registration resource in state TRANSFER_PENDING. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar’s website.
A few minutes after transfer approval, the resource transitions to state ACTIVE, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state TRANSFER_FAILED. If transfer fails, you can safely delete the resource and retry the transfer.
Example ¶
package main import ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.TransferDomainRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#TransferDomainRequest. } op, err := c.TransferDomain(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) TransferDomainOperation ¶ added in v0.2.0
func (c *Client) TransferDomainOperation(name string) *TransferDomainOperation
TransferDomainOperation returns a new TransferDomainOperation from a given name. The name must be that of a previously created TransferDomainOperation, possibly from a different process.
func (*Client) UpdateRegistration ¶
func (c *Client) UpdateRegistration(ctx context.Context, req *domainspb.UpdateRegistrationRequest, opts ...gax.CallOption) (*UpdateRegistrationOperation, error)
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 ( "context" domains "cloud.google.com/go/domains/apiv1beta1" domainspb "cloud.google.com/go/domains/apiv1beta1/domainspb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := domains.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &domainspb.UpdateRegistrationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/domains/apiv1beta1/domainspb#UpdateRegistrationRequest. } 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 }
Output:
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.
type ConfigureContactSettingsOperation ¶
type ConfigureContactSettingsOperation struct {
// contains filtered or unexported fields
}
ConfigureContactSettingsOperation manages a long-running operation from ConfigureContactSettings.
func (*ConfigureContactSettingsOperation) Done ¶
func (op *ConfigureContactSettingsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ConfigureContactSettingsOperation) Metadata ¶
func (op *ConfigureContactSettingsOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *ConfigureContactSettingsOperation) 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 (*ConfigureContactSettingsOperation) Poll ¶
func (op *ConfigureContactSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 ¶
func (op *ConfigureContactSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type ConfigureDnsSettingsOperation ¶
type ConfigureDnsSettingsOperation struct {
// contains filtered or unexported fields
}
ConfigureDnsSettingsOperation manages a long-running operation from ConfigureDnsSettings.
func (*ConfigureDnsSettingsOperation) Done ¶
func (op *ConfigureDnsSettingsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ConfigureDnsSettingsOperation) Metadata ¶
func (op *ConfigureDnsSettingsOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *ConfigureDnsSettingsOperation) 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 (*ConfigureDnsSettingsOperation) Poll ¶
func (op *ConfigureDnsSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 ¶
func (op *ConfigureDnsSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type ConfigureManagementSettingsOperation ¶
type ConfigureManagementSettingsOperation struct {
// contains filtered or unexported fields
}
ConfigureManagementSettingsOperation manages a long-running operation from ConfigureManagementSettings.
func (*ConfigureManagementSettingsOperation) Done ¶
func (op *ConfigureManagementSettingsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ConfigureManagementSettingsOperation) Metadata ¶
func (op *ConfigureManagementSettingsOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *ConfigureManagementSettingsOperation) 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 (*ConfigureManagementSettingsOperation) Poll ¶
func (op *ConfigureManagementSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 ¶
func (op *ConfigureManagementSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type 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 ¶
func (op *DeleteRegistrationOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *DeleteRegistrationOperation) 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 (*DeleteRegistrationOperation) Poll ¶
func (op *DeleteRegistrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
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 ¶
func (op *DeleteRegistrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type 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 ¶
func (op *ExportRegistrationOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *ExportRegistrationOperation) 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 (*ExportRegistrationOperation) Poll ¶
func (op *ExportRegistrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 ¶
func (op *ExportRegistrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type 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 ¶
func (op *RegisterDomainOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *RegisterDomainOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 ¶
func (op *RegisterDomainOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type 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) All ¶ added in v0.10.1
func (it *RegistrationIterator) All() iter.Seq2[*domainspb.Registration, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RegistrationIterator) Next ¶
func (it *RegistrationIterator) Next() (*domainspb.Registration, error)
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.
type TransferDomainOperation ¶ added in v0.2.0
type TransferDomainOperation struct {
// contains filtered or unexported fields
}
TransferDomainOperation manages a long-running operation from TransferDomain.
func (*TransferDomainOperation) Done ¶ added in v0.2.0
func (op *TransferDomainOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*TransferDomainOperation) Metadata ¶ added in v0.2.0
func (op *TransferDomainOperation) Metadata() (*domainspb.OperationMetadata, error)
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 (*TransferDomainOperation) Name ¶ added in v0.2.0
func (op *TransferDomainOperation) 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 (*TransferDomainOperation) Poll ¶ added in v0.2.0
func (op *TransferDomainOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 (*TransferDomainOperation) Wait ¶ added in v0.2.0
func (op *TransferDomainOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type 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 ¶
func (op *UpdateRegistrationOperation) Metadata() (*domainspb.OperationMetadata, error)
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 ¶
func (op *UpdateRegistrationOperation) 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 (*UpdateRegistrationOperation) Poll ¶
func (op *UpdateRegistrationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
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 ¶
func (op *UpdateRegistrationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*domainspb.Registration, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.