common

package module
v0.0.0-...-442515b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PubSubMessageSenderFactory

func PubSubMessageSenderFactory(ctx context.Context, projectID string, topicID string) func(msgData PubSubMessageData) error

func SendPubSubMessage

func SendPubSubMessage(ctx context.Context, projectId, topicId string, data PubSubMessageData) error

Types

type BigQueryClient

type BigQueryClient interface {
	Query(q string) BigQueryQueryHandle
}

type BigQueryJobHandle

type BigQueryJobHandle interface {
	Wait(ctx context.Context) (BigQueryJobStatusHandle, error)
}

type BigQueryJobStatusHandle

type BigQueryJobStatusHandle interface {
	Err() error
}

type BigQueryQueryHandle

type BigQueryQueryHandle interface {
	Run(ctx context.Context) (j BigQueryJobHandle, err error)
	SetParameters(p []bigquery.QueryParameter)
}

type BucketHandle

type BucketHandle interface {
	Object(name string) ObjectHandle
}

type ObjectHandle

type ObjectHandle interface {
	NewReader(ctx context.Context) (io.ReadCloser, error)
	NewWriter(ctx context.Context) io.WriteCloser
}

type ObjectWriter

type ObjectWriter interface {
	Write(p []byte) (n int, err error)
	Close() error
}

type PubSubMessageData

type PubSubMessageData struct {
	Bucket   string `json:"bucket"`
	FilePath string `json:"filePath"`
}

type RealBigQueryClient

type RealBigQueryClient struct {
	Client *bigquery.Client
}

func (*RealBigQueryClient) Query

type RealBigQueryJobHandle

type RealBigQueryJobHandle struct {
	// contains filtered or unexported fields
}

func (*RealBigQueryJobHandle) Wait

type RealBigQueryJobStatusHandle

type RealBigQueryJobStatusHandle struct {
	// contains filtered or unexported fields
}

func (*RealBigQueryJobStatusHandle) Err

type RealBigQueryQueryHandle

type RealBigQueryQueryHandle struct {
	// contains filtered or unexported fields
}

func (*RealBigQueryQueryHandle) Run

func (*RealBigQueryQueryHandle) SetParameters

func (r *RealBigQueryQueryHandle) SetParameters(p []bigquery.QueryParameter)

type RealStorageBucketHandle

type RealStorageBucketHandle struct {
	// contains filtered or unexported fields
}

func (*RealStorageBucketHandle) Object

func (rbh *RealStorageBucketHandle) Object(name string) ObjectHandle

type RealStorageClient

type RealStorageClient struct {
	Client *storage.Client
}

func (*RealStorageClient) Bucket

func (r *RealStorageClient) Bucket(name string) BucketHandle

type RealStorageObjectHandle

type RealStorageObjectHandle struct {
	// contains filtered or unexported fields
}

func (*RealStorageObjectHandle) NewReader

func (roh *RealStorageObjectHandle) NewReader(ctx context.Context) (io.ReadCloser, error)

func (*RealStorageObjectHandle) NewWriter

type StorageClient

type StorageClient interface {
	Bucket(name string) BucketHandle
}

The StorageClient interface is defined for the *storage.Client type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL