feat(api): doc folders curd implemention
This commit is contained in:
@@ -83,3 +83,20 @@ func (m *StorageMinio) DeleteObject(ctx context.Context, objectName string) (err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MoveObject implements ObjectStorage
|
||||
func (m *StorageMinio) DeleteObjects(ctx context.Context, objectNames []string) []minio.RemoveObjectError {
|
||||
objs := make(chan minio.ObjectInfo, len(objectNames))
|
||||
for _, objectName := range objectNames {
|
||||
objs <- minio.ObjectInfo{Key: objectName}
|
||||
}
|
||||
errCh := m.client.RemoveObjects(ctx, m.bucket, objs, minio.RemoveObjectsOptions{})
|
||||
|
||||
var errors []minio.RemoveObjectError
|
||||
for err := range errCh {
|
||||
if err.Err != nil {
|
||||
errors = append(errors, err)
|
||||
}
|
||||
}
|
||||
return errors
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user