storj/pkg/storage/streams/store.go
Kaloyan Raev 8ce889ed1b
ObjectStore (#128)
* WIP ObjectStore

* Remove methods for extended attributes

* List returns metadata too

* No real need to prepend "object" in path

* Serialize metadata

* List retuns []ListItem instead of []Path
2018-07-16 23:44:28 +03:00

28 lines
762 B
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package streams
import (
"context"
"io"
"time"
"storj.io/storj/pkg/paths"
"storj.io/storj/pkg/ranger"
"storj.io/storj/pkg/storage"
)
// Store for streams
type Store interface {
Meta(ctx context.Context, path paths.Path) (storage.Meta, error)
Get(ctx context.Context, path paths.Path) (ranger.RangeCloser,
storage.Meta, error)
Put(ctx context.Context, path paths.Path, data io.Reader,
metadata []byte, expiration time.Time) (storage.Meta, error)
Delete(ctx context.Context, path paths.Path) error
List(ctx context.Context, prefix, startAfter, endBefore paths.Path,
recursive bool, limit int, metaFlags uint64) (items []storage.ListItem,
more bool, err error)
}