gcs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	ProjectID  string
	BucketName string
	FilePath   string
	// contains filtered or unexported fields
}

File represents a File that can be read from or written to.

func NewGcsFileReader

func NewGcsFileReader(ctx context.Context, projectID, bucketName, name string) (*File, error)

NewGcsFileWriter will create a new GCS file reader.

func NewGcsFileReaderWithClient

func NewGcsFileReaderWithClient(ctx context.Context, client *storage.Client, projectID, bucketName, name string) (*File, error)

NewGcsFileWriter will create a new GCS file reader with the passed client.

func NewGcsFileWriter

func NewGcsFileWriter(ctx context.Context, projectID, bucketName, name string) (*File, error)

NewGcsFileWriter will create a new GCS file writer.

func NewGcsFileWriterWithClient

func NewGcsFileWriterWithClient(ctx context.Context, client *storage.Client, projectID, bucketName, name string) (*File, error)

NewGcsFileWriter will create a new GCS file writer with the passed client.

func (*File) Close

func (g *File) Close() error

Close implements io.Closer.

func (*File) Create

func (g *File) Create(name string) (source.ParquetFile, error)

Create will create a new GCS file reader/writer and open the object named as the passed named. If name is left empty the same object as currently opened will be re-opened.

func (*File) Open

func (g *File) Open(name string) (source.ParquetFile, error)

Open will create a new GCS file reader/writer and open the object named as the passed named. If name is left empty the same object as currently opened will be re-opened.

func (*File) Read

func (g *File) Read(b []byte) (int, error)

Read implements io.Reader.

func (*File) Seek

func (g *File) Seek(offset int64, whence int) (int64, error)

Seek implements io.Seeker.

func (*File) Write

func (g *File) Write(b []byte) (int, error)

Write implements io.Writer.

Jump to

Keyboard shortcuts

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