Documentation ¶
Overview ¶
Package gcsstore implements the blob.Store interface using a GCS bucket.
Index ¶
- func Opener(ctx context.Context, addr string) (blob.Store, error)
- type Options
- type Store
- func (s *Store) Close(_ context.Context) error
- func (s *Store) Delete(ctx context.Context, key string) error
- func (s *Store) Get(ctx context.Context, key string) ([]byte, error)
- func (s *Store) Len(ctx context.Context) (int64, error)
- func (s *Store) List(ctx context.Context, start string, f func(string) error) error
- func (s *Store) Put(ctx context.Context, opts blob.PutOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // The prefix to prepend to each key written by the store. // If unset, no prefix is prepended and keys are written at the top level. // See also ShardPrefixLen. Prefix string // The length of the key shard prefix. If positive, the key is partitioned // into a prefix of this length and a suffix comprising the rest of the key, // separated by a "/". For example, if ShardPrefixLen is 3, then the key // 01234567 will besplit to 012/34567. ShardPrefixLen int // If set, the bucket will be created in this project if it does not exist. Project string // If set, options to pass when creating a bucket. BucketAttrs *storage.BucketAttrs // If not nil, return JSON credentials. Credentials func(context.Context) ([]byte, error) // If true and credentials are not provided, connect without authentication. // If false, default application credentials will be used from the environment. Unauthenticated bool }
Options control the construction of a *Store.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
A Store implements the blob.Store interface using a GCS bucket.
Click to show internal directories.
Click to hide internal directories.