Documentation ¶
Index ¶
- func IsNotExist(err error) bool
- func NewErrNotExist(err error, format string, args ...interface{}) error
- type ErrNotExist
- type ObjStorage
- type ObjectInfo
- type PosixStorage
- func (s *PosixStorage) DeleteObject(ctx context.Context, p string) error
- func (s *PosixStorage) List(ctx context.Context, prefix, startAfter string, recursive bool) <-chan ObjectInfo
- func (s *PosixStorage) ReadObject(ctx context.Context, p string) (ReadSeekCloser, error)
- func (s *PosixStorage) Stat(ctx context.Context, p string) (*ObjectInfo, error)
- func (s *PosixStorage) WriteObject(ctx context.Context, p string, data io.Reader, size int64, persist bool) error
- type ReadSeekCloser
- type S3Storage
- func (s *S3Storage) DeleteObject(ctx context.Context, filepath string) error
- func (s *S3Storage) List(ctx context.Context, prefix, startAfter string, recursive bool) <-chan ObjectInfo
- func (s *S3Storage) ReadObject(ctx context.Context, filepath string) (ReadSeekCloser, error)
- func (s *S3Storage) Stat(ctx context.Context, p string) (*ObjectInfo, error)
- func (s *S3Storage) WriteObject(ctx context.Context, filepath string, data io.Reader, size int64, persist bool) error
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 ObjStorage ¶
type ObjStorage interface { Stat(ctx context.Context, filepath string) (*ObjectInfo, error) ReadObject(ctx context.Context, 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(ctx context.Context, filepath string, data io.Reader, size int64, persist bool) error DeleteObject(ctx context.Context, filepath string) error List(ctx context.Context, prefix, startAfter string, recursive bool) <-chan ObjectInfo }
type ObjectInfo ¶ 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(ctx context.Context, p string) error
func (*PosixStorage) List ¶ added in v0.4.0
func (s *PosixStorage) List(ctx context.Context, prefix, startAfter string, recursive bool) <-chan ObjectInfo
func (*PosixStorage) ReadObject ¶ added in v0.4.0
func (s *PosixStorage) ReadObject(ctx context.Context, p string) (ReadSeekCloser, error)
func (*PosixStorage) Stat ¶ added in v0.4.0
func (s *PosixStorage) Stat(ctx context.Context, p string) (*ObjectInfo, error)
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) ReadObject ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.