Documentation ¶
Index ¶
- Variables
- func HandleError(err error) common.ObjectStorageError
- func NewMinioStorage(config *common.Config) (common.Storage, common.ObjectStorageError)
- type AccessDeniedErrorProcessor
- type DefaultErrorProcessor
- type MinioStorage
- func (m *MinioStorage) BucketExists(bucketName string) (bool, common.ObjectStorageError)
- func (m *MinioStorage) CopyObject(srcObjectKey, destObjectKey string, options *common.CopyOptions) common.ObjectStorageError
- func (m *MinioStorage) CreateBucket(bucketName string) common.ObjectStorageError
- func (m *MinioStorage) DeleteObject(objectKey string) common.ObjectStorageError
- func (m *MinioStorage) EnsureBucket(bucketName string) common.ObjectStorageError
- func (m *MinioStorage) FGetObject(objectKey, localFilePath string) common.ObjectStorageError
- func (m *MinioStorage) FPutObject(localFilePath, objectKey string) common.ObjectStorageError
- func (m *MinioStorage) GetObject(objectKey string) (common.IObjectData, common.ObjectStorageError)
- func (m *MinioStorage) ListObjects(opt common.ListOptions) ([]common.ObjectInfo, common.ObjectStorageError)
- func (m *MinioStorage) MoveObject(srcObjectKey, destObjectKey string, options *common.MoveOptions) common.ObjectStorageError
- func (m *MinioStorage) ObjectExist(objectKey string) (bool, common.ObjectStorageError)
- func (m *MinioStorage) PutObject(objectKey string, reader io.Reader) common.ObjectStorageError
- type NoSuchHostErrorProcessor
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorCodeMap = map[string]string{ "NoSuchKey": common.ErrCodeNoSuchKey, "NoSuchBucket": common.ErrCodeNoSuchBucket, "RequestTimeout": common.ErrCodeRequestTimeout, "BucketNotFound": common.ErrCodeNoSuchBucket, "502 Bad Gateway": common.ErrCodeBadGateway, "InvalidAccessKeyId": common.ErrCodeInvalidAccessKeyID, "SignatureDoesNotMatch": common.ErrCodeInvalidAccessKeySecret, "BucketAlreadyOwnedByYou": common.ErrCodeBucketAlreadyExists, "XMinioInvalidObjectName": common.ErrCodeInvalidObjectName, }
Functions ¶
func HandleError ¶
func HandleError(err error) common.ObjectStorageError
func NewMinioStorage ¶
Types ¶
type AccessDeniedErrorProcessor ¶
type AccessDeniedErrorProcessor struct {
*common.BaseErrorProcessor
}
func NewAccessDeniedErrorProcessor ¶
func NewAccessDeniedErrorProcessor() *AccessDeniedErrorProcessor
func (*AccessDeniedErrorProcessor) Match ¶
func (p *AccessDeniedErrorProcessor) Match(err error) bool
func (*AccessDeniedErrorProcessor) Process ¶
func (p *AccessDeniedErrorProcessor) Process(err error) common.ObjectStorageError
type DefaultErrorProcessor ¶
type DefaultErrorProcessor struct {
*common.BaseErrorProcessor
}
func NewDefaultErrorProcessor ¶
func NewDefaultErrorProcessor() *DefaultErrorProcessor
func (*DefaultErrorProcessor) Match ¶
func (p *DefaultErrorProcessor) Match(e error) bool
func (*DefaultErrorProcessor) Process ¶
func (p *DefaultErrorProcessor) Process(e error) common.ObjectStorageError
type MinioStorage ¶
type MinioStorage struct {
// contains filtered or unexported fields
}
func (*MinioStorage) BucketExists ¶
func (m *MinioStorage) BucketExists(bucketName string) (bool, common.ObjectStorageError)
func (*MinioStorage) CopyObject ¶
func (m *MinioStorage) CopyObject(srcObjectKey, destObjectKey string, options *common.CopyOptions) common.ObjectStorageError
func (*MinioStorage) CreateBucket ¶
func (m *MinioStorage) CreateBucket(bucketName string) common.ObjectStorageError
func (*MinioStorage) DeleteObject ¶
func (m *MinioStorage) DeleteObject(objectKey string) common.ObjectStorageError
func (*MinioStorage) EnsureBucket ¶
func (m *MinioStorage) EnsureBucket(bucketName string) common.ObjectStorageError
func (*MinioStorage) FGetObject ¶
func (m *MinioStorage) FGetObject(objectKey, localFilePath string) common.ObjectStorageError
func (*MinioStorage) FPutObject ¶
func (m *MinioStorage) FPutObject(localFilePath, objectKey string) common.ObjectStorageError
func (*MinioStorage) GetObject ¶
func (m *MinioStorage) GetObject(objectKey string) (common.IObjectData, common.ObjectStorageError)
func (*MinioStorage) ListObjects ¶
func (m *MinioStorage) ListObjects(opt common.ListOptions) ([]common.ObjectInfo, common.ObjectStorageError)
func (*MinioStorage) MoveObject ¶
func (m *MinioStorage) MoveObject(srcObjectKey, destObjectKey string, options *common.MoveOptions) common.ObjectStorageError
func (*MinioStorage) ObjectExist ¶
func (m *MinioStorage) ObjectExist(objectKey string) (bool, common.ObjectStorageError)
func (*MinioStorage) PutObject ¶
func (m *MinioStorage) PutObject(objectKey string, reader io.Reader) common.ObjectStorageError
type NoSuchHostErrorProcessor ¶
type NoSuchHostErrorProcessor struct {
*common.BaseErrorProcessor
}
func NewNoSuchHostErrorProcessor ¶
func NewNoSuchHostErrorProcessor() *NoSuchHostErrorProcessor
func (*NoSuchHostErrorProcessor) Match ¶
func (p *NoSuchHostErrorProcessor) Match(err error) bool
func (*NoSuchHostErrorProcessor) Process ¶
func (p *NoSuchHostErrorProcessor) Process(err error) common.ObjectStorageError
Click to show internal directories.
Click to hide internal directories.