Versions in this module Expand all Collapse all v0 v0.4.0 Feb 1, 2024 Changes in this version + type Effect string + const Allow + const Deny + func (effect Effect) IsAllowed(b bool) bool + func (effect Effect) IsValid() bool + type ID string + func (id ID) IsValid() bool + type Policy struct + ID ID + Statements []Statement + Version string + func CreateAnonReadOnlyBucketPolicy(bucketName string) *Policy + func CreateAnonReadOnlyObjectPolicy(bucketName, prefix string) *Policy + func CreateAnonWriteOnlyBucketPolicy(bucketName string) *Policy + func CreateAnonWriteOnlyObjectPolicy(bucketName, prefix string) *Policy + func CreateUserBucketPolicy(bucketName, accessKey string) *Policy + func CreateUserPolicy(accessKey string, actions []s3action.Action, bucketName string) *Policy + func ParseConfig(reader io.Reader, bucketName string) (*Policy, error) + func (p *Policy) Equals(policy Policy) bool + func (p *Policy) IsAllowed(args auth.Args) bool + func (p *Policy) IsEmpty() bool + func (p *Policy) Merge(input Policy) Policy + func (p *Policy) UnmarshalJSON(data []byte) error + func (p *Policy) Validate(bucketName string) error + type PolicyDocument struct + Statement []Statement + Version string + func (p *PolicyDocument) Merge(input PolicyDocument) PolicyDocument + func (p *PolicyDocument) String() string + type Principal struct + AWS set.StringSet + func NewPrincipal(principals ...string) Principal + func (p *Principal) UnmarshalJSON(data []byte) error + func (p *Principal) UnmarshalMsgpack(data []byte) error + func (p Principal) Clone() Principal + 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) MarshalMsgpack() ([]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) UnmarshalMsgpack(data []byte) error + func (r Resource) IsValid() bool + func (r Resource) MarshalJSON() ([]byte, error) + func (r Resource) MarshalMsgpack() ([]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) UnmarshalMsgpack(data []byte) error + func (resourceSet ResourceSet) Add(resource Resource) + func (resourceSet ResourceSet) BucketResourceExists() bool + func (resourceSet ResourceSet) Clone() ResourceSet + func (resourceSet ResourceSet) Contains(resource Resource) bool + func (resourceSet ResourceSet) Equals(sresourceSet ResourceSet) bool + func (resourceSet ResourceSet) IsEmpty() bool + func (resourceSet ResourceSet) MarshalJSON() ([]byte, error) + func (resourceSet ResourceSet) MarshalMsgpack() ([]byte, error) + func (resourceSet ResourceSet) Match(resource string, conditionValues map[string][]string) bool + func (resourceSet ResourceSet) ObjectResourceExists() bool + func (resourceSet ResourceSet) String() string + func (resourceSet ResourceSet) ToSlice() []Resource + func (resourceSet ResourceSet) Validate(bucketName string) error + type Statement struct + Actions s3action.ActionSet + Conditions condition.Conditions + Effect Effect + Principal Principal + Resources ResourceSet + SID ID + func NewStatement(sid ID, effect Effect, principal Principal, actionSet s3action.ActionSet, ...) Statement + func (statement Statement) Clone() Statement + func (statement Statement) Equals(st Statement) bool + func (statement Statement) IsAllowed(args auth.Args) bool + func (statement Statement) IsValid() error + func (statement Statement) Validate(bucketName string) error