gcsclient

package
v0.0.0-...-2ad2f98 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageClient

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

StorageClient holds the information needed to talk to cloud storage and fulfill the gcs.GCSClient interface

func New

func New(s *storage.Client, bucket string) *StorageClient

New returns a new *StorageClient. See the gcs.GCSClient interface for more information.

func (*StorageClient) AllFilesInDirectory

func (g *StorageClient) AllFilesInDirectory(ctx context.Context, prefix string, callback func(item *storage.ObjectAttrs) error) error

See the GCSClient interface for more information about AllFilesInDirectory.

func (*StorageClient) Bucket

func (g *StorageClient) Bucket() string

See the GCSClient interface for more information about Bucket.

func (*StorageClient) DeleteFile

func (g *StorageClient) DeleteFile(ctx context.Context, path string) error

See the GCSClient interface for more information about DeleteFile.

func (*StorageClient) DoesFileExist

func (g *StorageClient) DoesFileExist(ctx context.Context, path string) (bool, error)

See the GCSClient interface for more information about DoesFileExist.

func (*StorageClient) FileReader

func (g *StorageClient) FileReader(ctx context.Context, path string) (io.ReadCloser, error)

See the GCSClient interface for more information about FileReader.

func (*StorageClient) FileWriter

func (g *StorageClient) FileWriter(ctx context.Context, path string, opts gcs.FileWriteOptions) io.WriteCloser

See the GCSClient interface for more information about FileWriter.

func (*StorageClient) GetFileContents

func (g *StorageClient) GetFileContents(ctx context.Context, path string) ([]byte, error)

See the GCSClient interface for more information about GetFileContents.

func (*StorageClient) GetFileObjectAttrs

func (g *StorageClient) GetFileObjectAttrs(ctx context.Context, path string) (*storage.ObjectAttrs, error)

See the GCSClient interface for more information about GetFileObjectAttrs.

func (*StorageClient) SetFileContents

func (g *StorageClient) SetFileContents(ctx context.Context, path string, opts gcs.FileWriteOptions, contents []byte) (rv error)

See the GCSClient interface for more information about SetFileContents.

Jump to

Keyboard shortcuts

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