Versions in this module Expand all Collapse all v1 v1.0.2 Mar 17, 2021 Changes in this version + const AbortMultipartUploadAction + const BypassGovernanceRetentionAction + const CreateBucketAction + const DefaultVersion + const DeleteBucketAction + const DeleteBucketPolicyAction + const DeleteObjectAction + const DeleteObjectTaggingAction + const DeleteObjectVersionAction + const DeleteObjectVersionTaggingAction + const ForceDeleteBucketAction + const GetBucketEncryptionAction + const GetBucketLifecycleAction + const GetBucketLocationAction + const GetBucketNotificationAction + const GetBucketObjectLockConfigurationAction + const GetBucketPolicyAction + const GetBucketPolicyStatusAction + const GetBucketTaggingAction + const GetBucketVersioningAction + const GetObjectAction + const GetObjectLegalHoldAction + const GetObjectRetentionAction + const GetObjectTaggingAction + const GetObjectVersionAction + const GetObjectVersionForReplicationAction + const GetObjectVersionTaggingAction + const GetReplicationConfigurationAction + const HeadBucketAction + const ListAllMyBucketsAction + const ListBucketAction + const ListBucketMultipartUploadsAction + const ListBucketVersionsAction + const ListMultipartUploadPartsAction + const ListenBucketNotificationAction + const ListenNotificationAction + const PutBucketEncryptionAction + const PutBucketLifecycleAction + const PutBucketNotificationAction + const PutBucketObjectLockConfigurationAction + const PutBucketPolicyAction + const PutBucketTaggingAction + const PutBucketVersioningAction + const PutObjectAction + const PutObjectLegalHoldAction + const PutObjectRetentionAction + const PutObjectTaggingAction + const PutObjectVersionTaggingAction + const PutReplicationConfigurationAction + const ReplicateDeleteAction + const ReplicateObjectAction + const ReplicateTagsAction + const ResourceARNPrefix + const RestoreObjectAction + func Errorf(format string, a ...interface{}) error + type Action string + func (action *Action) UnmarshalJSON(data []byte) error + func (action Action) IsValid() bool + func (action Action) MarshalJSON() ([]byte, error) + type ActionSet map[Action]struct + func NewActionSet(actions ...Action) ActionSet + func (actionSet *ActionSet) UnmarshalJSON(data []byte) error + func (actionSet ActionSet) Add(action Action) + func (actionSet ActionSet) Contains(action Action) bool + func (actionSet ActionSet) Equals(sactionSet ActionSet) bool + func (actionSet ActionSet) Intersection(sset ActionSet) ActionSet + func (actionSet ActionSet) MarshalJSON() ([]byte, error) + func (actionSet ActionSet) String() string + func (actionSet ActionSet) ToSlice() []Action + type Args struct + AccountName string + Action Action + BucketName string + ConditionValues map[string][]string + IsOwner bool + ObjectName string + type Effect string + const Allow + const Deny + func (effect Effect) IsAllowed(b bool) bool + func (effect Effect) IsValid() bool + type Error struct + func (e Error) Error() string + func (e Error) Unwrap() error + type ID string + func (id ID) IsValid() bool + type Policy struct + ID ID + Statements []Statement + Version string + func ParseConfig(reader io.Reader, bucketName string) (*Policy, error) + func (policy *Policy) UnmarshalJSON(data []byte) error + func (policy Policy) IsAllowed(args Args) bool + func (policy Policy) IsEmpty() bool + func (policy Policy) MarshalJSON() ([]byte, error) + func (policy Policy) Validate(bucketName string) error + type Principal struct + AWS set.StringSet + func NewPrincipal(principals ...string) Principal + func (p *Principal) UnmarshalJSON(data []byte) error + func (p Principal) Equals(pp Principal) bool + func (p Principal) Intersection(principal Principal) set.StringSet + func (p Principal) IsValid() bool + func (p Principal) MarshalJSON() ([]byte, error) + func (p Principal) Match(principal string) bool + type Resource struct + BucketName string + Pattern string + func NewResource(bucketName, keyName string) Resource + func (r *Resource) UnmarshalJSON(data []byte) error + func (r Resource) IsValid() bool + func (r Resource) MarshalJSON() ([]byte, error) + func (r Resource) Match(resource string, conditionValues map[string][]string) bool + func (r Resource) String() string + func (r Resource) Validate(bucketName string) error + type ResourceSet map[Resource]struct + func NewResourceSet(resources ...Resource) ResourceSet + func (resourceSet *ResourceSet) UnmarshalJSON(data []byte) error + func (resourceSet ResourceSet) Add(resource Resource) + func (resourceSet ResourceSet) Equals(sresourceSet ResourceSet) bool + func (resourceSet ResourceSet) Intersection(sset ResourceSet) ResourceSet + func (resourceSet ResourceSet) MarshalJSON() ([]byte, error) + func (resourceSet ResourceSet) Match(resource string, conditionValues map[string][]string) bool + func (resourceSet ResourceSet) String() string + func (resourceSet ResourceSet) Validate(bucketName string) error + type Statement struct + Actions ActionSet + Conditions condition.Functions + Effect Effect + Principal Principal + Resources ResourceSet + SID ID + func NewStatement(effect Effect, principal Principal, actionSet ActionSet, ...) Statement + func (statement *Statement) UnmarshalJSON(data []byte) error + func (statement Statement) IsAllowed(args Args) bool + func (statement Statement) MarshalJSON() ([]byte, error) + func (statement Statement) Validate(bucketName string) error