Documentation
¶
Index ¶
- Variables
- type Adapter
- func (sa *Adapter) AddPolicy(_ string, _ string, _ []string) error
- func (sa *Adapter) LoadPolicy(model model.Model) error
- func (sa *Adapter) RemoveFilteredPolicy(_ string, _ string, _ int, _ ...string) error
- func (sa *Adapter) RemovePolicy(_ string, _ string, _ []string) error
- func (sa *Adapter) SavePolicy(_ model.Model) error
- func (sa *Adapter) SetPolicies(policies map[string]interface{})
- type OptFunc
- type PolicyRule
- type State
- func (s *State) FilterAuthorizedPairs(_ context.Context, subjects engine.Subjects, pairs engine.Pairs) (engine.Pairs, error)
- func (s *State) FilterAuthorizedProjects(_ context.Context, subjects engine.Subjects) (engine.Projects, error)
- func (s *State) IsAuthorized(_ context.Context, subject engine.Subject, action engine.Action, ...) (bool, error)
- func (s *State) ProjectsAuthorized(_ context.Context, subjects engine.Subjects, action engine.Action, ...) (engine.Projects, error)
- func (s *State) SetPolicies(_ context.Context, policyMap engine.PolicyMap, _ engine.RoleMap) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAbacModel string
View Source
var DefaultAclModel string
View Source
var DefaultRbacModel string
View Source
var DefaultRbacWithDomainModel string
View Source
var DefaultRestfullModel string
View Source
var DefaultRestfullWithRoleModel string
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) RemoveFilteredPolicy ¶
func (*Adapter) RemovePolicy ¶
func (*Adapter) SetPolicies ¶
type OptFunc ¶
type OptFunc func(*State)
func WithFileModel ¶
func WithPolicyAdapter ¶
func WithStringModel ¶
type PolicyRule ¶
type PolicyRule struct { PType string `json:"p_type,omitempty"` V0 string `json:"v0,omitempty"` V1 string `json:"v1,omitempty"` V2 string `json:"v2,omitempty"` V3 string `json:"v3,omitempty"` V4 string `json:"v4,omitempty"` V5 string `json:"v5,omitempty"` }
func (PolicyRule) LoadPolicyLine ¶
func (line PolicyRule) LoadPolicyLine(model model.Model) error
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) FilterAuthorizedPairs ¶
func (*State) FilterAuthorizedProjects ¶
func (*State) IsAuthorized ¶
func (*State) ProjectsAuthorized ¶
Click to show internal directories.
Click to hide internal directories.