Documentation ¶
Overview ¶
Package apigeeregistry is an auto-generated package for the Apigee Registry API.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation ¶
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
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 := apigeeregistry.NewProvisioningClient(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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateInstanceRequest. } op, err := c.CreateInstance(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 NewProvisioningClient 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 ApiDeploymentIterator
- type ApiIterator
- type ApiSpecIterator
- type ApiVersionIterator
- type ArtifactIterator
- type CreateInstanceOperation
- func (op *CreateInstanceOperation) Done() bool
- func (op *CreateInstanceOperation) Metadata() (*apigeeregistrypb.OperationMetadata, error)
- func (op *CreateInstanceOperation) Name() string
- func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error)
- func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error)
- type DeleteInstanceOperation
- func (op *DeleteInstanceOperation) Done() bool
- func (op *DeleteInstanceOperation) Metadata() (*apigeeregistrypb.OperationMetadata, error)
- func (op *DeleteInstanceOperation) Name() string
- func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type LocationIterator
- type OperationIterator
- type ProvisioningCallOptions
- type ProvisioningClient
- func (c *ProvisioningClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *ProvisioningClient) Close() error
- func (c *ProvisioningClient) Connection() *grpc.ClientConndeprecated
- func (c *ProvisioningClient) CreateInstance(ctx context.Context, req *apigeeregistrypb.CreateInstanceRequest, ...) (*CreateInstanceOperation, error)
- func (c *ProvisioningClient) CreateInstanceOperation(name string) *CreateInstanceOperation
- func (c *ProvisioningClient) DeleteInstance(ctx context.Context, req *apigeeregistrypb.DeleteInstanceRequest, ...) (*DeleteInstanceOperation, error)
- func (c *ProvisioningClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation
- func (c *ProvisioningClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *ProvisioningClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *ProvisioningClient) GetInstance(ctx context.Context, req *apigeeregistrypb.GetInstanceRequest, ...) (*apigeeregistrypb.Instance, error)
- func (c *ProvisioningClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *ProvisioningClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *ProvisioningClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *ProvisioningClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *ProvisioningClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *ProvisioningClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- type RegistryCallOptions
- type RegistryClient
- func (c *RegistryClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *RegistryClient) Close() error
- func (c *RegistryClient) Connection() *grpc.ClientConndeprecated
- func (c *RegistryClient) CreateApi(ctx context.Context, req *apigeeregistrypb.CreateApiRequest, ...) (*apigeeregistrypb.Api, error)
- func (c *RegistryClient) CreateApiDeployment(ctx context.Context, req *apigeeregistrypb.CreateApiDeploymentRequest, ...) (*apigeeregistrypb.ApiDeployment, error)
- func (c *RegistryClient) CreateApiSpec(ctx context.Context, req *apigeeregistrypb.CreateApiSpecRequest, ...) (*apigeeregistrypb.ApiSpec, error)
- func (c *RegistryClient) CreateApiVersion(ctx context.Context, req *apigeeregistrypb.CreateApiVersionRequest, ...) (*apigeeregistrypb.ApiVersion, error)
- func (c *RegistryClient) CreateArtifact(ctx context.Context, req *apigeeregistrypb.CreateArtifactRequest, ...) (*apigeeregistrypb.Artifact, error)
- func (c *RegistryClient) DeleteApi(ctx context.Context, req *apigeeregistrypb.DeleteApiRequest, ...) error
- func (c *RegistryClient) DeleteApiDeployment(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRequest, ...) error
- func (c *RegistryClient) DeleteApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRevisionRequest, ...) (*apigeeregistrypb.ApiDeployment, error)
- func (c *RegistryClient) DeleteApiSpec(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRequest, ...) error
- func (c *RegistryClient) DeleteApiSpecRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRevisionRequest, ...) (*apigeeregistrypb.ApiSpec, error)
- func (c *RegistryClient) DeleteApiVersion(ctx context.Context, req *apigeeregistrypb.DeleteApiVersionRequest, ...) error
- func (c *RegistryClient) DeleteArtifact(ctx context.Context, req *apigeeregistrypb.DeleteArtifactRequest, ...) error
- func (c *RegistryClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *RegistryClient) GetApi(ctx context.Context, req *apigeeregistrypb.GetApiRequest, ...) (*apigeeregistrypb.Api, error)
- func (c *RegistryClient) GetApiDeployment(ctx context.Context, req *apigeeregistrypb.GetApiDeploymentRequest, ...) (*apigeeregistrypb.ApiDeployment, error)
- func (c *RegistryClient) GetApiSpec(ctx context.Context, req *apigeeregistrypb.GetApiSpecRequest, ...) (*apigeeregistrypb.ApiSpec, error)
- func (c *RegistryClient) GetApiSpecContents(ctx context.Context, req *apigeeregistrypb.GetApiSpecContentsRequest, ...) (*httpbodypb.HttpBody, error)
- func (c *RegistryClient) GetApiVersion(ctx context.Context, req *apigeeregistrypb.GetApiVersionRequest, ...) (*apigeeregistrypb.ApiVersion, error)
- func (c *RegistryClient) GetArtifact(ctx context.Context, req *apigeeregistrypb.GetArtifactRequest, ...) (*apigeeregistrypb.Artifact, error)
- func (c *RegistryClient) GetArtifactContents(ctx context.Context, req *apigeeregistrypb.GetArtifactContentsRequest, ...) (*httpbodypb.HttpBody, error)
- func (c *RegistryClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *RegistryClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *RegistryClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *RegistryClient) ListApiDeploymentRevisions(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentRevisionsRequest, ...) *ApiDeploymentIterator
- func (c *RegistryClient) ListApiDeployments(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentsRequest, ...) *ApiDeploymentIterator
- func (c *RegistryClient) ListApiSpecRevisions(ctx context.Context, req *apigeeregistrypb.ListApiSpecRevisionsRequest, ...) *ApiSpecIterator
- func (c *RegistryClient) ListApiSpecs(ctx context.Context, req *apigeeregistrypb.ListApiSpecsRequest, ...) *ApiSpecIterator
- func (c *RegistryClient) ListApiVersions(ctx context.Context, req *apigeeregistrypb.ListApiVersionsRequest, ...) *ApiVersionIterator
- func (c *RegistryClient) ListApis(ctx context.Context, req *apigeeregistrypb.ListApisRequest, ...) *ApiIterator
- func (c *RegistryClient) ListArtifacts(ctx context.Context, req *apigeeregistrypb.ListArtifactsRequest, ...) *ArtifactIterator
- func (c *RegistryClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *RegistryClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *RegistryClient) ReplaceArtifact(ctx context.Context, req *apigeeregistrypb.ReplaceArtifactRequest, ...) (*apigeeregistrypb.Artifact, error)
- func (c *RegistryClient) RollbackApiDeployment(ctx context.Context, req *apigeeregistrypb.RollbackApiDeploymentRequest, ...) (*apigeeregistrypb.ApiDeployment, error)
- func (c *RegistryClient) RollbackApiSpec(ctx context.Context, req *apigeeregistrypb.RollbackApiSpecRequest, ...) (*apigeeregistrypb.ApiSpec, error)
- func (c *RegistryClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *RegistryClient) TagApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.TagApiDeploymentRevisionRequest, ...) (*apigeeregistrypb.ApiDeployment, error)
- func (c *RegistryClient) TagApiSpecRevision(ctx context.Context, req *apigeeregistrypb.TagApiSpecRevisionRequest, ...) (*apigeeregistrypb.ApiSpec, error)
- func (c *RegistryClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *RegistryClient) UpdateApi(ctx context.Context, req *apigeeregistrypb.UpdateApiRequest, ...) (*apigeeregistrypb.Api, error)
- func (c *RegistryClient) UpdateApiDeployment(ctx context.Context, req *apigeeregistrypb.UpdateApiDeploymentRequest, ...) (*apigeeregistrypb.ApiDeployment, error)
- func (c *RegistryClient) UpdateApiSpec(ctx context.Context, req *apigeeregistrypb.UpdateApiSpecRequest, ...) (*apigeeregistrypb.ApiSpec, error)
- func (c *RegistryClient) UpdateApiVersion(ctx context.Context, req *apigeeregistrypb.UpdateApiVersionRequest, ...) (*apigeeregistrypb.ApiVersion, error)
Examples ¶
- NewProvisioningClient
- NewRegistryClient
- ProvisioningClient.CancelOperation
- ProvisioningClient.CreateInstance
- ProvisioningClient.DeleteInstance
- ProvisioningClient.DeleteOperation
- ProvisioningClient.GetIamPolicy
- ProvisioningClient.GetInstance
- ProvisioningClient.GetLocation
- ProvisioningClient.GetOperation
- ProvisioningClient.ListLocations
- ProvisioningClient.ListOperations
- ProvisioningClient.SetIamPolicy
- ProvisioningClient.TestIamPermissions
- RegistryClient.CancelOperation
- RegistryClient.CreateApi
- RegistryClient.CreateApiDeployment
- RegistryClient.CreateApiSpec
- RegistryClient.CreateApiVersion
- RegistryClient.CreateArtifact
- RegistryClient.DeleteApi
- RegistryClient.DeleteApiDeployment
- RegistryClient.DeleteApiDeploymentRevision
- RegistryClient.DeleteApiSpec
- RegistryClient.DeleteApiSpecRevision
- RegistryClient.DeleteApiVersion
- RegistryClient.DeleteArtifact
- RegistryClient.DeleteOperation
- RegistryClient.GetApi
- RegistryClient.GetApiDeployment
- RegistryClient.GetApiSpec
- RegistryClient.GetApiSpecContents
- RegistryClient.GetApiVersion
- RegistryClient.GetArtifact
- RegistryClient.GetArtifactContents
- RegistryClient.GetIamPolicy
- RegistryClient.GetLocation
- RegistryClient.GetOperation
- RegistryClient.ListApiDeploymentRevisions
- RegistryClient.ListApiDeployments
- RegistryClient.ListApiSpecRevisions
- RegistryClient.ListApiSpecs
- RegistryClient.ListApiVersions
- RegistryClient.ListApis
- RegistryClient.ListArtifacts
- RegistryClient.ListLocations
- RegistryClient.ListOperations
- RegistryClient.ReplaceArtifact
- RegistryClient.RollbackApiDeployment
- RegistryClient.RollbackApiSpec
- RegistryClient.SetIamPolicy
- RegistryClient.TagApiDeploymentRevision
- RegistryClient.TagApiSpecRevision
- RegistryClient.TestIamPermissions
- RegistryClient.UpdateApi
- RegistryClient.UpdateApiDeployment
- RegistryClient.UpdateApiSpec
- RegistryClient.UpdateApiVersion
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 ApiDeploymentIterator ¶
type ApiDeploymentIterator 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 []*apigeeregistrypb.ApiDeployment, nextPageToken string, err error) // contains filtered or unexported fields }
ApiDeploymentIterator manages a stream of *apigeeregistrypb.ApiDeployment.
func (*ApiDeploymentIterator) Next ¶
func (it *ApiDeploymentIterator) Next() (*apigeeregistrypb.ApiDeployment, 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 (*ApiDeploymentIterator) PageInfo ¶
func (it *ApiDeploymentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ApiIterator ¶
type ApiIterator 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 []*apigeeregistrypb.Api, nextPageToken string, err error) // contains filtered or unexported fields }
ApiIterator manages a stream of *apigeeregistrypb.Api.
func (*ApiIterator) Next ¶
func (it *ApiIterator) Next() (*apigeeregistrypb.Api, 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 (*ApiIterator) PageInfo ¶
func (it *ApiIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ApiSpecIterator ¶
type ApiSpecIterator 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 []*apigeeregistrypb.ApiSpec, nextPageToken string, err error) // contains filtered or unexported fields }
ApiSpecIterator manages a stream of *apigeeregistrypb.ApiSpec.
func (*ApiSpecIterator) Next ¶
func (it *ApiSpecIterator) Next() (*apigeeregistrypb.ApiSpec, 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 (*ApiSpecIterator) PageInfo ¶
func (it *ApiSpecIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ApiVersionIterator ¶
type ApiVersionIterator 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 []*apigeeregistrypb.ApiVersion, nextPageToken string, err error) // contains filtered or unexported fields }
ApiVersionIterator manages a stream of *apigeeregistrypb.ApiVersion.
func (*ApiVersionIterator) Next ¶
func (it *ApiVersionIterator) Next() (*apigeeregistrypb.ApiVersion, 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 (*ApiVersionIterator) PageInfo ¶
func (it *ApiVersionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ArtifactIterator ¶
type ArtifactIterator 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 []*apigeeregistrypb.Artifact, nextPageToken string, err error) // contains filtered or unexported fields }
ArtifactIterator manages a stream of *apigeeregistrypb.Artifact.
func (*ArtifactIterator) Next ¶
func (it *ArtifactIterator) Next() (*apigeeregistrypb.Artifact, 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 (*ArtifactIterator) PageInfo ¶
func (it *ArtifactIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateInstanceOperation ¶
type CreateInstanceOperation struct {
// contains filtered or unexported fields
}
CreateInstanceOperation manages a long-running operation from CreateInstance.
func (*CreateInstanceOperation) Done ¶
func (op *CreateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInstanceOperation) Metadata ¶
func (op *CreateInstanceOperation) Metadata() (*apigeeregistrypb.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 (*CreateInstanceOperation) Name ¶
func (op *CreateInstanceOperation) 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 (*CreateInstanceOperation) Poll ¶
func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apigeeregistrypb.Instance, 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 (*CreateInstanceOperation) Wait ¶
func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apigeeregistrypb.Instance, 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 DeleteInstanceOperation ¶
type DeleteInstanceOperation struct {
// contains filtered or unexported fields
}
DeleteInstanceOperation manages a long-running operation from DeleteInstance.
func (*DeleteInstanceOperation) Done ¶
func (op *DeleteInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInstanceOperation) Metadata ¶
func (op *DeleteInstanceOperation) Metadata() (*apigeeregistrypb.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 (*DeleteInstanceOperation) Name ¶
func (op *DeleteInstanceOperation) 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 (*DeleteInstanceOperation) Poll ¶
func (op *DeleteInstanceOperation) 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 (*DeleteInstanceOperation) Wait ¶
func (op *DeleteInstanceOperation) 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 LocationIterator ¶
type LocationIterator 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 []*locationpb.Location, nextPageToken string, err error) // contains filtered or unexported fields }
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) Next ¶
func (it *LocationIterator) Next() (*locationpb.Location, 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 (*LocationIterator) PageInfo ¶
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶
type OperationIterator 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 []*longrunningpb.Operation, nextPageToken string, err error) // contains filtered or unexported fields }
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, 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 (*OperationIterator) PageInfo ¶
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ProvisioningCallOptions ¶
type ProvisioningCallOptions struct { CreateInstance []gax.CallOption DeleteInstance []gax.CallOption GetInstance []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
ProvisioningCallOptions contains the retry settings for each method of ProvisioningClient.
type ProvisioningClient ¶
type ProvisioningClient struct { // The call options for this service. CallOptions *ProvisioningCallOptions // 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 }
ProvisioningClient is a client for interacting with Apigee Registry API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service that is used for managing the data plane provisioning of the Registry.
func NewProvisioningClient ¶
func NewProvisioningClient(ctx context.Context, opts ...option.ClientOption) (*ProvisioningClient, error)
NewProvisioningClient creates a new provisioning client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
The service that is used for managing the data plane provisioning of the Registry.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ProvisioningClient) CancelOperation ¶
func (c *ProvisioningClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*ProvisioningClient) Close ¶
func (c *ProvisioningClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ProvisioningClient) Connection
deprecated
func (c *ProvisioningClient) 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 (*ProvisioningClient) CreateInstance ¶
func (c *ProvisioningClient) CreateInstance(ctx context.Context, req *apigeeregistrypb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error)
CreateInstance provisions instance resources for the Registry.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateInstanceRequest. } op, err := c.CreateInstance(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 (*ProvisioningClient) CreateInstanceOperation ¶
func (c *ProvisioningClient) CreateInstanceOperation(name string) *CreateInstanceOperation
CreateInstanceOperation returns a new CreateInstanceOperation from a given name. The name must be that of a previously created CreateInstanceOperation, possibly from a different process.
func (*ProvisioningClient) DeleteInstance ¶
func (c *ProvisioningClient) DeleteInstance(ctx context.Context, req *apigeeregistrypb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error)
DeleteInstance deletes the Registry instance.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteInstanceRequest. } op, err := c.DeleteInstance(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*ProvisioningClient) DeleteInstanceOperation ¶
func (c *ProvisioningClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation
DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. The name must be that of a previously created DeleteInstanceOperation, possibly from a different process.
func (*ProvisioningClient) DeleteOperation ¶
func (c *ProvisioningClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*ProvisioningClient) GetIamPolicy ¶
func (c *ProvisioningClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" iampb "cloud.google.com/go/iam/apiv1/iampb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.GetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProvisioningClient) GetInstance ¶
func (c *ProvisioningClient) GetInstance(ctx context.Context, req *apigeeregistrypb.GetInstanceRequest, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error)
GetInstance gets details of a single Instance.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetInstanceRequest. } resp, err := c.GetInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProvisioningClient) GetLocation ¶
func (c *ProvisioningClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. } resp, err := c.GetLocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProvisioningClient) GetOperation ¶
func (c *ProvisioningClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProvisioningClient) ListLocations ¶
func (c *ProvisioningClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } it := c.ListLocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*ProvisioningClient) ListOperations ¶
func (c *ProvisioningClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" "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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*ProvisioningClient) SetIamPolicy ¶
func (c *ProvisioningClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" iampb "cloud.google.com/go/iam/apiv1/iampb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.SetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProvisioningClient) TestIamPermissions ¶
func (c *ProvisioningClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" iampb "cloud.google.com/go/iam/apiv1/iampb" ) 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 := apigeeregistry.NewProvisioningClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.TestIamPermissionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegistryCallOptions ¶
type RegistryCallOptions struct { ListApis []gax.CallOption GetApi []gax.CallOption CreateApi []gax.CallOption UpdateApi []gax.CallOption DeleteApi []gax.CallOption ListApiVersions []gax.CallOption GetApiVersion []gax.CallOption CreateApiVersion []gax.CallOption UpdateApiVersion []gax.CallOption DeleteApiVersion []gax.CallOption ListApiSpecs []gax.CallOption GetApiSpec []gax.CallOption GetApiSpecContents []gax.CallOption CreateApiSpec []gax.CallOption UpdateApiSpec []gax.CallOption DeleteApiSpec []gax.CallOption TagApiSpecRevision []gax.CallOption ListApiSpecRevisions []gax.CallOption RollbackApiSpec []gax.CallOption DeleteApiSpecRevision []gax.CallOption ListApiDeployments []gax.CallOption GetApiDeployment []gax.CallOption CreateApiDeployment []gax.CallOption UpdateApiDeployment []gax.CallOption DeleteApiDeployment []gax.CallOption TagApiDeploymentRevision []gax.CallOption ListApiDeploymentRevisions []gax.CallOption RollbackApiDeployment []gax.CallOption DeleteApiDeploymentRevision []gax.CallOption ListArtifacts []gax.CallOption GetArtifact []gax.CallOption GetArtifactContents []gax.CallOption CreateArtifact []gax.CallOption ReplaceArtifact []gax.CallOption DeleteArtifact []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
RegistryCallOptions contains the retry settings for each method of RegistryClient.
type RegistryClient ¶
type RegistryClient struct { // The call options for this service. CallOptions *RegistryCallOptions // contains filtered or unexported fields }
RegistryClient is a client for interacting with Apigee Registry API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Registry service allows teams to manage descriptions of APIs.
func NewRegistryClient ¶
func NewRegistryClient(ctx context.Context, opts ...option.ClientOption) (*RegistryClient, error)
NewRegistryClient creates a new registry client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
The Registry service allows teams to manage descriptions of APIs.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegistryClient) CancelOperation ¶
func (c *RegistryClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) Close ¶
func (c *RegistryClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegistryClient) Connection
deprecated
func (c *RegistryClient) 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 (*RegistryClient) CreateApi ¶
func (c *RegistryClient) CreateApi(ctx context.Context, req *apigeeregistrypb.CreateApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error)
CreateApi creates a specified API.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateApiRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateApiRequest. } resp, err := c.CreateApi(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) CreateApiDeployment ¶
func (c *RegistryClient) CreateApiDeployment(ctx context.Context, req *apigeeregistrypb.CreateApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error)
CreateApiDeployment creates a specified deployment.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateApiDeploymentRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateApiDeploymentRequest. } resp, err := c.CreateApiDeployment(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) CreateApiSpec ¶
func (c *RegistryClient) CreateApiSpec(ctx context.Context, req *apigeeregistrypb.CreateApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error)
CreateApiSpec creates a specified spec.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateApiSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateApiSpecRequest. } resp, err := c.CreateApiSpec(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) CreateApiVersion ¶
func (c *RegistryClient) CreateApiVersion(ctx context.Context, req *apigeeregistrypb.CreateApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error)
CreateApiVersion creates a specified version.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateApiVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateApiVersionRequest. } resp, err := c.CreateApiVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) CreateArtifact ¶
func (c *RegistryClient) CreateArtifact(ctx context.Context, req *apigeeregistrypb.CreateArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error)
CreateArtifact creates a specified artifact.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.CreateArtifactRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#CreateArtifactRequest. } resp, err := c.CreateArtifact(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) DeleteApi ¶
func (c *RegistryClient) DeleteApi(ctx context.Context, req *apigeeregistrypb.DeleteApiRequest, opts ...gax.CallOption) error
DeleteApi removes a specified API and all of the resources that it owns.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteApiRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteApiRequest. } err = c.DeleteApi(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) DeleteApiDeployment ¶
func (c *RegistryClient) DeleteApiDeployment(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRequest, opts ...gax.CallOption) error
DeleteApiDeployment removes a specified deployment, all revisions, and all child resources (e.g., artifacts).
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteApiDeploymentRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteApiDeploymentRequest. } err = c.DeleteApiDeployment(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) DeleteApiDeploymentRevision ¶
func (c *RegistryClient) DeleteApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error)
DeleteApiDeploymentRevision deletes a revision of a deployment.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteApiDeploymentRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteApiDeploymentRevisionRequest. } resp, err := c.DeleteApiDeploymentRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) DeleteApiSpec ¶
func (c *RegistryClient) DeleteApiSpec(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRequest, opts ...gax.CallOption) error
DeleteApiSpec removes a specified spec, all revisions, and all child resources (e.g., artifacts).
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteApiSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteApiSpecRequest. } err = c.DeleteApiSpec(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) DeleteApiSpecRevision ¶
func (c *RegistryClient) DeleteApiSpecRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error)
DeleteApiSpecRevision deletes a revision of a spec.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteApiSpecRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteApiSpecRevisionRequest. } resp, err := c.DeleteApiSpecRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) DeleteApiVersion ¶
func (c *RegistryClient) DeleteApiVersion(ctx context.Context, req *apigeeregistrypb.DeleteApiVersionRequest, opts ...gax.CallOption) error
DeleteApiVersion removes a specified version and all of the resources that it owns.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteApiVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteApiVersionRequest. } err = c.DeleteApiVersion(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) DeleteArtifact ¶
func (c *RegistryClient) DeleteArtifact(ctx context.Context, req *apigeeregistrypb.DeleteArtifactRequest, opts ...gax.CallOption) error
DeleteArtifact removes a specified artifact.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.DeleteArtifactRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#DeleteArtifactRequest. } err = c.DeleteArtifact(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) DeleteOperation ¶
func (c *RegistryClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*RegistryClient) GetApi ¶
func (c *RegistryClient) GetApi(ctx context.Context, req *apigeeregistrypb.GetApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error)
GetApi returns a specified API.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetApiRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetApiRequest. } resp, err := c.GetApi(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetApiDeployment ¶
func (c *RegistryClient) GetApiDeployment(ctx context.Context, req *apigeeregistrypb.GetApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error)
GetApiDeployment returns a specified deployment.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetApiDeploymentRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetApiDeploymentRequest. } resp, err := c.GetApiDeployment(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetApiSpec ¶
func (c *RegistryClient) GetApiSpec(ctx context.Context, req *apigeeregistrypb.GetApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error)
GetApiSpec returns a specified spec.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetApiSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetApiSpecRequest. } resp, err := c.GetApiSpec(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetApiSpecContents ¶
func (c *RegistryClient) GetApiSpecContents(ctx context.Context, req *apigeeregistrypb.GetApiSpecContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error)
GetApiSpecContents returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetApiSpecContentsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetApiSpecContentsRequest. } resp, err := c.GetApiSpecContents(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetApiVersion ¶
func (c *RegistryClient) GetApiVersion(ctx context.Context, req *apigeeregistrypb.GetApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error)
GetApiVersion returns a specified version.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetApiVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetApiVersionRequest. } resp, err := c.GetApiVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetArtifact ¶
func (c *RegistryClient) GetArtifact(ctx context.Context, req *apigeeregistrypb.GetArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error)
GetArtifact returns a specified artifact.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetArtifactRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetArtifactRequest. } resp, err := c.GetArtifact(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetArtifactContents ¶
func (c *RegistryClient) GetArtifactContents(ctx context.Context, req *apigeeregistrypb.GetArtifactContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error)
GetArtifactContents returns the contents of a specified artifact. If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.GetArtifactContentsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#GetArtifactContentsRequest. } resp, err := c.GetArtifactContents(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetIamPolicy ¶
func (c *RegistryClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" iampb "cloud.google.com/go/iam/apiv1/iampb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.GetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetLocation ¶
func (c *RegistryClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. } resp, err := c.GetLocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) GetOperation ¶
func (c *RegistryClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) ListApiDeploymentRevisions ¶
func (c *RegistryClient) ListApiDeploymentRevisions(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentRevisionsRequest, opts ...gax.CallOption) *ApiDeploymentIterator
ListApiDeploymentRevisions lists all revisions of a deployment. Revisions are returned in descending order of revision creation time.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListApiDeploymentRevisionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListApiDeploymentRevisionsRequest. } it := c.ListApiDeploymentRevisions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListApiDeployments ¶
func (c *RegistryClient) ListApiDeployments(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentsRequest, opts ...gax.CallOption) *ApiDeploymentIterator
ListApiDeployments returns matching deployments.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListApiDeploymentsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListApiDeploymentsRequest. } it := c.ListApiDeployments(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListApiSpecRevisions ¶
func (c *RegistryClient) ListApiSpecRevisions(ctx context.Context, req *apigeeregistrypb.ListApiSpecRevisionsRequest, opts ...gax.CallOption) *ApiSpecIterator
ListApiSpecRevisions lists all revisions of a spec. Revisions are returned in descending order of revision creation time.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListApiSpecRevisionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListApiSpecRevisionsRequest. } it := c.ListApiSpecRevisions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListApiSpecs ¶
func (c *RegistryClient) ListApiSpecs(ctx context.Context, req *apigeeregistrypb.ListApiSpecsRequest, opts ...gax.CallOption) *ApiSpecIterator
ListApiSpecs returns matching specs.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListApiSpecsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListApiSpecsRequest. } it := c.ListApiSpecs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListApiVersions ¶
func (c *RegistryClient) ListApiVersions(ctx context.Context, req *apigeeregistrypb.ListApiVersionsRequest, opts ...gax.CallOption) *ApiVersionIterator
ListApiVersions returns matching versions.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListApiVersionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListApiVersionsRequest. } it := c.ListApiVersions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListApis ¶
func (c *RegistryClient) ListApis(ctx context.Context, req *apigeeregistrypb.ListApisRequest, opts ...gax.CallOption) *ApiIterator
ListApis returns matching APIs.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListApisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListApisRequest. } it := c.ListApis(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListArtifacts ¶
func (c *RegistryClient) ListArtifacts(ctx context.Context, req *apigeeregistrypb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator
ListArtifacts returns matching artifacts.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ListArtifactsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ListArtifactsRequest. } it := c.ListArtifacts(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListLocations ¶
func (c *RegistryClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } it := c.ListLocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ListOperations ¶
func (c *RegistryClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" "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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*RegistryClient) ReplaceArtifact ¶
func (c *RegistryClient) ReplaceArtifact(ctx context.Context, req *apigeeregistrypb.ReplaceArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error)
ReplaceArtifact used to replace a specified artifact.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.ReplaceArtifactRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#ReplaceArtifactRequest. } resp, err := c.ReplaceArtifact(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) RollbackApiDeployment ¶
func (c *RegistryClient) RollbackApiDeployment(ctx context.Context, req *apigeeregistrypb.RollbackApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error)
RollbackApiDeployment sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.RollbackApiDeploymentRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#RollbackApiDeploymentRequest. } resp, err := c.RollbackApiDeployment(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) RollbackApiSpec ¶
func (c *RegistryClient) RollbackApiSpec(ctx context.Context, req *apigeeregistrypb.RollbackApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error)
RollbackApiSpec sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.RollbackApiSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#RollbackApiSpecRequest. } resp, err := c.RollbackApiSpec(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) SetIamPolicy ¶
func (c *RegistryClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" iampb "cloud.google.com/go/iam/apiv1/iampb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.SetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) TagApiDeploymentRevision ¶
func (c *RegistryClient) TagApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.TagApiDeploymentRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error)
TagApiDeploymentRevision adds a tag to a specified revision of a deployment.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.TagApiDeploymentRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#TagApiDeploymentRevisionRequest. } resp, err := c.TagApiDeploymentRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) TagApiSpecRevision ¶
func (c *RegistryClient) TagApiSpecRevision(ctx context.Context, req *apigeeregistrypb.TagApiSpecRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error)
TagApiSpecRevision adds a tag to a specified revision of a spec.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.TagApiSpecRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#TagApiSpecRevisionRequest. } resp, err := c.TagApiSpecRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) TestIamPermissions ¶
func (c *RegistryClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" iampb "cloud.google.com/go/iam/apiv1/iampb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.TestIamPermissionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) UpdateApi ¶
func (c *RegistryClient) UpdateApi(ctx context.Context, req *apigeeregistrypb.UpdateApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error)
UpdateApi used to modify a specified API.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.UpdateApiRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#UpdateApiRequest. } resp, err := c.UpdateApi(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) UpdateApiDeployment ¶
func (c *RegistryClient) UpdateApiDeployment(ctx context.Context, req *apigeeregistrypb.UpdateApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error)
UpdateApiDeployment used to modify a specified deployment.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.UpdateApiDeploymentRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#UpdateApiDeploymentRequest. } resp, err := c.UpdateApiDeployment(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) UpdateApiSpec ¶
func (c *RegistryClient) UpdateApiSpec(ctx context.Context, req *apigeeregistrypb.UpdateApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error)
UpdateApiSpec used to modify a specified spec.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.UpdateApiSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#UpdateApiSpecRequest. } resp, err := c.UpdateApiSpec(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegistryClient) UpdateApiVersion ¶
func (c *RegistryClient) UpdateApiVersion(ctx context.Context, req *apigeeregistrypb.UpdateApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error)
UpdateApiVersion used to modify a specified version.
Example ¶
package main import ( "context" apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" apigeeregistrypb "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb" ) 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 := apigeeregistry.NewRegistryClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &apigeeregistrypb.UpdateApiVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb#UpdateApiVersionRequest. } resp, err := c.UpdateApiVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output: