Documentation ¶
Overview ¶
Package file exports a generic file interface that we use to access Google Cloud Storage. None of the functions here are unit-testable because they are all either interfaces or connect to Google Cloud Storage, which cannot be unit tested.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object interface { GetWriter(ctx context.Context) io.WriteCloser DeleteFile(ctx context.Context) error CopyTo(ctx context.Context, filename string) error }
Object is the mockable interface to the functionality we need from a single CGS object.
type Store ¶
type Store interface { GetFile(name string) Object NamesToMD5(ctx context.Context, prefix string) map[string][]byte }
Store is the mockable interface to the functionality we need from CGS.
func NewGCSStore ¶
func NewGCSStore(bkt *storage.BucketHandle) Store
NewGCSStore adapts a bucket handle into a file.Store.
Click to show internal directories.
Click to hide internal directories.