go-cloud: github.com/google/go-cloud/blob/gcsblob Index | Files

package gcsblob

import "github.com/google/go-cloud/blob/gcsblob"

Package gcsblob provides an implementation of blob that uses GCS.

It exposes the following types for As: Bucket: *storage.Client ListObject: storage.ObjectAttrs ListOptions.BeforeList: *storage.Query Reader: storage.Reader Attributes: storage.ObjectAttrs WriterOptions.BeforeWrite: *storage.Writer

Index

Package Files

gcsblob.go

func OpenBucket Uses

func OpenBucket(ctx context.Context, bucketName string, client *gcp.HTTPClient, opts *Options) (*blob.Bucket, error)

OpenBucket returns a GCS Bucket that communicates using the given HTTP client.

type Options Uses

type Options struct {
    // GoogleAccessID represents the authorizer for SignedURL.
    // Required to use SignedURL.
    // See https://godoc.org/cloud.google.com/go/storage#SignedURLOptions.
    GoogleAccessID string

    // PrivateKey is the Google service account private key.
    // Exactly one of PrivateKey or SignBytes must be non-nil to use SignedURL.
    // See https://godoc.org/cloud.google.com/go/storage#SignedURLOptions.
    PrivateKey []byte

    // SignBytes is a function for implementing custom signing.
    // Exactly one of PrivateKey or SignBytes must be non-nil to use SignedURL.
    // See https://godoc.org/cloud.google.com/go/storage#SignedURLOptions.
    SignBytes func([]byte) ([]byte, error)
}

Options sets options for constructing a *blob.Bucket backed by GCS.

Package gcsblob imports 13 packages (graph) and is imported by 4 packages. Updated 2018-10-18. Refresh now. Tools for package owners.