Versions in this module Expand all Collapse all v1 v1.0.0 Apr 24, 2021 Changes in this version + const StorageClassArchive + const StorageClassColdLine + const StorageClassNearLine + const StorageClassStandard + const Type + func New(pairs ...typ.Pair) (typ.Servicer, typ.Storager, error) + func NewServicer(pairs ...typ.Pair) (typ.Servicer, error) + func NewStorager(pairs ...typ.Pair) (typ.Storager, error) + func WithDefaultServicePairs(v DefaultServicePairs) Pair + func WithDefaultStoragePairs(v DefaultStoragePairs) Pair + func WithEncryptionKey(v []byte) Pair + func WithProjectID(v string) Pair + func WithStorageClass(v string) Pair + type DefaultServicePairs struct + Create []Pair + Delete []Pair + Get []Pair + List []Pair + type DefaultStoragePairs struct + Create []Pair + Delete []Pair + List []Pair + Metadata []Pair + Read []Pair + Stat []Pair + Write []Pair + type ObjectMetadata struct + EncryptionKeySha256 string + StorageClass string + func GetObjectMetadata(o *Object) ObjectMetadata + type Service struct + func (s *Service) Create(name string, pairs ...Pair) (store Storager, err error) + func (s *Service) CreateWithContext(ctx context.Context, name string, pairs ...Pair) (store Storager, err error) + func (s *Service) Delete(name string, pairs ...Pair) (err error) + func (s *Service) DeleteWithContext(ctx context.Context, name string, pairs ...Pair) (err error) + func (s *Service) Get(name string, pairs ...Pair) (store Storager, err error) + func (s *Service) GetWithContext(ctx context.Context, name string, pairs ...Pair) (store Storager, err error) + func (s *Service) List(pairs ...Pair) (sti *StoragerIterator, err error) + func (s *Service) ListWithContext(ctx context.Context, pairs ...Pair) (sti *StoragerIterator, err error) + func (s *Service) String() string + type Storage struct + func (s *Storage) Create(path string, pairs ...Pair) (o *Object) + func (s *Storage) Delete(path string, pairs ...Pair) (err error) + func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...Pair) (err error) + func (s *Storage) List(path string, pairs ...Pair) (oi *ObjectIterator, err error) + func (s *Storage) ListWithContext(ctx context.Context, path string, pairs ...Pair) (oi *ObjectIterator, err error) + func (s *Storage) Metadata(pairs ...Pair) (meta *StorageMeta, err error) + func (s *Storage) MetadataWithContext(ctx context.Context, pairs ...Pair) (meta *StorageMeta, err error) + func (s *Storage) Read(path string, w io.Writer, pairs ...Pair) (n int64, err error) + func (s *Storage) ReadWithContext(ctx context.Context, path string, w io.Writer, pairs ...Pair) (n int64, err error) + func (s *Storage) Stat(path string, pairs ...Pair) (o *Object, err error) + func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) + func (s *Storage) String() string + func (s *Storage) Write(path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error) + func (s *Storage) WriteWithContext(ctx context.Context, path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error)