Versions in this module Expand all Collapse all v0 v0.0.5 Aug 2, 2019 v0.0.4 Jul 27, 2019 v0.0.3 Jul 27, 2019 v0.0.2 Jul 26, 2019 v0.0.1 Jul 26, 2019 Changes in this version + const AbortMultipartUploadAction + const CreateBucketAction + const DefaultVersion + const DeleteBucketAction + const DeleteBucketPolicyAction + const DeleteObjectAction + const GetBucketLocationAction + const GetBucketNotificationAction + const GetBucketPolicyAction + const GetObjectAction + const HeadBucketAction + const ListAllMyBucketsAction + const ListBucketAction + const ListBucketMultipartUploadsAction + const ListMultipartUploadPartsAction + const ListenBucketNotificationAction + const PutBucketNotificationAction + const PutBucketPolicyAction + const PutObjectAction + const ResourceARNPrefix + 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) 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) UnmarshalJSON(data []byte) error + func (effect Effect) IsAllowed(b bool) bool + func (effect Effect) IsValid() bool + func (effect Effect) MarshalJSON() ([]byte, error) + type ID string + func (id *ID) UnmarshalJSON(data []byte) error + func (id ID) IsValid() bool + func (id ID) MarshalJSON() ([]byte, error) + 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) 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) 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