Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct { Id string `json:"id"` Actions []ActionType `json:"actions"` Grantees []Grantee `json:"grantees"` }
ACL defines a ACL object used in the bucket
func (*ACL) Evaluate ¶
func (acl *ACL) Evaluate(r Request) DecisionType
ACL evaluation algorithm: - Check if the request matches the ACL scope and permission - Deny by default Evaluate checks the request r against the current ACL
type ActionType ¶
type ActionType string
ActionType define action values in ACLs
const ( Read ActionType = "Read" Write ActionType = "Write" )
type DecisionType ¶
type DecisionType string
DecisionType define decision values of ACLs
const ( DecisionPermit DecisionType = "Permit" DecisionDeny DecisionType = "Deny" )
type Grantee ¶
type Grantee struct { Type GranteeType `json:"type"` Value string `json:"value"` }
type GranteeType ¶
type GranteeType string
const ( UserType GranteeType = "User" GroupType GranteeType = "Group" )
type PoliciesType ¶
func NewPolicies ¶
func NewPolicies(data []byte) (policies PoliciesType, err error)
func (PoliciesType) String ¶
func (policies PoliciesType) String() (string, error)
type Request ¶
type Request struct { Username string `json:"username"` // user identifier, i.e. KPN ruisnaam Groups []string `json:"groups"` // available groups that the user belongs to Action ActionType `json:"action"` // action to the bucket Target string `json:"target"` // name of bucket Customer string `json:"customer"` // customer that owns the bucket }
Request represents an authorization request
Click to show internal directories.
Click to hide internal directories.