mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
19 lines
545 B
Go
19 lines
545 B
Go
|
package s3_constants
|
||
|
|
||
|
var (
|
||
|
OwnershipBucketOwnerPreferred = "BucketOwnerPreferred"
|
||
|
OwnershipObjectWriter = "ObjectWriter"
|
||
|
OwnershipBucketOwnerEnforced = "BucketOwnerEnforced"
|
||
|
|
||
|
DefaultOwnershipForCreate = OwnershipObjectWriter
|
||
|
DefaultOwnershipForExists = OwnershipBucketOwnerEnforced
|
||
|
)
|
||
|
|
||
|
func ValidateOwnership(ownership string) bool {
|
||
|
if ownership == "" || (ownership != OwnershipBucketOwnerPreferred && ownership != OwnershipObjectWriter && ownership != OwnershipBucketOwnerEnforced) {
|
||
|
return false
|
||
|
} else {
|
||
|
return true
|
||
|
}
|
||
|
}
|