Documentation ¶
Overview ¶
Package dataform is an auto-generated package for the Dataform API.
NOTE: This package is in alpha. It is not stable, and is likely to change.
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.
// go get cloud.google.com/go/dataform/apiv1alpha2@latest 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 := dataform.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, mentioned above.
req := &dataformpb.CancelWorkflowInvocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CancelWorkflowInvocationRequest. } err = c.CancelWorkflowInvocation(ctx, req) if err != nil { // TODO: Handle error. }
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) CancelWorkflowInvocation(ctx context.Context, req *dataformpb.CancelWorkflowInvocationRequest, ...) error
- func (c *Client) Close() error
- func (c *Client) CommitWorkspaceChanges(ctx context.Context, req *dataformpb.CommitWorkspaceChangesRequest, ...) error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateCompilationResult(ctx context.Context, req *dataformpb.CreateCompilationResultRequest, ...) (*dataformpb.CompilationResult, error)
- func (c *Client) CreateRepository(ctx context.Context, req *dataformpb.CreateRepositoryRequest, ...) (*dataformpb.Repository, error)
- func (c *Client) CreateWorkflowInvocation(ctx context.Context, req *dataformpb.CreateWorkflowInvocationRequest, ...) (*dataformpb.WorkflowInvocation, error)
- func (c *Client) CreateWorkspace(ctx context.Context, req *dataformpb.CreateWorkspaceRequest, ...) (*dataformpb.Workspace, error)
- func (c *Client) DeleteRepository(ctx context.Context, req *dataformpb.DeleteRepositoryRequest, ...) error
- func (c *Client) DeleteWorkflowInvocation(ctx context.Context, req *dataformpb.DeleteWorkflowInvocationRequest, ...) error
- func (c *Client) DeleteWorkspace(ctx context.Context, req *dataformpb.DeleteWorkspaceRequest, ...) error
- func (c *Client) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFileDiffRequest, ...) (*dataformpb.FetchFileDiffResponse, error)
- func (c *Client) FetchFileGitStatuses(ctx context.Context, req *dataformpb.FetchFileGitStatusesRequest, ...) (*dataformpb.FetchFileGitStatusesResponse, error)
- func (c *Client) FetchGitAheadBehind(ctx context.Context, req *dataformpb.FetchGitAheadBehindRequest, ...) (*dataformpb.FetchGitAheadBehindResponse, error)
- func (c *Client) FetchRemoteBranches(ctx context.Context, req *dataformpb.FetchRemoteBranchesRequest, ...) (*dataformpb.FetchRemoteBranchesResponse, error)
- func (c *Client) GetCompilationResult(ctx context.Context, req *dataformpb.GetCompilationResultRequest, ...) (*dataformpb.CompilationResult, error)
- func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetRepository(ctx context.Context, req *dataformpb.GetRepositoryRequest, ...) (*dataformpb.Repository, error)
- func (c *Client) GetWorkflowInvocation(ctx context.Context, req *dataformpb.GetWorkflowInvocationRequest, ...) (*dataformpb.WorkflowInvocation, error)
- func (c *Client) GetWorkspace(ctx context.Context, req *dataformpb.GetWorkspaceRequest, ...) (*dataformpb.Workspace, error)
- func (c *Client) InstallNpmPackages(ctx context.Context, req *dataformpb.InstallNpmPackagesRequest, ...) (*dataformpb.InstallNpmPackagesResponse, error)
- func (c *Client) ListCompilationResults(ctx context.Context, req *dataformpb.ListCompilationResultsRequest, ...) *CompilationResultIterator
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListRepositories(ctx context.Context, req *dataformpb.ListRepositoriesRequest, ...) *RepositoryIterator
- func (c *Client) ListWorkflowInvocations(ctx context.Context, req *dataformpb.ListWorkflowInvocationsRequest, ...) *WorkflowInvocationIterator
- func (c *Client) ListWorkspaces(ctx context.Context, req *dataformpb.ListWorkspacesRequest, ...) *WorkspaceIterator
- func (c *Client) MakeDirectory(ctx context.Context, req *dataformpb.MakeDirectoryRequest, ...) (*dataformpb.MakeDirectoryResponse, error)
- func (c *Client) MoveDirectory(ctx context.Context, req *dataformpb.MoveDirectoryRequest, ...) (*dataformpb.MoveDirectoryResponse, error)
- func (c *Client) MoveFile(ctx context.Context, req *dataformpb.MoveFileRequest, opts ...gax.CallOption) (*dataformpb.MoveFileResponse, error)
- func (c *Client) PullGitCommits(ctx context.Context, req *dataformpb.PullGitCommitsRequest, ...) error
- func (c *Client) PushGitCommits(ctx context.Context, req *dataformpb.PushGitCommitsRequest, ...) error
- func (c *Client) QueryCompilationResultActions(ctx context.Context, req *dataformpb.QueryCompilationResultActionsRequest, ...) *CompilationResultActionIterator
- func (c *Client) QueryDirectoryContents(ctx context.Context, req *dataformpb.QueryDirectoryContentsRequest, ...) *QueryDirectoryContentsResponse_DirectoryEntryIterator
- func (c *Client) QueryWorkflowInvocationActions(ctx context.Context, req *dataformpb.QueryWorkflowInvocationActionsRequest, ...) *WorkflowInvocationActionIterator
- func (c *Client) ReadFile(ctx context.Context, req *dataformpb.ReadFileRequest, opts ...gax.CallOption) (*dataformpb.ReadFileResponse, error)
- func (c *Client) RemoveDirectory(ctx context.Context, req *dataformpb.RemoveDirectoryRequest, ...) error
- func (c *Client) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileRequest, opts ...gax.CallOption) error
- func (c *Client) ResetWorkspaceChanges(ctx context.Context, req *dataformpb.ResetWorkspaceChangesRequest, ...) error
- func (c *Client) SetIamPolicy(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) UpdateRepository(ctx context.Context, req *dataformpb.UpdateRepositoryRequest, ...) (*dataformpb.Repository, error)
- func (c *Client) WriteFile(ctx context.Context, req *dataformpb.WriteFileRequest, opts ...gax.CallOption) (*dataformpb.WriteFileResponse, error)
- type CompilationResultActionIterator
- type CompilationResultIterator
- type LocationIterator
- type QueryDirectoryContentsResponse_DirectoryEntryIterator
- func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) All() iter.Seq2[*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, error]
- func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) Next() (*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, error)
- func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) PageInfo() *iterator.PageInfo
- type RepositoryIterator
- type WorkflowInvocationActionIterator
- type WorkflowInvocationIterator
- type WorkspaceIterator
Examples ¶
- Client.CancelWorkflowInvocation
- Client.CommitWorkspaceChanges
- Client.CreateCompilationResult
- Client.CreateRepository
- Client.CreateWorkflowInvocation
- Client.CreateWorkspace
- Client.DeleteRepository
- Client.DeleteWorkflowInvocation
- Client.DeleteWorkspace
- Client.FetchFileDiff
- Client.FetchFileGitStatuses
- Client.FetchGitAheadBehind
- Client.FetchRemoteBranches
- Client.GetCompilationResult
- Client.GetIamPolicy
- Client.GetLocation
- Client.GetRepository
- Client.GetWorkflowInvocation
- Client.GetWorkspace
- Client.InstallNpmPackages
- Client.ListCompilationResults
- Client.ListCompilationResults (All)
- Client.ListLocations
- Client.ListLocations (All)
- Client.ListRepositories
- Client.ListRepositories (All)
- Client.ListWorkflowInvocations
- Client.ListWorkflowInvocations (All)
- Client.ListWorkspaces
- Client.ListWorkspaces (All)
- Client.MakeDirectory
- Client.MoveDirectory
- Client.MoveFile
- Client.PullGitCommits
- Client.PushGitCommits
- Client.QueryCompilationResultActions
- Client.QueryCompilationResultActions (All)
- Client.QueryDirectoryContents
- Client.QueryDirectoryContents (All)
- Client.QueryWorkflowInvocationActions
- Client.QueryWorkflowInvocationActions (All)
- Client.ReadFile
- Client.RemoveDirectory
- Client.RemoveFile
- Client.ResetWorkspaceChanges
- Client.SetIamPolicy
- Client.TestIamPermissions
- Client.UpdateRepository
- Client.WriteFile
- 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 { ListRepositories []gax.CallOption GetRepository []gax.CallOption CreateRepository []gax.CallOption UpdateRepository []gax.CallOption DeleteRepository []gax.CallOption FetchRemoteBranches []gax.CallOption ListWorkspaces []gax.CallOption GetWorkspace []gax.CallOption CreateWorkspace []gax.CallOption DeleteWorkspace []gax.CallOption InstallNpmPackages []gax.CallOption PullGitCommits []gax.CallOption PushGitCommits []gax.CallOption FetchFileGitStatuses []gax.CallOption FetchGitAheadBehind []gax.CallOption CommitWorkspaceChanges []gax.CallOption ResetWorkspaceChanges []gax.CallOption FetchFileDiff []gax.CallOption QueryDirectoryContents []gax.CallOption MakeDirectory []gax.CallOption RemoveDirectory []gax.CallOption MoveDirectory []gax.CallOption ReadFile []gax.CallOption RemoveFile []gax.CallOption MoveFile []gax.CallOption WriteFile []gax.CallOption ListCompilationResults []gax.CallOption GetCompilationResult []gax.CallOption CreateCompilationResult []gax.CallOption QueryCompilationResultActions []gax.CallOption ListWorkflowInvocations []gax.CallOption GetWorkflowInvocation []gax.CallOption CreateWorkflowInvocation []gax.CallOption DeleteWorkflowInvocation []gax.CallOption CancelWorkflowInvocation []gax.CallOption QueryWorkflowInvocationActions []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []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 // contains filtered or unexported fields }
Client is a client for interacting with Dataform API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Dataform is a service to develop, create, document, test, and update curated tables in BigQuery.
func NewClient ¶
NewClient creates a new dataform client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Dataform is a service to develop, create, document, test, and update curated tables in BigQuery.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewRESTClient ¶
NewRESTClient creates a new dataform rest client.
Dataform is a service to develop, create, document, test, and update curated tables in BigQuery.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" ) 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 := dataform.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*Client) CancelWorkflowInvocation ¶
func (c *Client) CancelWorkflowInvocation(ctx context.Context, req *dataformpb.CancelWorkflowInvocationRequest, opts ...gax.CallOption) error
CancelWorkflowInvocation requests cancellation of a running WorkflowInvocation.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.CancelWorkflowInvocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CancelWorkflowInvocationRequest. } err = c.CancelWorkflowInvocation(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) CommitWorkspaceChanges ¶
func (c *Client) CommitWorkspaceChanges(ctx context.Context, req *dataformpb.CommitWorkspaceChangesRequest, opts ...gax.CallOption) error
CommitWorkspaceChanges applies a Git commit for uncommitted files in a Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.CommitWorkspaceChangesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CommitWorkspaceChangesRequest. } err = c.CommitWorkspaceChanges(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
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) CreateCompilationResult ¶
func (c *Client) CreateCompilationResult(ctx context.Context, req *dataformpb.CreateCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error)
CreateCompilationResult creates a new CompilationResult in a given project and location.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.CreateCompilationResultRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CreateCompilationResultRequest. } resp, err := c.CreateCompilationResult(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateRepository ¶
func (c *Client) CreateRepository(ctx context.Context, req *dataformpb.CreateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error)
CreateRepository creates a new Repository in a given project and location.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.CreateRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CreateRepositoryRequest. } resp, err := c.CreateRepository(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateWorkflowInvocation ¶
func (c *Client) CreateWorkflowInvocation(ctx context.Context, req *dataformpb.CreateWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error)
CreateWorkflowInvocation creates a new WorkflowInvocation in a given Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.CreateWorkflowInvocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CreateWorkflowInvocationRequest. } resp, err := c.CreateWorkflowInvocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateWorkspace ¶
func (c *Client) CreateWorkspace(ctx context.Context, req *dataformpb.CreateWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error)
CreateWorkspace creates a new Workspace in a given Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.CreateWorkspaceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#CreateWorkspaceRequest. } resp, err := c.CreateWorkspace(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) DeleteRepository ¶
func (c *Client) DeleteRepository(ctx context.Context, req *dataformpb.DeleteRepositoryRequest, opts ...gax.CallOption) error
DeleteRepository deletes a single Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.DeleteRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#DeleteRepositoryRequest. } err = c.DeleteRepository(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteWorkflowInvocation ¶
func (c *Client) DeleteWorkflowInvocation(ctx context.Context, req *dataformpb.DeleteWorkflowInvocationRequest, opts ...gax.CallOption) error
DeleteWorkflowInvocation deletes a single WorkflowInvocation.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.DeleteWorkflowInvocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#DeleteWorkflowInvocationRequest. } err = c.DeleteWorkflowInvocation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteWorkspace ¶
func (c *Client) DeleteWorkspace(ctx context.Context, req *dataformpb.DeleteWorkspaceRequest, opts ...gax.CallOption) error
DeleteWorkspace deletes a single Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.DeleteWorkspaceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#DeleteWorkspaceRequest. } err = c.DeleteWorkspace(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) FetchFileDiff ¶
func (c *Client) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFileDiffRequest, opts ...gax.CallOption) (*dataformpb.FetchFileDiffResponse, error)
FetchFileDiff fetches Git diff for an uncommitted file in a Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.FetchFileDiffRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#FetchFileDiffRequest. } resp, err := c.FetchFileDiff(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) FetchFileGitStatuses ¶
func (c *Client) FetchFileGitStatuses(ctx context.Context, req *dataformpb.FetchFileGitStatusesRequest, opts ...gax.CallOption) (*dataformpb.FetchFileGitStatusesResponse, error)
FetchFileGitStatuses fetches Git statuses for the files in a Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.FetchFileGitStatusesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#FetchFileGitStatusesRequest. } resp, err := c.FetchFileGitStatuses(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) FetchGitAheadBehind ¶
func (c *Client) FetchGitAheadBehind(ctx context.Context, req *dataformpb.FetchGitAheadBehindRequest, opts ...gax.CallOption) (*dataformpb.FetchGitAheadBehindResponse, error)
FetchGitAheadBehind fetches Git ahead/behind against a remote branch.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.FetchGitAheadBehindRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#FetchGitAheadBehindRequest. } resp, err := c.FetchGitAheadBehind(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) FetchRemoteBranches ¶
func (c *Client) FetchRemoteBranches(ctx context.Context, req *dataformpb.FetchRemoteBranchesRequest, opts ...gax.CallOption) (*dataformpb.FetchRemoteBranchesResponse, error)
FetchRemoteBranches fetches a Repository’s remote branches.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.FetchRemoteBranchesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#FetchRemoteBranchesRequest. } resp, err := c.FetchRemoteBranches(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetCompilationResult ¶
func (c *Client) GetCompilationResult(ctx context.Context, req *dataformpb.GetCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error)
GetCompilationResult fetches a single CompilationResult.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.GetCompilationResultRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#GetCompilationResultRequest. } resp, err := c.GetCompilationResult(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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" dataform "cloud.google.com/go/dataform/apiv1alpha2" iampb "cloud.google.com/go/iam/apiv1/iampb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataform.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) 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" dataform "cloud.google.com/go/dataform/apiv1alpha2" 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 := dataform.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) GetRepository ¶
func (c *Client) GetRepository(ctx context.Context, req *dataformpb.GetRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error)
GetRepository fetches a single Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.GetRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#GetRepositoryRequest. } resp, err := c.GetRepository(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetWorkflowInvocation ¶
func (c *Client) GetWorkflowInvocation(ctx context.Context, req *dataformpb.GetWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error)
GetWorkflowInvocation fetches a single WorkflowInvocation.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.GetWorkflowInvocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#GetWorkflowInvocationRequest. } resp, err := c.GetWorkflowInvocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetWorkspace ¶
func (c *Client) GetWorkspace(ctx context.Context, req *dataformpb.GetWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error)
GetWorkspace fetches a single Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.GetWorkspaceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#GetWorkspaceRequest. } resp, err := c.GetWorkspace(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) InstallNpmPackages ¶
func (c *Client) InstallNpmPackages(ctx context.Context, req *dataformpb.InstallNpmPackagesRequest, opts ...gax.CallOption) (*dataformpb.InstallNpmPackagesResponse, error)
InstallNpmPackages installs dependency NPM packages (inside a Workspace).
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.InstallNpmPackagesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#InstallNpmPackagesRequest. } resp, err := c.InstallNpmPackages(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListCompilationResults ¶
func (c *Client) ListCompilationResults(ctx context.Context, req *dataformpb.ListCompilationResultsRequest, opts ...gax.CallOption) *CompilationResultIterator
ListCompilationResults lists CompilationResults in a given Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListCompilationResultsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListCompilationResultsRequest. } it := c.ListCompilationResults(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.ListCompilationResultsResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListCompilationResultsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListCompilationResultsRequest. } for resp, err := range c.ListCompilationResults(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any 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" dataform "cloud.google.com/go/dataform/apiv1alpha2" "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 := dataform.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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*locationpb.ListLocationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" 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 := dataform.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. } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(ctx context.Context, req *dataformpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator
ListRepositories lists Repositories in a given project and location.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListRepositoriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.ListRepositoriesResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListRepositoriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListRepositoriesRequest. } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListWorkflowInvocations ¶
func (c *Client) ListWorkflowInvocations(ctx context.Context, req *dataformpb.ListWorkflowInvocationsRequest, opts ...gax.CallOption) *WorkflowInvocationIterator
ListWorkflowInvocations lists WorkflowInvocations in a given Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListWorkflowInvocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListWorkflowInvocationsRequest. } it := c.ListWorkflowInvocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.ListWorkflowInvocationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListWorkflowInvocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListWorkflowInvocationsRequest. } for resp, err := range c.ListWorkflowInvocations(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListWorkspaces ¶
func (c *Client) ListWorkspaces(ctx context.Context, req *dataformpb.ListWorkspacesRequest, opts ...gax.CallOption) *WorkspaceIterator
ListWorkspaces lists Workspaces in a given Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListWorkspacesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListWorkspacesRequest. } it := c.ListWorkspaces(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.ListWorkspacesResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ListWorkspacesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ListWorkspacesRequest. } for resp, err := range c.ListWorkspaces(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) MakeDirectory ¶
func (c *Client) MakeDirectory(ctx context.Context, req *dataformpb.MakeDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MakeDirectoryResponse, error)
MakeDirectory creates a directory inside a Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.MakeDirectoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#MakeDirectoryRequest. } resp, err := c.MakeDirectory(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) MoveDirectory ¶
func (c *Client) MoveDirectory(ctx context.Context, req *dataformpb.MoveDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MoveDirectoryResponse, error)
MoveDirectory moves a directory (inside a Workspace), and all of its contents, to a new location.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.MoveDirectoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#MoveDirectoryRequest. } resp, err := c.MoveDirectory(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) MoveFile ¶
func (c *Client) MoveFile(ctx context.Context, req *dataformpb.MoveFileRequest, opts ...gax.CallOption) (*dataformpb.MoveFileResponse, error)
MoveFile moves a file (inside a Workspace) to a new location.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.MoveFileRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#MoveFileRequest. } resp, err := c.MoveFile(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) PullGitCommits ¶
func (c *Client) PullGitCommits(ctx context.Context, req *dataformpb.PullGitCommitsRequest, opts ...gax.CallOption) error
PullGitCommits pulls Git commits from the Repository’s remote into a Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.PullGitCommitsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#PullGitCommitsRequest. } err = c.PullGitCommits(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) PushGitCommits ¶
func (c *Client) PushGitCommits(ctx context.Context, req *dataformpb.PushGitCommitsRequest, opts ...gax.CallOption) error
PushGitCommits pushes Git commits from a Workspace to the Repository’s remote.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.PushGitCommitsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#PushGitCommitsRequest. } err = c.PushGitCommits(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) QueryCompilationResultActions ¶
func (c *Client) QueryCompilationResultActions(ctx context.Context, req *dataformpb.QueryCompilationResultActionsRequest, opts ...gax.CallOption) *CompilationResultActionIterator
QueryCompilationResultActions returns CompilationResultActions in a given CompilationResult.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.QueryCompilationResultActionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#QueryCompilationResultActionsRequest. } it := c.QueryCompilationResultActions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.QueryCompilationResultActionsResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.QueryCompilationResultActionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#QueryCompilationResultActionsRequest. } for resp, err := range c.QueryCompilationResultActions(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) QueryDirectoryContents ¶
func (c *Client) QueryDirectoryContents(ctx context.Context, req *dataformpb.QueryDirectoryContentsRequest, opts ...gax.CallOption) *QueryDirectoryContentsResponse_DirectoryEntryIterator
QueryDirectoryContents returns the contents of a given Workspace directory.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.QueryDirectoryContentsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#QueryDirectoryContentsRequest. } it := c.QueryDirectoryContents(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.QueryDirectoryContentsResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.QueryDirectoryContentsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#QueryDirectoryContentsRequest. } for resp, err := range c.QueryDirectoryContents(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) QueryWorkflowInvocationActions ¶
func (c *Client) QueryWorkflowInvocationActions(ctx context.Context, req *dataformpb.QueryWorkflowInvocationActionsRequest, opts ...gax.CallOption) *WorkflowInvocationActionIterator
QueryWorkflowInvocationActions returns WorkflowInvocationActions in a given WorkflowInvocation.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" "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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.QueryWorkflowInvocationActionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#QueryWorkflowInvocationActionsRequest. } it := c.QueryWorkflowInvocationActions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*dataformpb.QueryWorkflowInvocationActionsResponse) } }
Output:
Example (All) ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.QueryWorkflowInvocationActionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#QueryWorkflowInvocationActionsRequest. } for resp, err := range c.QueryWorkflowInvocationActions(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ReadFile ¶
func (c *Client) ReadFile(ctx context.Context, req *dataformpb.ReadFileRequest, opts ...gax.CallOption) (*dataformpb.ReadFileResponse, error)
ReadFile returns the contents of a file (inside a Workspace).
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ReadFileRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ReadFileRequest. } resp, err := c.ReadFile(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) RemoveDirectory ¶
func (c *Client) RemoveDirectory(ctx context.Context, req *dataformpb.RemoveDirectoryRequest, opts ...gax.CallOption) error
RemoveDirectory deletes a directory (inside a Workspace) and all of its contents.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.RemoveDirectoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#RemoveDirectoryRequest. } err = c.RemoveDirectory(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) RemoveFile ¶
func (c *Client) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileRequest, opts ...gax.CallOption) error
RemoveFile deletes a file (inside a Workspace).
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.RemoveFileRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#RemoveFileRequest. } err = c.RemoveFile(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) ResetWorkspaceChanges ¶
func (c *Client) ResetWorkspaceChanges(ctx context.Context, req *dataformpb.ResetWorkspaceChangesRequest, opts ...gax.CallOption) error
ResetWorkspaceChanges performs a Git reset for uncommitted files in a Workspace.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.ResetWorkspaceChangesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#ResetWorkspaceChangesRequest. } err = c.ResetWorkspaceChanges(ctx, req) if err != nil { // TODO: Handle error. } }
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" dataform "cloud.google.com/go/dataform/apiv1alpha2" iampb "cloud.google.com/go/iam/apiv1/iampb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataform.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) 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" dataform "cloud.google.com/go/dataform/apiv1alpha2" iampb "cloud.google.com/go/iam/apiv1/iampb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataform.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) UpdateRepository ¶
func (c *Client) UpdateRepository(ctx context.Context, req *dataformpb.UpdateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error)
UpdateRepository updates a single Repository.
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.UpdateRepositoryRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#UpdateRepositoryRequest. } resp, err := c.UpdateRepository(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) WriteFile ¶
func (c *Client) WriteFile(ctx context.Context, req *dataformpb.WriteFileRequest, opts ...gax.CallOption) (*dataformpb.WriteFileResponse, error)
WriteFile writes to a file (inside a Workspace).
Example ¶
package main import ( "context" dataform "cloud.google.com/go/dataform/apiv1alpha2" dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" ) 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 := dataform.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &dataformpb.WriteFileRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/dataform/apiv1alpha2/dataformpb#WriteFileRequest. } resp, err := c.WriteFile(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type CompilationResultActionIterator ¶
type CompilationResultActionIterator 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 []*dataformpb.CompilationResultAction, nextPageToken string, err error) // contains filtered or unexported fields }
CompilationResultActionIterator manages a stream of *dataformpb.CompilationResultAction.
func (*CompilationResultActionIterator) All ¶ added in v0.10.1
func (it *CompilationResultActionIterator) All() iter.Seq2[*dataformpb.CompilationResultAction, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CompilationResultActionIterator) Next ¶
func (it *CompilationResultActionIterator) Next() (*dataformpb.CompilationResultAction, 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 (*CompilationResultActionIterator) PageInfo ¶
func (it *CompilationResultActionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CompilationResultIterator ¶
type CompilationResultIterator 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 []*dataformpb.CompilationResult, nextPageToken string, err error) // contains filtered or unexported fields }
CompilationResultIterator manages a stream of *dataformpb.CompilationResult.
func (*CompilationResultIterator) All ¶ added in v0.10.1
func (it *CompilationResultIterator) All() iter.Seq2[*dataformpb.CompilationResult, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CompilationResultIterator) Next ¶
func (it *CompilationResultIterator) Next() (*dataformpb.CompilationResult, 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 (*CompilationResultIterator) PageInfo ¶
func (it *CompilationResultIterator) 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) All ¶ added in v0.10.1
func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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 QueryDirectoryContentsResponse_DirectoryEntryIterator ¶
type QueryDirectoryContentsResponse_DirectoryEntryIterator 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 []*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, nextPageToken string, err error) // contains filtered or unexported fields }
QueryDirectoryContentsResponse_DirectoryEntryIterator manages a stream of *dataformpb.QueryDirectoryContentsResponse_DirectoryEntry.
func (*QueryDirectoryContentsResponse_DirectoryEntryIterator) All ¶ added in v0.10.1
func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) All() iter.Seq2[*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*QueryDirectoryContentsResponse_DirectoryEntryIterator) Next ¶
func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) Next() (*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, 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 (*QueryDirectoryContentsResponse_DirectoryEntryIterator) PageInfo ¶
func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) 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 []*dataformpb.Repository, nextPageToken string, err error) // contains filtered or unexported fields }
RepositoryIterator manages a stream of *dataformpb.Repository.
func (*RepositoryIterator) All ¶ added in v0.10.1
func (it *RepositoryIterator) All() iter.Seq2[*dataformpb.Repository, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RepositoryIterator) Next ¶
func (it *RepositoryIterator) Next() (*dataformpb.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.
type WorkflowInvocationActionIterator ¶
type WorkflowInvocationActionIterator 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 []*dataformpb.WorkflowInvocationAction, nextPageToken string, err error) // contains filtered or unexported fields }
WorkflowInvocationActionIterator manages a stream of *dataformpb.WorkflowInvocationAction.
func (*WorkflowInvocationActionIterator) All ¶ added in v0.10.1
func (it *WorkflowInvocationActionIterator) All() iter.Seq2[*dataformpb.WorkflowInvocationAction, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*WorkflowInvocationActionIterator) Next ¶
func (it *WorkflowInvocationActionIterator) Next() (*dataformpb.WorkflowInvocationAction, 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 (*WorkflowInvocationActionIterator) PageInfo ¶
func (it *WorkflowInvocationActionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type WorkflowInvocationIterator ¶
type WorkflowInvocationIterator 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 []*dataformpb.WorkflowInvocation, nextPageToken string, err error) // contains filtered or unexported fields }
WorkflowInvocationIterator manages a stream of *dataformpb.WorkflowInvocation.
func (*WorkflowInvocationIterator) All ¶ added in v0.10.1
func (it *WorkflowInvocationIterator) All() iter.Seq2[*dataformpb.WorkflowInvocation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*WorkflowInvocationIterator) Next ¶
func (it *WorkflowInvocationIterator) Next() (*dataformpb.WorkflowInvocation, 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 (*WorkflowInvocationIterator) PageInfo ¶
func (it *WorkflowInvocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type WorkspaceIterator ¶
type WorkspaceIterator 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 []*dataformpb.Workspace, nextPageToken string, err error) // contains filtered or unexported fields }
WorkspaceIterator manages a stream of *dataformpb.Workspace.
func (*WorkspaceIterator) All ¶ added in v0.10.1
func (it *WorkspaceIterator) All() iter.Seq2[*dataformpb.Workspace, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*WorkspaceIterator) Next ¶
func (it *WorkspaceIterator) Next() (*dataformpb.Workspace, 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 (*WorkspaceIterator) PageInfo ¶
func (it *WorkspaceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.