Documentation ¶
Index ¶
- Variables
- type BucketStorer
- func (s BucketStorer) Exists(ctx context.Context, objName string) (bool, error)
- func (s BucketStorer) ExistsRetry(ctx context.Context, objName string) (exists bool, err error)
- func (s BucketStorer) Metadata(ctx context.Context, objName string) (*storage.ObjectAttrs, error)
- func (s BucketStorer) NewReader(ctx context.Context, objName string) (*storage.Reader, error)
- func (s BucketStorer) NewWriter(ctx context.Context, objName string, opts ...func(*storage.ObjectAttrs)) *storage.Writer
- func (s BucketStorer) Write(ctx context.Context, objName string, b []byte, ...) (int, error)
- func (s BucketStorer) WriteGzip(ctx context.Context, objName string, b []byte, ...) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ObjAttrsOptions objectAttrsOptions
Functions ¶
This section is empty.
Types ¶
type BucketStorer ¶
type BucketStorer struct {
// contains filtered or unexported fields
}
func NewBucketStorer ¶
func NewBucketStorer(c *storage.Client, bucketName string) BucketStorer
func (BucketStorer) ExistsRetry ¶
ExistsRetry checks if an object exists, but retries on Unauthorized errors. While writes to GCP are strongly consistent, access is only eventually consistent: https://cloud.google.com/storage/docs/consistency. and can take up to several minutes to take effect.
func (BucketStorer) Metadata ¶
func (s BucketStorer) Metadata(ctx context.Context, objName string) (*storage.ObjectAttrs, error)
func (BucketStorer) NewWriter ¶
func (s BucketStorer) NewWriter(ctx context.Context, objName string, opts ...func(*storage.ObjectAttrs)) *storage.Writer
Click to show internal directories.
Click to hide internal directories.