Documentation ¶
Index ¶
Constants ¶
const ( BucketPolicyNone BucketPolicy = "none" BucketPolicyReadOnly = "readonly" BucketPolicyReadWrite = "readwrite" BucketPolicyWriteOnly = "writeonly" )
Different types of Policies currently supported for buckets.
Variables ¶
This section is empty.
Functions ¶
func GetPolicies ¶
func GetPolicies(statements []Statement, bucketName string) map[string]BucketPolicy
GetPolicies - returns a map of policies rules of given bucket name, prefix in given statements.
Types ¶
type BucketAccessPolicy ¶
type BucketAccessPolicy struct { Version string // date in YYYY-MM-DD format Statements []Statement `json:"Statement"` }
BucketAccessPolicy - minio policy collection
type BucketPolicy ¶
type BucketPolicy string
BucketPolicy - Bucket level policy.
func GetPolicy ¶
func GetPolicy(statements []Statement, bucketName string, prefix string) BucketPolicy
GetPolicy - Returns policy of given bucket name, prefix in given statements.
func (BucketPolicy) IsValidBucketPolicy ¶
func (p BucketPolicy) IsValidBucketPolicy() bool
IsValidBucketPolicy - returns true if policy is valid and supported, false otherwise.
type ConditionKeyMap ¶
ConditionKeyMap - map of policy condition key and value.
func CopyConditionKeyMap ¶
func CopyConditionKeyMap(condKeyMap ConditionKeyMap) ConditionKeyMap
CopyConditionKeyMap - returns new copy of given ConditionKeyMap.
func (ConditionKeyMap) Add ¶
func (ckm ConditionKeyMap) Add(key string, value set.StringSet)
Add - adds key and value. The value is appended If key already exists.
func (ConditionKeyMap) Remove ¶
func (ckm ConditionKeyMap) Remove(key string, value set.StringSet)
Remove - removes value of given key. If key has empty after removal, the key is also removed.
func (ConditionKeyMap) RemoveKey ¶
func (ckm ConditionKeyMap) RemoveKey(key string)
RemoveKey - removes key and its value.
type ConditionMap ¶
type ConditionMap map[string]ConditionKeyMap
ConditionMap - map of condition and conditional values.
func (ConditionMap) Add ¶
func (cond ConditionMap) Add(condKey string, condKeyMap ConditionKeyMap)
Add - adds condition key and condition value. The value is appended if key already exists.
func (ConditionMap) Remove ¶
func (cond ConditionMap) Remove(condKey string)
Remove - removes condition key and its value.