Documentation ¶
Index ¶
- func IsNotExist(err error) bool
- func NewErrNotExist(err error, format string, args ...interface{}) error
- type ErrNotExist
- type EscapeError
- type ObjStorage
- type ObjectInfo
- type PosixFlatStorage
- func (s *PosixFlatStorage) DeleteObject(p string) error
- func (s *PosixFlatStorage) List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo
- func (s *PosixFlatStorage) ReadObject(p string) (ReadSeekCloser, error)
- func (s *PosixFlatStorage) Stat(p string) (*ObjectInfo, error)
- func (s *PosixFlatStorage) WriteObject(p string, data io.Reader, size int64, persist bool) error
- type PosixStorage
- func (s *PosixStorage) DeleteObject(p string) error
- func (s *PosixStorage) List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo
- func (s *PosixStorage) ReadObject(p string) (ReadSeekCloser, error)
- func (s *PosixStorage) Stat(p string) (*ObjectInfo, error)
- func (s *PosixStorage) WriteObject(p string, data io.Reader, size int64, persist bool) error
- type ReadSeekCloser
- type S3Storage
- func (s *S3Storage) DeleteObject(filepath string) error
- func (s *S3Storage) List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo
- func (s *S3Storage) ReadObject(filepath string) (ReadSeekCloser, error)
- func (s *S3Storage) Stat(p string) (*ObjectInfo, error)
- func (s *S3Storage) WriteObject(filepath string, data io.Reader, size int64, persist bool) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotExist ¶ added in v0.4.0
func NewErrNotExist ¶ added in v0.4.0
Types ¶
type ErrNotExist ¶ added in v0.4.0
type ErrNotExist struct {
*util.WrapperError
}
type EscapeError ¶ added in v0.4.0
type EscapeError string
func (EscapeError) Error ¶ added in v0.4.0
func (e EscapeError) Error() string
type ObjStorage ¶
type ObjStorage struct { Storage // contains filtered or unexported fields }
ObjStorage wraps a Storage providing additional helper functions
func NewObjStorage ¶
func NewObjStorage(s Storage, delimiter string) *ObjStorage
func (*ObjStorage) Delimiter ¶
func (s *ObjStorage) Delimiter() string
func (*ObjStorage) List ¶
func (s *ObjStorage) List(prefix, startWith string, recursive bool, doneCh <-chan struct{}) <-chan ObjectInfo
type ObjectInfo ¶ added in v0.4.0
type PosixFlatStorage ¶ added in v0.4.0
type PosixFlatStorage struct {
// contains filtered or unexported fields
}
func NewPosixFlat ¶ added in v0.4.0
func NewPosixFlat(baseDir string) (*PosixFlatStorage, error)
func (*PosixFlatStorage) DeleteObject ¶ added in v0.4.0
func (s *PosixFlatStorage) DeleteObject(p string) error
func (*PosixFlatStorage) List ¶ added in v0.4.0
func (s *PosixFlatStorage) List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo
func (*PosixFlatStorage) ReadObject ¶ added in v0.4.0
func (s *PosixFlatStorage) ReadObject(p string) (ReadSeekCloser, error)
func (*PosixFlatStorage) Stat ¶ added in v0.4.0
func (s *PosixFlatStorage) Stat(p string) (*ObjectInfo, error)
func (*PosixFlatStorage) WriteObject ¶ added in v0.4.0
type PosixStorage ¶ added in v0.4.0
type PosixStorage struct {
// contains filtered or unexported fields
}
func NewPosix ¶ added in v0.4.0
func NewPosix(baseDir string) (*PosixStorage, error)
func (*PosixStorage) DeleteObject ¶ added in v0.4.0
func (s *PosixStorage) DeleteObject(p string) error
func (*PosixStorage) List ¶ added in v0.4.0
func (s *PosixStorage) List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo
func (*PosixStorage) ReadObject ¶ added in v0.4.0
func (s *PosixStorage) ReadObject(p string) (ReadSeekCloser, error)
func (*PosixStorage) Stat ¶ added in v0.4.0
func (s *PosixStorage) Stat(p string) (*ObjectInfo, error)
func (*PosixStorage) WriteObject ¶ added in v0.4.0
type ReadSeekCloser ¶ added in v0.4.0
type S3Storage ¶ added in v0.4.0
type S3Storage struct {
// contains filtered or unexported fields
}
func (*S3Storage) DeleteObject ¶ added in v0.4.0
func (*S3Storage) List ¶ added in v0.4.0
func (s *S3Storage) List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo
func (*S3Storage) ReadObject ¶ added in v0.4.0
func (s *S3Storage) ReadObject(filepath string) (ReadSeekCloser, error)
type Storage ¶
type Storage interface { Stat(filepath string) (*ObjectInfo, error) ReadObject(filepath string) (ReadSeekCloser, error) // WriteObject atomically writes an object. If size is greater or equal to // zero then only size bytes will be read from data and wrote. If size is // less than zero data will be wrote until EOF. When persist is true the // implementation must ensure that data is persisted to the underlying // storage. WriteObject(filepath string, data io.Reader, size int64, persist bool) error DeleteObject(filepath string) error List(prefix, startWith, delimiter string, doneCh <-chan struct{}) <-chan ObjectInfo }
Click to show internal directories.
Click to hide internal directories.