Harshavardhana
0479d4976b
objectAPI: Fix object API interface, remove unnecessary structs.
...
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
9 years ago
Harshavardhana
efc80343e3
fs: Break fs package to top-level and introduce ObjectAPI interface.
...
ObjectAPI interface brings in changes needed for XL ObjectAPI layer.
The new interface for any ObjectAPI layer is as below
```
// ObjectAPI interface.
type ObjectAPI interface {
// Bucket resource API.
DeleteBucket(bucket string) *probe.Error
ListBuckets() ([]BucketInfo, *probe.Error)
MakeBucket(bucket string) *probe.Error
GetBucketInfo(bucket string) (BucketInfo, *probe.Error)
// Bucket query API.
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsResult, *probe.Error)
ListMultipartUploads(bucket string, resources BucketMultipartResourcesMetadata) (BucketMultipartResourcesMetadata, *probe.Error)
// Object resource API.
GetObject(bucket, object string, startOffset int64) (io.ReadCloser, *probe.Error)
GetObjectInfo(bucket, object string) (ObjectInfo, *probe.Error)
PutObject(bucket string, object string, size int64, data io.Reader, metadata map[string]string) (ObjectInfo, *probe.Error)
DeleteObject(bucket, object string) *probe.Error
// Object query API.
NewMultipartUpload(bucket, object string) (string, *probe.Error)
PutObjectPart(bucket, object, uploadID string, partID int, size int64, data io.Reader, md5Hex string) (string, *probe.Error)
ListObjectParts(bucket, object string, resources ObjectResourcesMetadata) (ObjectResourcesMetadata, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []CompletePart) (ObjectInfo, *probe.Error)
AbortMultipartUpload(bucket, object, uploadID string) *probe.Error
}
```
9 years ago
Harshavardhana
52751d81cb
cleanup: Rename ObjectMetadata as ObjectInfo.
...
Fixes #1215
9 years ago
Harshavardhana
d5057b3c51
accessPolicy: Implement Put, Get, Delete access policy.
...
This patch implements Get,Put,Delete bucket policies
Supporting - http://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html
Currently supports following actions.
"*": true,
"s3:*": true,
"s3:GetObject": true,
"s3:ListBucket": true,
"s3:PutObject": true,
"s3:CreateBucket": true,
"s3:GetBucketLocation": true,
"s3:DeleteBucket": true,
"s3:DeleteObject": true,
"s3:AbortMultipartUpload": true,
"s3:ListBucketMultipartUploads": true,
"s3:ListMultipartUploadParts": true,
following conditions for "StringEquals" and "StringNotEquals"
"s3:prefix", "s3:max-keys"
9 years ago
Brendan Ashworth
a5d0bef4e2
pkg/fs: test, bench, and drop unnecessary check in ListBuckets
...
There is now a simple test and a benchmark for ListBuckets. I also
dropped an unnecessary check that was simply repeated from above,
guaranteed to be true.
9 years ago
Brendan Ashworth
7399d8ceaa
pkg/fs: skip unnecessary os.Stat system call
9 years ago
Brendan Ashworth
0a0451a0fb
pkg/fs: DRY SetBucketMetadata
...
It had a lot of code that was the same as GetBucketMetadata, so instead
call GBM from SBM so as to reduce doing the same thing in two different
spots. Theoretically this will induce a small overhead as now at least
two calls of denormalizeBucket are made, although this shouldn't be
noticeable.
9 years ago
Brendan Ashworth
294ea814bf
pkg/fs: for locks, prefer defer and read-only ops
...
This commit prefers the use of 'defer' for fs.Unlock (and fs.RUnlock)
because it is more idiomatic Go and reduces repetition in the code,
lending to a cleaner code base.
It also switches a few uses of the lock to read-only locks, which should
improve performance of those functions dramatically in certain contexts.
9 years ago
Harshavardhana
800b19d8e5
cleanup: Remove definitions and move them to its relative places accordingly
...
- Move fs-definitions.go and break them into fs-datatypes.go, fs-bucket-acl.go
and fs-utils.go
- Move api-definitions.go to api-response.go, where they should be.
- Move web-definitions to its related handlers.
9 years ago
Harshavardhana
5a9333a67b
signature: Rewrite signature handling and move it into a library.
9 years ago
Harshavardhana
62f6ffb6db
xl: Moved to minio/minio - fixes #1112
9 years ago
Harshavardhana
f4c8120cf9
server: Remove max-buckets option and now max buckets is unlimited.
...
minio server max-buckets option removed. min-free-disk option is
now a flag.
9 years ago
Harshavardhana
4e6e78598f
multipart: Increase locked critical for CompleteMultipart.
9 years ago
Harshavardhana
8bf1045645
setBucketMetadata: Fix a deadlock.
9 years ago
Harshavardhana
a4c005ce30
multipart: Code cleanup
...
- More locking cleanup. Fix naming convention.
- Simplify concatenation and blocking calls.
9 years ago
Harshavardhana
8557cbc9b7
fs: Add granular locking.
9 years ago
Harshavardhana
2ec9b16667
deleteBucket: Directory not empty error on windows is "directory is not empty"
9 years ago
Harshavardhana
497f13d733
api: Various fixes.
...
- limit list buckets to limit only 100 buckets, all uppercase buckets
are now lowercase and work transparently with all calls.
- Change disk.Stat to disk.GetInfo and return back disk.Info{} struct.
- Introduce new ioutils package which implements ReadDirN(path, n),
ReadDirNamesN(path, n)
9 years ago
Harshavardhana
4fc161ddb1
bucketName: relax bucket names, now allow numbers as starting characters.
9 years ago
Harshavardhana
836f5204af
minio: Add config-folder option.
...
Fixes #997
9 years ago
Harshavardhana
ab15f56a61
fs/bucket: Move bucket metadata into buckets.json
9 years ago
Harshavardhana
baf66988e9
Simplify bucket delete - remove only bucket directory, no need to recursively traverse
9 years ago
Harshavardhana
dbaa4d8643
Move ListObjects into its own file
9 years ago
Harshavardhana
1f66f4869b
Fix all remaining windows path issues.
9 years ago
Harshavardhana
afa27b9847
On windows translate Prefix, Marker and Delimiter for paths
9 years ago
Harshavardhana
dddb1650de
Add 5% cumulative reduction in total size of the disk
...
This is done due to filesystem holding additional metadata and inode space
which is unaccounted for during min-free-disk calculation.
9 years ago
Harshavardhana
c065be656c
Implement min-free-disk as a subcommand, deprecate flag
9 years ago
Harshavardhana
5b2fa33bdb
Implementing min-free-disk
9 years ago
Harshavardhana
1256ca86d0
Add fs separator
9 years ago
Harshavardhana
d534fc5a4f
Implement delete bucket properly with proper error handlings
9 years ago
Harshavardhana
c9af01d807
Enhance listing further, this time handle cases related to common prefixes
9 years ago
Harshavardhana
762b798767
Migrate this project to minio micro services code
9 years ago