gcs

package module
v0.0.0-...-c789bb0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

README

Open source Go Package for GCS operations.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyOneFile

func CopyOneFile(sourceBucket string, destBucket string, fileName string) bool

Copy one file from one bucket to another bucket. Return true if succeed. ("cp")

func CreateBucket

func CreateBucket(projectID string, bucketName string) bool

Create a new bucket. Return true if it already exsits or is created successfully.

func DeleteBucket

func DeleteBucket(bucketName string) bool

Delete the bucket if it is empty. ("rmdir")

func DeleteFiles

func DeleteFiles(bucketName string, prefixFileName string) bool

Delete all files with specified prefix from bucket. ("rm")

func GetFileNamesFromBucket

func GetFileNamesFromBucket(bucketName string) []string

Given the bucket name, return array of file names in that bucket. ("ls")

func SyncTwoBuckets

func SyncTwoBuckets(sourceBucket string, destBucket string, prefixFileName string) bool

Copy all files with PrefixFileName from SourceBucke to DestBucket if there is no one yet. Return true if succeed.

func UploadFile

func UploadFile(bucketName string, fileName string) bool

Upload one file from local path to bucket. ("cp")

Types

This section is empty.

Jump to

Keyboard shortcuts

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