acp_canned_acl.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package s3_constants
  2. import (
  3. "github.com/aws/aws-sdk-go/service/s3"
  4. )
  5. const (
  6. CannedAclPrivate = "private"
  7. CannedAclPublicRead = "public-read"
  8. CannedAclPublicReadWrite = "public-read-write"
  9. CannedAclAuthenticatedRead = "authenticated-read"
  10. CannedAclLogDeliveryWrite = "log-delivery-write"
  11. CannedAclBucketOwnerRead = "bucket-owner-read"
  12. CannedAclBucketOwnerFullControl = "bucket-owner-full-control"
  13. CannedAclAwsExecRead = "aws-exec-read"
  14. )
  15. var (
  16. PublicRead = []*s3.Grant{
  17. {
  18. Grantee: &s3.Grantee{
  19. Type: &GrantTypeGroup,
  20. URI: &GranteeGroupAllUsers,
  21. },
  22. Permission: &PermissionRead,
  23. },
  24. }
  25. PublicReadWrite = []*s3.Grant{
  26. {
  27. Grantee: &s3.Grantee{
  28. Type: &GrantTypeGroup,
  29. URI: &GranteeGroupAllUsers,
  30. },
  31. Permission: &PermissionRead,
  32. },
  33. {
  34. Grantee: &s3.Grantee{
  35. Type: &GrantTypeGroup,
  36. URI: &GranteeGroupAllUsers,
  37. },
  38. Permission: &PermissionWrite,
  39. },
  40. }
  41. AuthenticatedRead = []*s3.Grant{
  42. {
  43. Grantee: &s3.Grantee{
  44. Type: &GrantTypeGroup,
  45. URI: &GranteeGroupAuthenticatedUsers,
  46. },
  47. Permission: &PermissionRead,
  48. },
  49. }
  50. LogDeliveryWrite = []*s3.Grant{
  51. {
  52. Grantee: &s3.Grantee{
  53. Type: &GrantTypeGroup,
  54. URI: &GranteeGroupLogDelivery,
  55. },
  56. Permission: &PermissionWrite,
  57. },
  58. }
  59. )