Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (t *Client) Close() error
- func (t *Client) EnsureDataset(datasetName string) (*bigquery.Dataset, error)
- func (t *Client) EnsureTable(datasetName string, tableName string, schemaObject interface{}) (*bigquery.Table, error)
- func (t *Client) UploadAsync(datasetName string, tableName string, data interface{}) (err error)
- type OptionEnsureDatasetWhenFirstUpload
- type OptionEnsureTableWhenFirstUpload
- type OptionUploaderErrorHandler
- type OptionUploaderQueueSize
Constants ¶
const OptionEnsureDatasetWhenFirstUploadDefault = OptionEnsureDatasetWhenFirstUpload(true)
OptionEnsureDatasetWhenFirstUploadDefault default value of OptionEnsureDatasetWhenFirstUpload
const OptionEnsureTableWhenFirstUploadDefault = OptionEnsureTableWhenFirstUpload(true)
OptionEnsureTableWhenFirstUploadDefault default value of OptionEnsureTableWhenFirstUpload
const OptionUploaderQueueSizeDefault = OptionUploaderQueueSize(100)
OptionUploaderQueueSizeDefault default value of OptionUploaderQueueSize
Variables ¶
var (
ErrUnknownOption2 = errutil.NewFactory("Unknown option type: %T , value: %+v")
)
errors
var OptionUploaderErrorHandlerDefault = OptionUploaderErrorHandler(errutil.Trace)
OptionUploaderErrorHandlerDefault default value of OptionUploaderErrorHandler
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is instance of bigquery client
func NewClient ¶
func NewClient( ctx context.Context, gcKeyFile string, projectID string, options ...interface{}, ) (*Client, error)
NewClient return Client with Config
func (*Client) EnsureDataset ¶
EnsureDataset ensure dataset exists in project
type OptionEnsureDatasetWhenFirstUpload ¶
type OptionEnsureDatasetWhenFirstUpload bool
OptionEnsureDatasetWhenFirstUpload ensure dataset when first upload occur
type OptionEnsureTableWhenFirstUpload ¶
type OptionEnsureTableWhenFirstUpload bool
OptionEnsureTableWhenFirstUpload ensure table when first upload occur
type OptionUploaderErrorHandler ¶
type OptionUploaderErrorHandler func(error)
OptionUploaderErrorHandler error handler when upload error in background uploader, default: errutil.Trace(err)
type OptionUploaderQueueSize ¶
type OptionUploaderQueueSize uint64
OptionUploaderQueueSize queue size for background uploader, default: 100