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.

20 lines
535 B

  1. package s3_constants
  2. //Amazon S3 predefined groups
  3. var (
  4. GranteeGroupAllUsers = "http://acs.amazonaws.com/groups/global/AllUsers"
  5. GranteeGroupAuthenticatedUsers = "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"
  6. GranteeGroupLogDelivery = "http://acs.amazonaws.com/groups/s3/LogDelivery"
  7. )
  8. func ValidateGroup(group string) bool {
  9. valid := true
  10. switch group {
  11. case GranteeGroupAllUsers:
  12. case GranteeGroupLogDelivery:
  13. case GranteeGroupAuthenticatedUsers:
  14. default:
  15. valid = false
  16. }
  17. return valid
  18. }