Documentation ¶
Index ¶
- Variables
- func WrapedPipe(logger logging.FieldLogger) (io.ReadCloser, io.WriteCloser)
- type FileSimpleStorage
- func (fss *FileSimpleStorage) GetObject(x *Object) (y *Object, err error)
- func (fss *FileSimpleStorage) GetObjectContent(obj *Object) (chan []byte, error)
- func (fss *FileSimpleStorage) GetObjectContentSync(obj *Object) ([]byte, error)
- func (fss *FileSimpleStorage) ListObjects(obj *Object, opt *ListObjectsOption) ([]*Object, error)
- func (fss *FileSimpleStorage) PutObject(obj *Object, reader io.Reader) error
- func (fss *FileSimpleStorage) PutObjectAsync(obj *Object, opt *PutObjectAsyncOption) (file_helper.FileSyncer, error)
- func (fss *FileSimpleStorage) RemoveObject(obj *Object) error
- func (fss *FileSimpleStorage) RenameObject(src, dst *Object) error
- type FileSimpleStorageOption
- type ListObjectsOption
- type MinioSimpleStorage
- func (mss *MinioSimpleStorage) GetLogger() logging.FieldLogger
- func (mss *MinioSimpleStorage) GetLoggerWithObject(obj *Object) logging.FieldLogger
- func (mss *MinioSimpleStorage) GetObject(x *Object) (y *Object, err error)
- func (mss *MinioSimpleStorage) GetObjectContent(obj *Object) (chan []byte, error)
- func (mss *MinioSimpleStorage) GetObjectContentSync(obj *Object) ([]byte, error)
- func (mss *MinioSimpleStorage) ListObjects(x *Object, opt *ListObjectsOption) (ys []*Object, err error)
- func (mss *MinioSimpleStorage) PutObject(obj *Object, rd io.Reader) error
- func (mss *MinioSimpleStorage) PutObjectAsync(obj *Object, opt *PutObjectAsyncOption) (file_helper.FileSyncer, error)
- func (mss *MinioSimpleStorage) RemoveObject(obj *Object) error
- func (mss *MinioSimpleStorage) RenameObject(src, dst *Object) error
- type MinioSimpleStorageOption
- type Object
- type PutObjectAsyncOption
- type Reader
- type SimpleStorage
- type SimpleStorageFactory
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSimpleStorageDriver = errors.New("invalid simple storage driver") ErrObjectNotFound = errors.New("object not found") )
Functions ¶
func WrapedPipe ¶
func WrapedPipe(logger logging.FieldLogger) (io.ReadCloser, io.WriteCloser)
Types ¶
type FileSimpleStorage ¶
type FileSimpleStorage struct {
// contains filtered or unexported fields
}
func (*FileSimpleStorage) GetObject ¶
func (fss *FileSimpleStorage) GetObject(x *Object) (y *Object, err error)
func (*FileSimpleStorage) GetObjectContent ¶
func (fss *FileSimpleStorage) GetObjectContent(obj *Object) (chan []byte, error)
func (*FileSimpleStorage) GetObjectContentSync ¶ added in v1.2.0
func (fss *FileSimpleStorage) GetObjectContentSync(obj *Object) ([]byte, error)
func (*FileSimpleStorage) ListObjects ¶
func (fss *FileSimpleStorage) ListObjects(obj *Object, opt *ListObjectsOption) ([]*Object, error)
func (*FileSimpleStorage) PutObject ¶
func (fss *FileSimpleStorage) PutObject(obj *Object, reader io.Reader) error
func (*FileSimpleStorage) PutObjectAsync ¶ added in v1.1.16
func (fss *FileSimpleStorage) PutObjectAsync(obj *Object, opt *PutObjectAsyncOption) (file_helper.FileSyncer, error)
func (*FileSimpleStorage) RemoveObject ¶
func (fss *FileSimpleStorage) RemoveObject(obj *Object) error
func (*FileSimpleStorage) RenameObject ¶
func (fss *FileSimpleStorage) RenameObject(src, dst *Object) error
type FileSimpleStorageOption ¶
func NewFileSimpleStorageOption ¶
func NewFileSimpleStorageOption() *FileSimpleStorageOption
type ListObjectsOption ¶ added in v1.1.16
type MinioSimpleStorage ¶
type MinioSimpleStorage struct {
// contains filtered or unexported fields
}
func (*MinioSimpleStorage) GetLogger ¶
func (mss *MinioSimpleStorage) GetLogger() logging.FieldLogger
func (*MinioSimpleStorage) GetLoggerWithObject ¶
func (mss *MinioSimpleStorage) GetLoggerWithObject(obj *Object) logging.FieldLogger
func (*MinioSimpleStorage) GetObject ¶
func (mss *MinioSimpleStorage) GetObject(x *Object) (y *Object, err error)
func (*MinioSimpleStorage) GetObjectContent ¶
func (mss *MinioSimpleStorage) GetObjectContent(obj *Object) (chan []byte, error)
func (*MinioSimpleStorage) GetObjectContentSync ¶
func (mss *MinioSimpleStorage) GetObjectContentSync(obj *Object) ([]byte, error)
func (*MinioSimpleStorage) ListObjects ¶
func (mss *MinioSimpleStorage) ListObjects(x *Object, opt *ListObjectsOption) (ys []*Object, err error)
func (*MinioSimpleStorage) PutObject ¶
func (mss *MinioSimpleStorage) PutObject(obj *Object, rd io.Reader) error
func (*MinioSimpleStorage) PutObjectAsync ¶
func (mss *MinioSimpleStorage) PutObjectAsync(obj *Object, opt *PutObjectAsyncOption) (file_helper.FileSyncer, error)
func (*MinioSimpleStorage) RemoveObject ¶
func (mss *MinioSimpleStorage) RemoveObject(obj *Object) error
func (*MinioSimpleStorage) RenameObject ¶
func (mss *MinioSimpleStorage) RenameObject(src, dst *Object) error
type MinioSimpleStorageOption ¶
type MinioSimpleStorageOption struct { MinioEndpoint string MinioID string MinioSecret string MinioToken string MinioSecure bool MinioBucket string ReadBufferSize int }
func NewMinioSimpleStorageOption ¶
func NewMinioSimpleStorageOption() *MinioSimpleStorageOption
type Object ¶
type PutObjectAsyncOption ¶ added in v1.1.16
type Reader ¶
type Reader struct { *io.PipeReader // contains filtered or unexported fields }
type SimpleStorage ¶
type SimpleStorage interface { PutObject(obj *Object, reader io.Reader) error PutObjectAsync(obj *Object, opt *PutObjectAsyncOption) (file_helper.FileSyncer, error) RemoveObject(obj *Object) error RenameObject(src, dst *Object) error GetObject(obj *Object) (*Object, error) GetObjectContent(obj *Object) (chan []byte, error) GetObjectContentSync(obj *Object) ([]byte, error) ListObjects(obj *Object, opt *ListObjectsOption) ([]*Object, error) }
func NewSimpleStorage ¶
func NewSimpleStorage(name string, args ...interface{}) (SimpleStorage, error)
type SimpleStorageFactory ¶
type SimpleStorageFactory func(...interface{}) (SimpleStorage, error)
Click to show internal directories.
Click to hide internal directories.