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() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
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(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(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(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(project string) string
ProjectPath returns the path for the project resource.
Deprecated: Use
fmt.Sprintf("projects/%s", project)
instead.
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(project, transferConfig string) string
TransferConfigPath returns the path for the transfer config resource.
Deprecated: Use
fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig)
instead.
CallOptions contains the retry settings for each method of Client.
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 EnrollDataSources []gax.CallOption UnenrollDataSources []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption }
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.
This API allows users to manage their data transfers into BigQuery.
type Client struct { // The call options for this service. CallOptions *CallOptions // contains filtered or unexported fields }
func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)
NewClient creates a new data transfer service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
This API allows users to manage their data transfers into BigQuery.
▹ Example
func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)
NewRESTClient creates a new data transfer service rest client.
This API allows users to manage their data transfers into BigQuery.
▹ Example
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.
▹ Example
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 (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 (c *Client) CreateTransferConfig(ctx context.Context, req *datatransferpb.CreateTransferConfigRequest, opts ...gax.CallOption) (*datatransferpb.TransferConfig, error)
CreateTransferConfig creates a new data transfer configuration.
▹ Example
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.
▹ Example
func (c *Client) DeleteTransferRun(ctx context.Context, req *datatransferpb.DeleteTransferRunRequest, opts ...gax.CallOption) error
DeleteTransferRun deletes the specified transfer run.
▹ Example
func (c *Client) EnrollDataSources(ctx context.Context, req *datatransferpb.EnrollDataSourcesRequest, opts ...gax.CallOption) error
EnrollDataSources enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the BigQuery UI (at https://console.cloud.google.com/bigquery), and the documents can be found in the public guide for BigQuery Web UI (at https://cloud.google.com/bigquery/bigquery-web-ui) and Data Transfer Service (at https://cloud.google.com/bigquery/docs/working-with-transfers).
▹ Example
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.
▹ Example
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
▹ Example
func (c *Client) GetTransferConfig(ctx context.Context, req *datatransferpb.GetTransferConfigRequest, opts ...gax.CallOption) (*datatransferpb.TransferConfig, error)
GetTransferConfig returns information about a data transfer config.
▹ Example
func (c *Client) GetTransferRun(ctx context.Context, req *datatransferpb.GetTransferRunRequest, opts ...gax.CallOption) (*datatransferpb.TransferRun, error)
GetTransferRun returns information about the particular transfer run.
▹ Example
func (c *Client) ListDataSources(ctx context.Context, req *datatransferpb.ListDataSourcesRequest, opts ...gax.CallOption) *DataSourceIterator
ListDataSources lists supported data sources and returns their settings.
▹ Example
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
func (c *Client) ListTransferConfigs(ctx context.Context, req *datatransferpb.ListTransferConfigsRequest, opts ...gax.CallOption) *TransferConfigIterator
ListTransferConfigs returns information about all transfer configs owned by a project in the specified location.
▹ Example
func (c *Client) ListTransferLogs(ctx context.Context, req *datatransferpb.ListTransferLogsRequest, opts ...gax.CallOption) *TransferMessageIterator
ListTransferLogs returns log messages for the transfer run.
▹ Example
func (c *Client) ListTransferRuns(ctx context.Context, req *datatransferpb.ListTransferRunsRequest, opts ...gax.CallOption) *TransferRunIterator
ListTransferRuns returns information about running and completed transfer runs.
▹ Example
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.
Deprecated: ScheduleTransferRuns may be removed in a future version.
▹ Example
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.
▹ Example
func (c *Client) UnenrollDataSources(ctx context.Context, req *datatransferpb.UnenrollDataSourcesRequest, opts ...gax.CallOption) error
UnenrollDataSources unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the BigQuery UI (at https://console.cloud.google.com/bigquery). Data transfers configurations of unenrolled data sources will not be scheduled.
▹ Example
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.
▹ Example
DataSourceIterator manages a stream of *datatransferpb.DataSource.
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 }
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 (it *DataSourceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
LocationIterator manages a stream of *locationpb.Location.
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 }
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 (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
TransferConfigIterator manages a stream of *datatransferpb.TransferConfig.
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 }
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 (it *TransferConfigIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
TransferMessageIterator manages a stream of *datatransferpb.TransferMessage.
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 }
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 (it *TransferMessageIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
TransferRunIterator manages a stream of *datatransferpb.TransferRun.
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 }
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 (it *TransferRunIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
Name | Synopsis |
---|---|
.. | |
datatransferpb |