gcs

package
v0.0.0-...-9200169 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGCSObject

func DeleteGCSObject(ctx context.Context,
	gcsClient *storage.Client, inputURL string) error

DeleteGCSObject deletes an object at the input URL

func DownloadGCSObject

func DownloadGCSObject(ctx context.Context, gcsClient *storage.Client, gcsBucket, objectName, destinationPath string) error

DownloadGCSObject downloads the object at bucket, objectName and saves it at destinationPath

func DownloadGCSObjectFromURL

func DownloadGCSObjectFromURL(ctx context.Context, gcsClient *storage.Client, inputURL, destinationPath string) error

DownloadGCSObjectFromURL downloads the object at inputURL and saves it at destinationPath

func DownloadGCSObjectString

func DownloadGCSObjectString(ctx context.Context,
	gcsClient *storage.Client, inputURL string) (string, error)

DownloadGCSObjectString downloads the object at inputURL and saves the contents of the object file to a string

func GCSObjectExists

func GCSObjectExists(ctx context.Context, gcsClient *storage.Client, gcsBucket, objectName string) (bool, error)

GCSObjectExists checks if an object with objectName exists at gcsBucket objectName.

func GCSObjectExistsFromURL

func GCSObjectExistsFromURL(ctx context.Context, gcsClient *storage.Client, inputURL string) (bool, error)

GCSObjectExistsFromURL checks if an object exists at inputURL

func ListGCSBucket

func ListGCSBucket(ctx context.Context, gcsClient *storage.Client, gcsBucket, prefix string) ([]string, error)

ListGCSBucket lists all the objectNames in gcsBucket with prefix.

func UploadGCSObject

func UploadGCSObject(ctx context.Context, gcsClient *storage.Client, inputPath, destinationURL string) error

UploadGCSObject uploads an object at inputPath to destination URL

func UploadGCSObjectString

func UploadGCSObjectString(ctx context.Context, gcsClient *storage.Client, inputStr, destinationURL string) error

UploadGCSObjectString uploads an input string as a file to destination URL

Types

This section is empty.

Jump to

Keyboard shortcuts

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