You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
545 B
18 lines
545 B
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
|
|
}
|
|
}
|