Versions in this module Expand all Collapse all v1 v1.0.0 Jan 25, 2023 Changes in this version + const AbortMultipartUploadAction + const AllActions + 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 + var ReadOnly = Policy + var ReadWrite = Policy + var WriteOnly = Policy + type Action string + func (action *Action) UnmarshalJSON(data []byte) error + func (action Action) IsValid() bool + func (action Action) MarshalJSON() ([]byte, error) + func (action Action) Match(a Action) bool + 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) Intersection(sset ActionSet) ActionSet + func (actionSet ActionSet) MarshalJSON() ([]byte, error) + func (actionSet ActionSet) Match(action Action) bool + func (actionSet ActionSet) String() string + func (actionSet ActionSet) ToSlice() []Action + type Args struct + AccountName string + Action Action + BucketName string + Claims map[string]interface{} + ConditionValues map[string][]string + IsOwner bool + ObjectName string + type Opa struct + func NewOpa(args OpaArgs) *Opa + func (o *Opa) IsAllowed(args Args) bool + type OpaArgs struct + AuthToken string + CloseRespFn func(r io.ReadCloser) + Transport http.RoundTripper + URL *xnet.URL + func (a *OpaArgs) UnmarshalJSON(data []byte) error + func (a *OpaArgs) Validate() error + type Policy struct + ID policy.ID + Statements []Statement + Version string + func ParseConfig(reader io.Reader) (*Policy, error) + func (iamp *Policy) UnmarshalJSON(data []byte) error + func (iamp Policy) IsAllowed(args Args) bool + func (iamp Policy) IsEmpty() bool + func (iamp Policy) MarshalJSON() ([]byte, error) + func (iamp Policy) Validate() error + 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() 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() error + type Statement struct + Actions ActionSet + Conditions condition.Functions + Effect policy.Effect + Resources ResourceSet + SID policy.ID + func NewStatement(effect policy.Effect, actionSet ActionSet, resourceSet ResourceSet, ...) 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() error Incompatible versions in this module v3.0.0+incompatible Nov 17, 2023 v2.0.0+incompatible May 16, 2023