Versions in this module Expand all Collapse all v0 v0.1.3 Aug 26, 2019 Changes in this version + type AuthConfig struct + GCS struct{ ... } + type Client struct + func NewClient(config Config, userAuth UserAuthConfig, opts ...Option) (*Client, error) + func (c *Client) Download(namespace, name string, dst io.Writer) error + func (c *Client) List(prefix string, opts ...backend.ListOption) (*backend.ListResult, error) + func (c *Client) Stat(namespace, name string) (*core.BlobInfo, error) + func (c *Client) Upload(namespace, name string, src io.Reader) error + type Config struct + Bucket string + BufferGuard datasize.ByteSize + ListMaxKeys int + Location string + NamePath string + RootDirectory string + UploadChunkSize int64 + Username string + type GCS interface + Download func(objectName string, w io.Writer) (int64, error) + GetObjectIterator func(prefix string) iterator.Pageable + NextPage func(pager *iterator.Pager) ([]string, string, error) + ObjectAttrs func(objectName string) (*storage.ObjectAttrs, error) + Upload func(objectName string, r io.Reader) (int64, error) + type GCSImpl struct + func NewGCS(ctx context.Context, bucket *storage.BucketHandle, config *Config) *GCSImpl + func (g *GCSImpl) Download(objectName string, w io.Writer) (int64, error) + func (g *GCSImpl) GetObjectIterator(prefix string) iterator.Pageable + func (g *GCSImpl) NextPage(pager *iterator.Pager) ([]string, string, error) + func (g *GCSImpl) ObjectAttrs(objectName string) (*storage.ObjectAttrs, error) + func (g *GCSImpl) Upload(objectName string, r io.Reader) (int64, error) + type Option func(*Client) + func WithGCS(gcs GCS) Option + type UserAuthConfig map[string]AuthConfig