Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket interface {
// File - Get a file reference for in this bucket
File(key string) File
// Files - Get all file references for this bucket
Files(ctx context.Context) ([]File, error)
// Name - Get the name of the bucket
Name() string
}
Cloud storage bucket resource for large file storage.
type File ¶
type File interface {
// Name - Get the name of the file
Name() string
// Read - Read this object
Read(ctx context.Context) ([]byte, error)
// Write - Write this object
Write(ctx context.Context, data []byte) error
// Delete - Delete this object
Delete(ctx context.Context) error
// UploadUrl - Creates a signed Url for uploading this file reference
UploadUrl(ctx context.Context, expiry time.Duration) (string, error)
// DownloadUrl - Creates a signed Url for downloading this file reference
DownloadUrl(ctx context.Context, expiry time.Duration) (string, error)
}
File - A file reference for a bucket
type PresignUrlOptions ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.