gcs

package
v0.0.0-...-a4e60c4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBucketExistence

func CheckBucketExistence(ctx context.Context, client *storage.Client, bucketName string) error

func CheckObjectExistence

func CheckObjectExistence(ctx context.Context, client *storage.Client, bucketName, objectName string) error

func CloseClient

func CloseClient(client *storage.Client)

func CreateBucket

func CreateBucket(ctx context.Context, client *storage.Client, projectId,
	bucketName, storageClass, location string) error

func DeleteBucket

func DeleteBucket(ctx context.Context, client *storage.Client, bucketName string) error

func DeleteObject

func DeleteObject(ctx context.Context, client *storage.Client, bucketName, objectName string) error

func DownloadObject

func DownloadObject(ctx context.Context, client *storage.Client, bucketName, objectName string) ([]byte, error)

func GetBucketMetadata

func GetBucketMetadata(ctx context.Context, client *storage.Client, bucketName string) (*storage.BucketAttrs, error)

func GetObjectMetadata

func GetObjectMetadata(ctx context.Context, client *storage.Client, bucketName, objectName string) (*storage.ObjectAttrs, error)

func ListBuckets

func ListBuckets(ctx context.Context, client *storage.Client, projectId string) error

func ListObjects

func ListObjects(ctx context.Context, client *storage.Client, bucketName string) error

func NewClient

func NewClient(ctx context.Context) (*storage.Client, error)

func PrintBucketMetadata

func PrintBucketMetadata(attrs *storage.BucketAttrs)

func PrintObjectMetadata

func PrintObjectMetadata(attrs *storage.ObjectAttrs)

func UploadObject

func UploadObject(ctx context.Context, client *storage.Client, bucketName, objectName string, sourceFile *os.File) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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