go: cloud.google.com/go/bigquery/datatransfer/apiv1 Index | Examples | Files

package datatransfer

import "cloud.google.com/go/bigquery/datatransfer/apiv1"

Package datatransfer is an auto-generated package for the BigQuery Data Transfer API.

Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis.

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit godoc.org/cloud.google.com/go.

Index

Examples

Package Files

data_source_client.go data_transfer_client.go doc.go path_funcs.go

func DataSourcePath Uses

func DataSourcePath(project, dataSource string) string

DataSourcePath returns the path for the data source resource.

Deprecated: Use

fmt.Sprintf("projects/%s/dataSources/%s", project, dataSource)

instead.

func DefaultAuthScopes Uses

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

func LocationDataSourcePath Uses

func LocationDataSourcePath(project, location, dataSource string) string

LocationDataSourcePath returns the path for the location data source resource.

Deprecated: Use

fmt.Sprintf("projects/%s/locations/%s/dataSources/%s", project, location, dataSource)

instead.

func LocationPath Uses

func LocationPath(project, location string) string

LocationPath returns the path for the location resource.

Deprecated: Use

fmt.Sprintf("projects/%s/locations/%s", project, location)

instead.

func LocationRunPath Uses

func LocationRunPath(project, location, transferConfig, run string) string

LocationRunPath returns the path for the location run resource.

Deprecated: Use

fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s/runs/%s", project, location, transferConfig, run)

instead.

func LocationTransferConfigPath Uses

func LocationTransferConfigPath(project, location, transferConfig string) string

LocationTransferConfigPath returns the path for the location transfer config resource.

Deprecated: Use

fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s", project, location, transferConfig)

instead.

func ProjectPath Uses

func ProjectPath(project string) string

ProjectPath returns the path for the project resource.

Deprecated: Use

fmt.Sprintf("projects/%s", project)

instead.

func RunPath Uses

func RunPath(project, transferConfig, run string) string

RunPath returns the path for the run resource.

Deprecated: Use

fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", project, transferConfig, run)

instead.

func TransferConfigPath Uses

func TransferConfigPath(project, transferConfig string) string

TransferConfigPath returns the path for the transfer config resource.

Deprecated: Use

fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig)

instead.

type CallOptions Uses

type CallOptions struct {
    GetDataSource           []gax.CallOption
    ListDataSources         []gax.CallOption
    CreateTransferConfig    []gax.CallOption
    UpdateTransferConfig    []gax.CallOption
    DeleteTransferConfig    []gax.CallOption
    GetTransferConfig       []gax.CallOption
    ListTransferConfigs     []gax.CallOption
    ScheduleTransferRuns    []gax.CallOption
    StartManualTransferRuns []gax.CallOption
    GetTransferRun          []gax.CallOption
    DeleteTransferRun       []gax.CallOption
    ListTransferRuns        []gax.CallOption
    ListTransferLogs        []gax.CallOption
    CheckValidCreds         []gax.CallOption
}

CallOptions contains the retry settings for each method of Client.

type Client Uses

type Client struct {

    // The call options for this service.
    CallOptions *CallOptions
    // contains filtered or unexported fields
}

Client is a client for interacting with BigQuery Data Transfer API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewClient Uses

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new data transfer service client.

The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. This service contains methods that are end user exposed. It backs up the frontend.

Code:

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use client.
_ = c

func (*Client) CheckValidCreds Uses

func (c *Client) CheckValidCreds(ctx context.Context, req *datatransferpb.CheckValidCredsRequest, opts ...gax.CallOption) (*datatransferpb.CheckValidCredsResponse, error)

CheckValidCreds returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn’t support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.CheckValidCredsRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CheckValidCreds(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) Close Uses

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) Connection Uses

func (c *Client) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*Client) CreateTransferConfig Uses

func (c *Client) CreateTransferConfig(ctx context.Context, req *datatransferpb.CreateTransferConfigRequest, opts ...gax.CallOption) (*datatransferpb.TransferConfig, error)

CreateTransferConfig creates a new data transfer configuration.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.CreateTransferConfigRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateTransferConfig(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) DeleteTransferConfig Uses

func (c *Client) DeleteTransferConfig(ctx context.Context, req *datatransferpb.DeleteTransferConfigRequest, opts ...gax.CallOption) error

DeleteTransferConfig deletes a data transfer configuration, including any associated transfer runs and logs.

Code:

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.DeleteTransferConfigRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteTransferConfig(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*Client) DeleteTransferRun Uses

func (c *Client) DeleteTransferRun(ctx context.Context, req *datatransferpb.DeleteTransferRunRequest, opts ...gax.CallOption) error

