Documentation
¶
Index ¶
- Constants
- type Policy
- type PolicyEngine
- func (pe *PolicyEngine) AddPolicy(subject []byte, action, resource, effect string, conditions map[string]string) error
- func (pe *PolicyEngine) Evaluate(subject []byte, action, resource string, context map[string]string) bool
- func (pe *PolicyEngine) GrantPermission(subject []byte, permission string) error
- func (pe *PolicyEngine) HasPermission(subject []byte, permission string) bool
- func (pe *PolicyEngine) RemovePolicy(subject []byte, action, resource string) error
- func (pe *PolicyEngine) RestoreSubject(subject []byte) error
- func (pe *PolicyEngine) RevokeSubject(subject []byte) error
Constants ¶
View Source
const PolicyPageID = ultimate_db.PageID(5)
View Source
const PolicyPageID = ultimate_db.PageID(5)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyEngine ¶
type PolicyEngine struct {
// contains filtered or unexported fields
}
func NewPolicyEngine ¶
func NewPolicyEngine(db *ultimate_db.DB) *PolicyEngine
func (*PolicyEngine) Evaluate ¶
func (pe *PolicyEngine) Evaluate(subject []byte, action, resource string, context map[string]string) bool
Evaluate runs a dual-stage PBAC/ABAC check with strict Deny-Override over unified transactional layers
func (*PolicyEngine) GrantPermission ¶
func (*PolicyEngine) HasPermission ¶
func (pe *PolicyEngine) HasPermission(subject []byte, permission string) bool
HasPermission executes an explicit permission lookup path optimized for real-time mesh routing loops
func (*PolicyEngine) RemovePolicy ¶
func (*PolicyEngine) RestoreSubject ¶ added in v1.0.2
func (*PolicyEngine) RevokeSubject ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.