Documentation ¶
Overview ¶
Package securesourcemanager is an auto-generated package for the Secure Source Manager API.
Regionally deployed, single-tenant managed source code repository hosted on Google Cloud.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.CreateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#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.
Index ¶
- func DefaultAuthScopes() []string
- type CallOptions
- type Client
- func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateInstance(ctx context.Context, req *securesourcemanagerpb.CreateInstanceRequest, ...) (*CreateInstanceOperation, error)
- func (c *Client) CreateInstanceOperation(name string) *CreateInstanceOperation
- func (c *Client) CreateRepository(ctx context.Context, req *securesourcemanagerpb.CreateRepositoryRequest, ...) (*CreateRepositoryOperation, error)
- func (c *Client) CreateRepositoryOperation(name string) *CreateRepositoryOperation
- func (c *Client) DeleteInstance(ctx context.Context, req *securesourcemanagerpb.DeleteInstanceRequest, ...) (*DeleteInstanceOperation, error)
- func (c *Client) DeleteInstanceOperation(name string) *DeleteInstanceOperation
- func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *Client) DeleteRepository(ctx context.Context, req *securesourcemanagerpb.DeleteRepositoryRequest, ...) (*DeleteRepositoryOperation, error)
- func (c *Client) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation
- func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) GetInstance(ctx context.Context, req *securesourcemanagerpb.GetInstanceRequest, ...) (*securesourcemanagerpb.Instance, error)
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *Client) GetRepository(ctx context.Context, req *securesourcemanagerpb.GetRepositoryRequest, ...) (*securesourcemanagerpb.Repository, error)
- func (c *Client) ListInstances(ctx context.Context, req *securesourcemanagerpb.ListInstancesRequest, ...) *InstanceIterator
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *Client) ListRepositories(ctx context.Context, req *securesourcemanagerpb.ListRepositoriesRequest, ...) *RepositoryIterator
- func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *Client) TestIamPermissionsRepo(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- type CreateInstanceOperation
- func (op *CreateInstanceOperation) Done() bool
- func (op *CreateInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateInstanceOperation) Name() string
- func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
- func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
- type CreateRepositoryOperation
- func (op *CreateRepositoryOperation) Done() bool
- func (op *CreateRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *CreateRepositoryOperation) Name() string
- func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
- func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
- type DeleteInstanceOperation
- func (op *DeleteInstanceOperation) Done() bool
- func (op *DeleteInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteInstanceOperation) Name() string
- func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteRepositoryOperation
- func (op *DeleteRepositoryOperation) Done() bool
- func (op *DeleteRepositoryOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
- func (op *DeleteRepositoryOperation) Name() string
- func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type InstanceIterator
- type LocationIterator
- type OperationIterator
- type RepositoryIterator
Examples ¶
- Client.CancelOperation
- Client.CreateInstance
- Client.CreateRepository
- Client.DeleteInstance
- Client.DeleteOperation
- Client.DeleteRepository
- Client.GetIamPolicy
- Client.GetIamPolicyRepo
- Client.GetInstance
- Client.GetLocation
- Client.GetOperation
- Client.GetRepository
- Client.ListInstances
- Client.ListLocations
- Client.ListOperations
- Client.ListRepositories
- Client.SetIamPolicy
- Client.SetIamPolicyRepo
- Client.TestIamPermissions
- Client.TestIamPermissionsRepo
- NewClient
- NewRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type CallOptions ¶
type CallOptions struct { ListInstances []gax.CallOption GetInstance []gax.CallOption CreateInstance []gax.CallOption DeleteInstance []gax.CallOption ListRepositories []gax.CallOption GetRepository []gax.CallOption CreateRepository []gax.CallOption DeleteRepository []gax.CallOption GetIamPolicyRepo []gax.CallOption SetIamPolicyRepo []gax.CallOption TestIamPermissionsRepo []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 }
CallOptions contains the retry settings for each method of Client.
type Client ¶
type Client struct { // The call options for this service. CallOptions *CallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
Client is a client for interacting with Secure Source Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Secure Source Manager API ¶
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance’s API hostname to access them. The API hostname looks like the following:
For example,
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com.
func NewClient ¶
NewClient creates a new secure source manager client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Secure Source Manager API ¶
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance’s API hostname to access them. The API hostname looks like the following:
For example,
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewRESTClient ¶
NewRESTClient creates a new secure source manager rest client.
Secure Source Manager API ¶
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance’s API hostname to access them. The API hostname looks like the following:
For example,
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*Client) CancelOperation ¶
func (c *Client) 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" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection
deprecated
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateInstance ¶
func (c *Client) CreateInstance(ctx context.Context, req *securesourcemanagerpb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error)
CreateInstance creates a new instance in a given project and location.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.CreateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateInstanceRequest. } op, err := c.CreateInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateInstanceOperation ¶
func (c *Client) 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 (*Client) CreateRepository ¶
func (c *Client) CreateRepository(ctx context.Context, req *securesourcemanagerpb.CreateRepositoryRequest, opts ...gax.CallOption) (*CreateRepositoryOperation, error)
CreateRepository creates a new repository in a given project and location.
Host: Data Plane
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.CreateRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#CreateRepositoryRequest. } op, err := c.CreateRepository(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateRepositoryOperation ¶
func (c *Client) CreateRepositoryOperation(name string) *CreateRepositoryOperation
CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. The name must be that of a previously created CreateRepositoryOperation, possibly from a different process.
func (*Client) DeleteInstance ¶
func (c *Client) DeleteInstance(ctx context.Context, req *securesourcemanagerpb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error)
DeleteInstance deletes a single instance.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.DeleteInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteInstanceRequest. } op, err := c.DeleteInstance(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteInstanceOperation ¶
func (c *Client) 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 (*Client) DeleteOperation ¶
func (c *Client) 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" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteRepository ¶
func (c *Client) DeleteRepository(ctx context.Context, req *securesourcemanagerpb.DeleteRepositoryRequest, opts ...gax.CallOption) (*DeleteRepositoryOperation, error)
DeleteRepository deletes a Repository.
Host: Data Plane
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.DeleteRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#DeleteRepositoryRequest. } op, err := c.DeleteRepository(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteRepositoryOperation ¶
func (c *Client) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation
DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process.
func (*Client) GetIamPolicy ¶
func (c *Client) 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" iampb "cloud.google.com/go/iam/apiv1/iampb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.GetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetIamPolicyRepo ¶
func (c *Client) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicyRepo get IAM policy for a repository.
Example ¶
package main import ( "context" iampb "cloud.google.com/go/iam/apiv1/iampb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.GetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. } resp, err := c.GetIamPolicyRepo(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetInstance ¶
func (c *Client) GetInstance(ctx context.Context, req *securesourcemanagerpb.GetInstanceRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Instance, error)
GetInstance gets details of a single instance.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.GetInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetInstanceRequest. } resp, err := c.GetInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetLocation ¶
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. } resp, err := c.GetLocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetOperation ¶
func (c *Client) 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" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetRepository ¶
func (c *Client) GetRepository(ctx context.Context, req *securesourcemanagerpb.GetRepositoryRequest, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
GetRepository gets metadata of a repository.
Host: Data Plane
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.GetRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#GetRepositoryRequest. } resp, err := c.GetRepository(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListInstances ¶
func (c *Client) ListInstances(ctx context.Context, req *securesourcemanagerpb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances lists Instances in a given project and location.
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.ListInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListInstancesRequest. } it := c.ListInstances(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListLocations ¶
func (c *Client) 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" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } it := c.ListLocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListOperations ¶
func (c *Client) 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" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(ctx context.Context, req *securesourcemanagerpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator
ListRepositories lists Repositories in a given project and location.
Host: Data Plane
Example ¶
package main import ( "context" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &securesourcemanagerpb.ListRepositoriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb#ListRepositoriesRequest. } it := c.ListRepositories(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) SetIamPolicy ¶
func (c *Client) 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" iampb "cloud.google.com/go/iam/apiv1/iampb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.SetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) SetIamPolicyRepo ¶
func (c *Client) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicyRepo set IAM policy on a repository.
Example ¶
package main import ( "context" iampb "cloud.google.com/go/iam/apiv1/iampb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.SetIamPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. } resp, err := c.SetIamPolicyRepo(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) TestIamPermissions ¶
func (c *Client) 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" iampb "cloud.google.com/go/iam/apiv1/iampb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.TestIamPermissionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) TestIamPermissionsRepo ¶
func (c *Client) TestIamPermissionsRepo(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissionsRepo test IAM permissions on a repository. IAM permission checks are not required on this method.
Example ¶
package main import ( "context" iampb "cloud.google.com/go/iam/apiv1/iampb" securesourcemanager "cloud.google.com/go/securesourcemanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := securesourcemanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &iampb.TestIamPermissionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. } resp, err := c.TestIamPermissionsRepo(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type CreateInstanceOperation ¶
type CreateInstanceOperation struct {
// contains filtered or unexported fields
}
CreateInstanceOperation manages a long-running operation from CreateInstance.
func (*CreateInstanceOperation) Done ¶
func (op *CreateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInstanceOperation) Metadata ¶
func (op *CreateInstanceOperation) Metadata() (*securesourcemanagerpb.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) (*securesourcemanagerpb.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) (*securesourcemanagerpb.Instance, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateRepositoryOperation ¶
type CreateRepositoryOperation struct {
// contains filtered or unexported fields
}
CreateRepositoryOperation manages a long-running operation from CreateRepository.
func (*CreateRepositoryOperation) Done ¶
func (op *CreateRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateRepositoryOperation) Metadata ¶
func (op *CreateRepositoryOperation) Metadata() (*securesourcemanagerpb.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 (*CreateRepositoryOperation) Name ¶
func (op *CreateRepositoryOperation) 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 (*CreateRepositoryOperation) Poll ¶
func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, 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 (*CreateRepositoryOperation) Wait ¶
func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*securesourcemanagerpb.Repository, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteInstanceOperation ¶
type DeleteInstanceOperation struct {
// contains filtered or unexported fields
}
DeleteInstanceOperation manages a long-running operation from DeleteInstance.
func (*DeleteInstanceOperation) Done ¶
func (op *DeleteInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInstanceOperation) Metadata ¶
func (op *DeleteInstanceOperation) Metadata() (*securesourcemanagerpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteInstanceOperation) Name ¶
func (op *DeleteInstanceOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteInstanceOperation) Poll ¶
func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteInstanceOperation) Wait ¶
func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteRepositoryOperation ¶
type DeleteRepositoryOperation struct {
// contains filtered or unexported fields
}
DeleteRepositoryOperation manages a long-running operation from DeleteRepository.
func (*DeleteRepositoryOperation) Done ¶
func (op *DeleteRepositoryOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteRepositoryOperation) Metadata ¶
func (op *DeleteRepositoryOperation) Metadata() (*securesourcemanagerpb.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 (*DeleteRepositoryOperation) Name ¶
func (op *DeleteRepositoryOperation) 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 (*DeleteRepositoryOperation) Poll ¶
func (op *DeleteRepositoryOperation) 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 (*DeleteRepositoryOperation) Wait ¶
func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type InstanceIterator ¶
type InstanceIterator 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 []*securesourcemanagerpb.Instance, nextPageToken string, err error) // contains filtered or unexported fields }
InstanceIterator manages a stream of *securesourcemanagerpb.Instance.
func (*InstanceIterator) Next ¶
func (it *InstanceIterator) Next() (*securesourcemanagerpb.Instance, 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 (*InstanceIterator) PageInfo ¶
func (it *InstanceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LocationIterator ¶
type LocationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) // contains filtered or unexported fields }
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) Next ¶
func (it *LocationIterator) Next() (*locationpb.Location, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo ¶
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶
type OperationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) // contains filtered or unexported fields }
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo ¶
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type RepositoryIterator ¶
type RepositoryIterator 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 []*securesourcemanagerpb.Repository, nextPageToken string, err error) // contains filtered or unexported fields }
RepositoryIterator manages a stream of *securesourcemanagerpb.Repository.
func (*RepositoryIterator) Next ¶
func (it *RepositoryIterator) Next() (*securesourcemanagerpb.Repository, 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 (*RepositoryIterator) PageInfo ¶
func (it *RepositoryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.