Apigee Registry API v1 - Package cloud.google.com/go/apigeeregistry/apiv1 (v0.1.0)

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

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

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

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

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.

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

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 
 } 
 
Create a Mobile Website
View Site in Mobile | Classic
Share by: