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 .
Example usage
To get started with this package, create a client.
ctx := context . Background () 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 () 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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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 NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go .
Functions
func DefaultAuthScopes
func
DefaultAuthScopes
()
[]
string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
()
c
,
err
:=
apigeeregistry
.
NewProvisioningClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
// TODO: Use client.
_
=
c
}
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
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
}
err
=
c
.
CancelOperation
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
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
func
(
c
*
ProvisioningClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteInstanceRequest.
}
op
,
err
:=
c
.
DeleteInstance
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
err
=
op
.
Wait
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
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
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
}
err
=
c
.
DeleteOperation
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
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
"google.golang.org/genproto/googleapis/iam/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
}
resp
,
err
:=
c
.
GetIamPolicy
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetInstanceRequest.
}
resp
,
err
:=
c
.
GetInstance
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
()
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
}
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
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
}
resp
,
err
:=
c
.
GetOperation
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
()
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
}
}
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"
"google.golang.org/api/iterator"
longrunningpb
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#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
}
}
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
"google.golang.org/genproto/googleapis/iam/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
}
resp
,
err
:=
c
.
SetIamPolicy
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
"google.golang.org/genproto/googleapis/iam/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
}
resp
,
err
:=
c
.
TestIamPermissions
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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.
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
()
c
,
err
:=
apigeeregistry
.
NewRegistryClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
// TODO: Use client.
_
=
c
}
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
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
}
err
=
c
.
CancelOperation
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
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
func
(
c
*
RegistryClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegistryClient) CreateApi
func
(
c
*
RegistryClient
)
CreateApi
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
CreateApiRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
Api
,
error
)
CreateApi createApi creates a specified API.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiRequest.
}
resp
,
err
:=
c
.
CreateApi
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) CreateApiDeployment
func
(
c
*
RegistryClient
)
CreateApiDeployment
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
CreateApiDeploymentRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiDeployment
,
error
)
CreateApiDeployment createApiDeployment creates a specified deployment.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiDeploymentRequest.
}
resp
,
err
:=
c
.
CreateApiDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) CreateApiSpec
func
(
c
*
RegistryClient
)
CreateApiSpec
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
CreateApiSpecRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiSpec
,
error
)
CreateApiSpec createApiSpec creates a specified spec.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiSpecRequest.
}
resp
,
err
:=
c
.
CreateApiSpec
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) CreateApiVersion
func
(
c
*
RegistryClient
)
CreateApiVersion
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
CreateApiVersionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiVersion
,
error
)
CreateApiVersion createApiVersion creates a specified version.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiVersionRequest.
}
resp
,
err
:=
c
.
CreateApiVersion
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) CreateArtifact
func
(
c
*
RegistryClient
)
CreateArtifact
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
CreateArtifactRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
Artifact
,
error
)
CreateArtifact createArtifact creates a specified artifact.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateArtifactRequest.
}
resp
,
err
:=
c
.
CreateArtifact
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) DeleteApi
func
(
c
*
RegistryClient
)
DeleteApi
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteApiRequest
,
opts
...
gax
.
CallOption
)
error
DeleteApi 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiRequest.
}
err
=
c
.
DeleteApi
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*RegistryClient) DeleteApiDeployment
func
(
c
*
RegistryClient
)
DeleteApiDeployment
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteApiDeploymentRequest
,
opts
...
gax
.
CallOption
)
error
DeleteApiDeployment 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiDeploymentRequest.
}
err
=
c
.
DeleteApiDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*RegistryClient) DeleteApiDeploymentRevision
func
(
c
*
RegistryClient
)
DeleteApiDeploymentRevision
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteApiDeploymentRevisionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiDeployment
,
error
)
DeleteApiDeploymentRevision deleteApiDeploymentRevision deletes a revision of a deployment.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiDeploymentRevisionRequest.
}
resp
,
err
:=
c
.
DeleteApiDeploymentRevision
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) DeleteApiSpec
func
(
c
*
RegistryClient
)
DeleteApiSpec
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteApiSpecRequest
,
opts
...
gax
.
CallOption
)
error
DeleteApiSpec 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiSpecRequest.
}
err
=
c
.
DeleteApiSpec
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*RegistryClient) DeleteApiSpecRevision
func
(
c
*
RegistryClient
)
DeleteApiSpecRevision
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteApiSpecRevisionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiSpec
,
error
)
DeleteApiSpecRevision deleteApiSpecRevision deletes a revision of a spec.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiSpecRevisionRequest.
}
resp
,
err
:=
c
.
DeleteApiSpecRevision
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) DeleteApiVersion
func
(
c
*
RegistryClient
)
DeleteApiVersion
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteApiVersionRequest
,
opts
...
gax
.
CallOption
)
error
DeleteApiVersion 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiVersionRequest.
}
err
=
c
.
DeleteApiVersion
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*RegistryClient) DeleteArtifact
func
(
c
*
RegistryClient
)
DeleteArtifact
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
DeleteArtifactRequest
,
opts
...
gax
.
CallOption
)
error
DeleteArtifact deleteArtifact removes a specified artifact.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteArtifactRequest.
}
err
=
c
.
DeleteArtifact
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
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
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
}
err
=
c
.
DeleteOperation
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*RegistryClient) GetApi
func
(
c
*
RegistryClient
)
GetApi
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetApiRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
Api
,
error
)
GetApi getApi returns a specified API.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiRequest.
}
resp
,
err
:=
c
.
GetApi
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) GetApiDeployment
func
(
c
*
RegistryClient
)
GetApiDeployment
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetApiDeploymentRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiDeployment
,
error
)
GetApiDeployment getApiDeployment returns a specified deployment.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiDeploymentRequest.
}
resp
,
err
:=
c
.
GetApiDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) GetApiSpec
func
(
c
*
RegistryClient
)
GetApiSpec
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetApiSpecRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiSpec
,
error
)
GetApiSpec getApiSpec returns a specified spec.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiSpecRequest.
}
resp
,
err
:=
c
.
GetApiSpec
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) GetApiSpecContents
func
(
c
*
RegistryClient
)
GetApiSpecContents
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetApiSpecContentsRequest
,
opts
...
gax
.
CallOption
)
(
*
httpbodypb
.
HttpBody
,
error
)
GetApiSpecContents 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiSpecContentsRequest.
}
resp
,
err
:=
c
.
GetApiSpecContents
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) GetApiVersion
func
(
c
*
RegistryClient
)
GetApiVersion
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetApiVersionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiVersion
,
error
)
GetApiVersion getApiVersion returns a specified version.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiVersionRequest.
}
resp
,
err
:=
c
.
GetApiVersion
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) GetArtifact
func
(
c
*
RegistryClient
)
GetArtifact
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetArtifactRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
Artifact
,
error
)
GetArtifact getArtifact returns a specified artifact.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetArtifactRequest.
}
resp
,
err
:=
c
.
GetArtifact
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) GetArtifactContents
func
(
c
*
RegistryClient
)
GetArtifactContents
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
GetArtifactContentsRequest
,
opts
...
gax
.
CallOption
)
(
*
httpbodypb
.
HttpBody
,
error
)
GetArtifactContents 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetArtifactContentsRequest.
}
resp
,
err
:=
c
.
GetArtifactContents
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
"google.golang.org/genproto/googleapis/iam/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
}
resp
,
err
:=
c
.
GetIamPolicy
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
()
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
}
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
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
}
resp
,
err
:=
c
.
GetOperation
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) ListApiDeploymentRevisions
func
(
c
*
RegistryClient
)
ListApiDeploymentRevisions
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListApiDeploymentRevisionsRequest
,
opts
...
gax
.
CallOption
)
*
ApiDeploymentIterator
ListApiDeploymentRevisions 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"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
func (*RegistryClient) ListApiDeployments
func
(
c
*
RegistryClient
)
ListApiDeployments
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListApiDeploymentsRequest
,
opts
...
gax
.
CallOption
)
*
ApiDeploymentIterator
ListApiDeployments listApiDeployments returns matching deployments.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
func (*RegistryClient) ListApiSpecRevisions
func
(
c
*
RegistryClient
)
ListApiSpecRevisions
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListApiSpecRevisionsRequest
,
opts
...
gax
.
CallOption
)
*
ApiSpecIterator
ListApiSpecRevisions 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"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
func (*RegistryClient) ListApiSpecs
func
(
c
*
RegistryClient
)
ListApiSpecs
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListApiSpecsRequest
,
opts
...
gax
.
CallOption
)
*
ApiSpecIterator
ListApiSpecs listApiSpecs returns matching specs.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
func (*RegistryClient) ListApiVersions
func
(
c
*
RegistryClient
)
ListApiVersions
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListApiVersionsRequest
,
opts
...
gax
.
CallOption
)
*
ApiVersionIterator
ListApiVersions listApiVersions returns matching versions.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
func (*RegistryClient) ListApis
func
(
c
*
RegistryClient
)
ListApis
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListApisRequest
,
opts
...
gax
.
CallOption
)
*
ApiIterator
ListApis listApis returns matching APIs.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
func (*RegistryClient) ListArtifacts
func
(
c
*
RegistryClient
)
ListArtifacts
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ListArtifactsRequest
,
opts
...
gax
.
CallOption
)
*
ArtifactIterator
ListArtifacts listArtifacts returns matching artifacts.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
"google.golang.org/api/iterator"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#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
}
}
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
()
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
}
}
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"
"google.golang.org/api/iterator"
longrunningpb
"google.golang.org/genproto/googleapis/longrunning"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/longrunning#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
}
}
func (*RegistryClient) ReplaceArtifact
func
(
c
*
RegistryClient
)
ReplaceArtifact
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
ReplaceArtifactRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
Artifact
,
error
)
ReplaceArtifact replaceArtifact can be used to replace a specified artifact.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ReplaceArtifactRequest.
}
resp
,
err
:=
c
.
ReplaceArtifact
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) RollbackApiDeployment
func
(
c
*
RegistryClient
)
RollbackApiDeployment
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
RollbackApiDeploymentRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiDeployment
,
error
)
RollbackApiDeployment 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#RollbackApiDeploymentRequest.
}
resp
,
err
:=
c
.
RollbackApiDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) RollbackApiSpec
func
(
c
*
RegistryClient
)
RollbackApiSpec
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
RollbackApiSpecRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiSpec
,
error
)
RollbackApiSpec 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
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#RollbackApiSpecRequest.
}
resp
,
err
:=
c
.
RollbackApiSpec
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
"google.golang.org/genproto/googleapis/iam/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
}
resp
,
err
:=
c
.
SetIamPolicy
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) TagApiDeploymentRevision
func
(
c
*
RegistryClient
)
TagApiDeploymentRevision
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
TagApiDeploymentRevisionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiDeployment
,
error
)
TagApiDeploymentRevision tagApiDeploymentRevision adds a tag to a specified revision of a deployment.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#TagApiDeploymentRevisionRequest.
}
resp
,
err
:=
c
.
TagApiDeploymentRevision
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) TagApiSpecRevision
func
(
c
*
RegistryClient
)
TagApiSpecRevision
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
TagApiSpecRevisionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiSpec
,
error
)
TagApiSpecRevision tagApiSpecRevision adds a tag to a specified revision of a spec.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#TagApiSpecRevisionRequest.
}
resp
,
err
:=
c
.
TagApiSpecRevision
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
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
"google.golang.org/genproto/googleapis/iam/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
}
resp
,
err
:=
c
.
TestIamPermissions
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) UpdateApi
func
(
c
*
RegistryClient
)
UpdateApi
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
UpdateApiRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
Api
,
error
)
UpdateApi updateApi can be used to modify a specified API.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiRequest.
}
resp
,
err
:=
c
.
UpdateApi
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) UpdateApiDeployment
func
(
c
*
RegistryClient
)
UpdateApiDeployment
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
UpdateApiDeploymentRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiDeployment
,
error
)
UpdateApiDeployment updateApiDeployment can be used to modify a specified deployment.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiDeploymentRequest.
}
resp
,
err
:=
c
.
UpdateApiDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) UpdateApiSpec
func
(
c
*
RegistryClient
)
UpdateApiSpec
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
UpdateApiSpecRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiSpec
,
error
)
UpdateApiSpec updateApiSpec can be used to modify a specified spec.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiSpecRequest.
}
resp
,
err
:=
c
.
UpdateApiSpec
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*RegistryClient) UpdateApiVersion
func
(
c
*
RegistryClient
)
UpdateApiVersion
(
ctx
context
.
Context
,
req
*
apigeeregistrypb
.
UpdateApiVersionRequest
,
opts
...
gax
.
CallOption
)
(
*
apigeeregistrypb
.
ApiVersion
,
error
)
UpdateApiVersion updateApiVersion can be used to modify a specified version.
Example
package
main
import
(
"context"
apigeeregistry
"cloud.google.com/go/apigeeregistry/apiv1"
apigeeregistrypb
"google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
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/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiVersionRequest.
}
resp
,
err
:=
c
.
UpdateApiVersion
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}