Versions in this module Expand all Collapse all v0 v0.10.0 May 7, 2021 Changes in this version + const EffectAllow + const EffectDeny + var DefaultAccessControlPolicyFilename = "access_control_policy.yaml" + var ErrAccessDenied = fmt.Errorf("access denied") + func ResourceStrFromRef(ref dsref.Ref) string + type Action []string + func MustParseAction(str string) Action + func ParseAction(str string) (Action, error) + func (a *Action) UnmarshalJSON(data []byte) error + func (a Action) Contains(b Action) bool + func (a Action) MarshalJSON() ([]byte, error) + type Actions []Action + func (as Actions) Contains(b Action) bool + type Effect string + type Policy []Rule + func (pol Policy) Enforce(subject *profile.Profile, resource, action string) error + type Resource []string + func MustParseResource(str string) Resource + func ParseResource(str string) (Resource, error) + func (r *Resource) UnmarshalJSON(data []byte) error + func (r Resource) Contains(b Resource, subjectUsername string) bool + func (r Resource) MarshalJSON() ([]byte, error) + type Resources []Resource + func (rs Resources) Contains(b Resource, subjectUsername string) bool + type Rule struct + Actions Actions + Effect Effect + Resources Resources + Subject string + Title string + func (r *Rule) UnmarshalJSON(d []byte) error + func (r *Rule) Validate() error