DeleteTransferRun deletes the specified transfer run.

Code:

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.DeleteTransferRunRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteTransferRun(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*Client) GetDataSource Uses

func (c *Client) GetDataSource(ctx context.Context, req *datatransferpb.GetDataSourceRequest, opts ...gax.CallOption) (*datatransferpb.DataSource, error)

GetDataSource retrieves a supported data source and returns its settings, which can be used for UI rendering.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.GetDataSourceRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.GetDataSource(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) GetTransferConfig Uses

func (c *Client) GetTransferConfig(ctx context.Context, req *datatransferpb.GetTransferConfigRequest, opts ...gax.CallOption) (*datatransferpb.TransferConfig, error)

GetTransferConfig returns information about a data transfer config.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.GetTransferConfigRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.GetTransferConfig(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) GetTransferRun Uses

func (c *Client) GetTransferRun(ctx context.Context, req *datatransferpb.GetTransferRunRequest, opts ...gax.CallOption) (*datatransferpb.TransferRun, error)

GetTransferRun returns information about the particular transfer run.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.GetTransferRunRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.GetTransferRun(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) ListDataSources Uses

func (c *Client) ListDataSources(ctx context.Context, req *datatransferpb.ListDataSourcesRequest, opts ...gax.CallOption) *DataSourceIterator

ListDataSources lists supported data sources and returns their settings, which can be used for UI rendering.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"
// import "google.golang.org/api/iterator"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.ListDataSourcesRequest{
    // TODO: Fill request struct fields.
}
it := c.ListDataSources(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*Client) ListTransferConfigs Uses

func (c *Client) ListTransferConfigs(ctx context.Context, req *datatransferpb.ListTransferConfigsRequest, opts ...gax.CallOption) *TransferConfigIterator

ListTransferConfigs returns information about all data transfers in the project.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"
// import "google.golang.org/api/iterator"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.ListTransferConfigsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListTransferConfigs(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*Client) ListTransferLogs Uses

func (c *Client) ListTransferLogs(ctx context.Context, req *datatransferpb.ListTransferLogsRequest, opts ...gax.CallOption) *TransferMessageIterator

ListTransferLogs returns user facing log messages for the data transfer run.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"
// import "google.golang.org/api/iterator"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.ListTransferLogsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListTransferLogs(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*Client) ListTransferRuns Uses

func (c *Client) ListTransferRuns(ctx context.Context, req *datatransferpb.ListTransferRunsRequest, opts ...gax.CallOption) *TransferRunIterator

ListTransferRuns returns information about running and completed jobs.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"
// import "google.golang.org/api/iterator"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.ListTransferRunsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListTransferRuns(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*Client) ScheduleTransferRuns Uses

func (c *Client) ScheduleTransferRuns(ctx context.Context, req *datatransferpb.ScheduleTransferRunsRequest, opts ...gax.CallOption) (*datatransferpb.ScheduleTransferRunsResponse, error)

ScheduleTransferRuns creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.ScheduleTransferRunsRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.ScheduleTransferRuns(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) StartManualTransferRuns Uses

func (c *Client) StartManualTransferRuns(ctx context.Context, req *datatransferpb.StartManualTransferRunsRequest, opts ...gax.CallOption) (*datatransferpb.StartManualTransferRunsResponse, error)

StartManualTransferRuns start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.StartManualTransferRunsRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.StartManualTransferRuns(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*Client) UpdateTransferConfig Uses

func (c *Client) UpdateTransferConfig(ctx context.Context, req *datatransferpb.UpdateTransferConfigRequest, opts ...gax.CallOption) (*datatransferpb.TransferConfig, error)

