Documentation
¶
Overview ¶
Package gcs provides a small Google Cloud Storage client built on the JSON API.
Index ¶
- Variables
- type Bucket
- func (g *Bucket) Delete(ctx context.Context, path string) error
- func (g *Bucket) Exists(ctx context.Context, path string) (bool, error)
- func (g *Bucket) ListPrefix(ctx context.Context, prefix string) ([]ObjectInfo, error)
- func (g *Bucket) Open(ctx context.Context, path string) (io.ReadCloser, error)
- func (g *Bucket) SignedURL(ctx context.Context, path string, expiry time.Duration) (string, error)
- func (g *Bucket) Size(ctx context.Context, path string) (int64, error)
- func (g *Bucket) UsedSpace(ctx context.Context) (int64, error)
- func (g *Bucket) Write(ctx context.Context, path string, r io.Reader) (int64, error)
- type ObjectInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates that an object does not exist. ErrNotFound = errors.New("gcs object not found") // ErrSignedURLUnsupported indicates that the current credentials cannot sign URLs. ErrSignedURLUnsupported = errors.New("signed gcs URLs not supported by current credentials") )
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket provides access to a Google Cloud Storage bucket through the JSON API.
func OpenBucket ¶
OpenBucket opens a Google Cloud Storage bucket from a gs:// URL.
func (*Bucket) ListPrefix ¶
ListPrefix returns metadata for objects whose names start with prefix.
Click to show internal directories.
Click to hide internal directories.