Documentation
¶
Overview ¶
Package acl provides ACL types and XML helpers.
Package acl provides access control list types for bucket and object ACLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidCannedACL indicates an unknown canned ACL. ErrInvalidCannedACL = errors.New("acl: invalid canned ACL") // ErrMixedACL indicates both canned and grant-based ACLs were provided. ErrMixedACL = errors.New("acl: cannot mix canned ACL with grant-based ACL") )
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct {
XMLNS string `xml:"xmlns,attr,omitempty"`
XMLName xml.Name `xml:"AccessControlPolicy"`
Owner Owner `xml:"Owner,omitempty"`
Grants []Grant `xml:"AccessControlList>Grant,omitempty"`
Canned CannedACL
}
ACL represents an access control policy.
type CannedACL ¶
type CannedACL string
CannedACL is a predefined ACL.
const ( ACLPrivate CannedACL = "private" ACLPublicRead CannedACL = "public-read" ACLPublicReadWrite CannedACL = "public-read-write" ACLAuthenticatedRead CannedACL = "authenticated-read" ACLBucketOwnerRead CannedACL = "bucket-owner-read" ACLBucketOwnerFullControl CannedACL = "bucket-owner-full-control" )
type Grant ¶
type Grant struct {
Grantee Grantee `xml:"Grantee"`
Permission Permission `xml:"Permission"`
}
Grant defines a permission granted to a grantee.
type Grantee ¶
type Grantee struct {
XMLName xml.Name `xml:"Grantee"`
Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr,omitempty"`
ID string `xml:"ID,omitempty"`
DisplayName string `xml:"DisplayName,omitempty"`
EmailAddress string `xml:"EmailAddress,omitempty"`
URI string `xml:"URI,omitempty"`
}
Grantee identifies the entity being granted access.
type Owner ¶
type Owner struct {
ID string `xml:"ID,omitempty"`
DisplayName string `xml:"DisplayName,omitempty"`
}
Owner identifies the owner of the resource.
type Permission ¶
type Permission string
Permission represents the access level.
const ( PermissionFullControl Permission = "FULL_CONTROL" PermissionWrite Permission = "WRITE" PermissionWriteACP Permission = "WRITE_ACP" PermissionRead Permission = "READ" PermissionReadACP Permission = "READ_ACP" )
Click to show internal directories.
Click to hide internal directories.