UpdateTransferConfig updates a data transfer configuration. All fields must be set, even if they are not updated.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.UpdateTransferConfigRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateTransferConfig(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

type DataSourceCallOptions Uses

type DataSourceCallOptions struct {
    UpdateTransferRun          []gax.CallOption
    LogTransferRunMessages     []gax.CallOption
    StartBigQueryJobs          []gax.CallOption
    FinishRun                  []gax.CallOption
    CreateDataSourceDefinition []gax.CallOption
    UpdateDataSourceDefinition []gax.CallOption
    DeleteDataSourceDefinition []gax.CallOption
    GetDataSourceDefinition    []gax.CallOption
    ListDataSourceDefinitions  []gax.CallOption
}

DataSourceCallOptions contains the retry settings for each method of DataSourceClient.

type DataSourceClient Uses

type DataSourceClient struct {

    // The call options for this service.
    CallOptions *DataSourceCallOptions
    // contains filtered or unexported fields
}

DataSourceClient is a client for interacting with BigQuery Data Transfer API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewDataSourceClient Uses

func NewDataSourceClient(ctx context.Context, opts ...option.ClientOption) (*DataSourceClient, error)

NewDataSourceClient creates a new data source service client.

The Google BigQuery Data Transfer API allows BigQuery users to configure transfer of their data from other Google Products into BigQuery. This service exposes methods that should be used by data source backend.

Code:

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use client.
_ = c

func (*DataSourceClient) Close Uses

func (c *DataSourceClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*DataSourceClient) Connection Uses

func (c *DataSourceClient) Connection() *grpc.ClientConn

Connection returns the client's connection to the API service.

func (*DataSourceClient) CreateDataSourceDefinition Uses

func (c *DataSourceClient) CreateDataSourceDefinition(ctx context.Context, req *datatransferpb.CreateDataSourceDefinitionRequest, opts ...gax.CallOption) (*datatransferpb.DataSourceDefinition, error)

CreateDataSourceDefinition creates a data source definition. Calling this method will automatically use your credentials to create the following Google Cloud resources in YOUR Google Cloud project.

OAuth client

Pub/Sub Topics and Subscriptions in each supported_location_ids. e.g., projects/{project_id}/{topics|subscriptions}/bigquerydatatransfer.{data_source_id}.{location_id}.run The field data_source.client_id should be left empty in the input request, as the API will create a new OAuth client on behalf of the caller. On the other hand data_source.scopes usually need to be set when there are OAuth scopes that need to be granted by end users.

We need a longer deadline due to the 60 seconds SLO from Pub/Sub admin Operations. This also applies to update and delete data source definition.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.CreateDataSourceDefinitionRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.CreateDataSourceDefinition(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*DataSourceClient) DeleteDataSourceDefinition Uses

func (c *DataSourceClient) DeleteDataSourceDefinition(ctx context.Context, req *datatransferpb.DeleteDataSourceDefinitionRequest, opts ...gax.CallOption) error

DeleteDataSourceDefinition deletes a data source definition, all of the transfer configs associated with this data source definition (if any) must be deleted first by the user in ALL regions, in order to delete the data source definition. This method is primarily meant for deleting data sources created during testing stage. If the data source is referenced by transfer configs in the region specified in the request URL, the method will fail immediately. If in the current region (e.g., US) it’s not used by any transfer configs, but in another region (e.g., EU) it is, then although the method will succeed in region US, but it will fail when the deletion operation is replicated to region EU. And eventually, the system will replicate the data source definition back from EU to US, in order to bring all regions to consistency. The final effect is that the data source appears to be ‘undeleted’ in the US region.

Code:

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.DeleteDataSourceDefinitionRequest{
    // TODO: Fill request struct fields.
}
err = c.DeleteDataSourceDefinition(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*DataSourceClient) FinishRun Uses

func (c *DataSourceClient) FinishRun(ctx context.Context, req *datatransferpb.FinishRunRequest, opts ...gax.CallOption) error

FinishRun notify the Data Transfer Service that the data source is done processing the run. No more status updates or requests to start/monitor jobs will be accepted. The run will be finalized by the Data Transfer Service when all monitored jobs are completed. Does not need to be called if the run is set to FAILED.

Code:

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.FinishRunRequest{
    // TODO: Fill request struct fields.
}
err = c.FinishRun(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*DataSourceClient) GetDataSourceDefinition Uses

func (c *DataSourceClient) GetDataSourceDefinition(ctx context.Context, req *datatransferpb.GetDataSourceDefinitionRequest, opts ...gax.CallOption) (*datatransferpb.DataSourceDefinition, error)

GetDataSourceDefinition retrieves an existing data source definition.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.GetDataSourceDefinitionRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.GetDataSourceDefinition(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*DataSourceClient) ListDataSourceDefinitions Uses

func (c *DataSourceClient) ListDataSourceDefinitions(ctx context.Context, req *datatransferpb.ListDataSourceDefinitionsRequest, opts ...gax.CallOption) *DataSourceDefinitionIterator

ListDataSourceDefinitions lists supported data source definitions.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"
// import "google.golang.org/api/iterator"

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.ListDataSourceDefinitionsRequest{
    // TODO: Fill request struct fields.
}
it := c.ListDataSourceDefinitions(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

func (*DataSourceClient) LogTransferRunMessages Uses

func (c *DataSourceClient) LogTransferRunMessages(ctx context.Context, req *datatransferpb.LogTransferRunMessagesRequest, opts ...gax.CallOption) error

LogTransferRunMessages log messages for a transfer run. If successful (at least 1 message), resets data_source.update_deadline_seconds timer.

Code:

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.LogTransferRunMessagesRequest{
    // TODO: Fill request struct fields.
}
err = c.LogTransferRunMessages(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*DataSourceClient) StartBigQueryJobs Uses

func (c *DataSourceClient) StartBigQueryJobs(ctx context.Context, req *datatransferpb.StartBigQueryJobsRequest, opts ...gax.CallOption) error

StartBigQueryJobs notify the Data Transfer Service that data is ready for loading. The Data Transfer Service will start and monitor multiple BigQuery Load jobs for a transfer run. Monitored jobs will be automatically retried and produce log messages when starting and finishing a job. Can be called multiple times for the same transfer run.

Code:

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.StartBigQueryJobsRequest{
    // TODO: Fill request struct fields.
}
err = c.StartBigQueryJobs(ctx, req)
if err != nil {
    // TODO: Handle error.
}

func (*DataSourceClient) UpdateDataSourceDefinition Uses

func (c *DataSourceClient) UpdateDataSourceDefinition(ctx context.Context, req *datatransferpb.UpdateDataSourceDefinitionRequest, opts ...gax.CallOption) (*datatransferpb.DataSourceDefinition, error)

UpdateDataSourceDefinition updates an existing data source definition. If changing supported_location_ids, triggers same effects as mentioned in “Create a data source definition.”

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.UpdateDataSourceDefinitionRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateDataSourceDefinition(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

func (*DataSourceClient) UpdateTransferRun Uses

func (c *DataSourceClient) UpdateTransferRun(ctx context.Context, req *datatransferpb.UpdateTransferRunRequest, opts ...gax.CallOption) (*datatransferpb.TransferRun, error)

UpdateTransferRun update a transfer run. If successful, resets data_source.update_deadline_seconds timer.

Code:

// import datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1"

ctx := context.Background()
c, err := datatransfer.NewDataSourceClient(ctx)
if err != nil {
    // TODO: Handle error.
}

req := &datatransferpb.UpdateTransferRunRequest{
    // TODO: Fill request struct fields.
}
resp, err := c.UpdateTransferRun(ctx, req)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

type DataSourceDefinitionIterator Uses

type DataSourceDefinitionIterator 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 []*datatransferpb.DataSourceDefinition, nextPageToken string, err error)
    // contains filtered or unexported fields
}

DataSourceDefinitionIterator manages a stream of *datatransferpb.DataSourceDefinition.

func (*DataSourceDefinitionIterator) Next Uses

func (it *DataSourceDefinitionIterator) Next() (*datatransferpb.DataSourceDefinition, 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 (*DataSourceDefinitionIterator) PageInfo Uses

func (it *DataSourceDefinitionIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type DataSourceIterator Uses

type DataSourceIterator 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 []*datatransferpb.DataSource, nextPageToken string, err error)
    // contains filtered or unexported fields
}

DataSourceIterator manages a stream of *datatransferpb.DataSource.

func (*DataSourceIterator) Next Uses

func (it *DataSourceIterator) Next() (*datatransferpb.DataSource, 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 (*DataSourceIterator) PageInfo Uses

func (it *DataSourceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type TransferConfigIterator Uses

type TransferConfigIterator 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 []*datatransferpb.TransferConfig, nextPageToken string, err error)
    // contains filtered or unexported fields
}

TransferConfigIterator manages a stream of *datatransferpb.TransferConfig.

func (*TransferConfigIterator) Next Uses

func (it *TransferConfigIterator) Next() (*datatransferpb.TransferConfig, 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 (*TransferConfigIterator) PageInfo Uses

func (it *TransferConfigIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type TransferMessageIterator Uses

type TransferMessageIterator 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 []*datatransferpb.TransferMessage, nextPageToken string, err error)
    // contains filtered or unexported fields
}

TransferMessageIterator manages a stream of *datatransferpb.TransferMessage.

func (*TransferMessageIterator) Next Uses

func (it *TransferMessageIterator) Next() (*datatransferpb.TransferMessage, 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 (*TransferMessageIterator) PageInfo Uses

func (it *TransferMessageIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type TransferRunIterator Uses

type TransferRunIterator 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 []*datatransferpb.TransferRun, nextPageToken string, err error)
    // contains filtered or unexported fields
}

TransferRunIterator manages a stream of *datatransferpb.TransferRun.

func (*TransferRunIterator) Next Uses

func (it *TransferRunIterator) Next() (*datatransferpb.TransferRun, 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 (*TransferRunIterator) PageInfo Uses

func (it *TransferRunIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Package datatransfer imports 17 packages (graph) and is imported by 2 packages. Updated 2020-05-30. Refresh now. Tools for package owners.