Documentation ¶
Index ¶
- Constants
- type LocalStore
- func (l *LocalStore) Client() interface{}
- func (l *LocalStore) Delete(ctx context.Context, obj string) error
- func (l *LocalStore) Folders(ctx context.Context, csq cloudstorage.Query) ([]string, error)
- func (l *LocalStore) Get(ctx context.Context, o string) (cloudstorage.Object, error)
- func (l *LocalStore) List(ctx context.Context, query cloudstorage.Query) (*cloudstorage.ObjectsResponse, error)
- func (l *LocalStore) NewObject(objectname string) (cloudstorage.Object, error)
- func (l *LocalStore) NewReader(o string) (io.ReadCloser, error)
- func (l *LocalStore) NewReaderWithContext(ctx context.Context, o string) (io.ReadCloser, error)
- func (l *LocalStore) NewWriter(o string, metadata map[string]string) (io.WriteCloser, error)
- func (l *LocalStore) NewWriterWithContext(ctx context.Context, o string, metadata map[string]string, ...) (io.WriteCloser, error)
- func (l *LocalStore) Objects(ctx context.Context, csq cloudstorage.Query) (cloudstorage.ObjectIterator, error)
- func (l *LocalStore) String() string
- func (l *LocalStore) Type() string
Constants ¶
View Source
const ( // AuthFileSystem Authentication Method AuthFileSystem cloudstorage.AuthMethod = "localfiles" // StoreType name of our Local Storage provider = "localfs" StoreType = "localfs" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalStore ¶
type LocalStore struct { Id string // contains filtered or unexported fields }
LocalStore is client to local-filesystem store.
func NewLocalStore ¶
func NewLocalStore(bucket, storepath, cachepath string) (*LocalStore, error)
NewLocalStore create local store from storage path on local filesystem, and cachepath.
func (*LocalStore) Client ¶
func (l *LocalStore) Client() interface{}
func (*LocalStore) Delete ¶
func (l *LocalStore) Delete(ctx context.Context, obj string) error
Delete the object from underlying store.
func (*LocalStore) Folders ¶
func (l *LocalStore) Folders(ctx context.Context, csq cloudstorage.Query) ([]string, error)
Folders list of folders for given path query.
func (*LocalStore) Get ¶
func (l *LocalStore) Get(ctx context.Context, o string) (cloudstorage.Object, error)
func (*LocalStore) List ¶
func (l *LocalStore) List(ctx context.Context, query cloudstorage.Query) (*cloudstorage.ObjectsResponse, error)
List objects at Query location.
func (*LocalStore) NewObject ¶
func (l *LocalStore) NewObject(objectname string) (cloudstorage.Object, error)
NewObject create new object of given name.
func (*LocalStore) NewReader ¶
func (l *LocalStore) NewReader(o string) (io.ReadCloser, error)
NewReader create local file-system store reader.
func (*LocalStore) NewReaderWithContext ¶
func (l *LocalStore) NewReaderWithContext(ctx context.Context, o string) (io.ReadCloser, error)
func (*LocalStore) NewWriter ¶
func (l *LocalStore) NewWriter(o string, metadata map[string]string) (io.WriteCloser, error)
func (*LocalStore) NewWriterWithContext ¶
func (l *LocalStore) NewWriterWithContext(ctx context.Context, o string, metadata map[string]string, opts ...cloudstorage.Opts) (io.WriteCloser, error)
func (*LocalStore) Objects ¶
func (l *LocalStore) Objects(ctx context.Context, csq cloudstorage.Query) (cloudstorage.ObjectIterator, error)
Objects returns an iterator over the objects in the local folder that match the Query q. If q is nil, no filtering is done.
func (*LocalStore) String ¶
func (l *LocalStore) String() string
Click to show internal directories.
Click to hide internal directories.