Documentation
¶
Index ¶
- type Mode
- type Policy
- func (p *Policy) BlockReason(name string, readOnly bool) string
- func (p *Policy) Clone() *Policy
- func (p *Policy) Describe() map[string]any
- func (p *Policy) IsAllowed(name string, readOnly bool) bool
- func (p *Policy) IsGroupAllowed(group string) bool
- func (p *Policy) SetTier1Tools(names map[string]bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct {
Mode Mode
DeniedTools map[string]bool
DeniedGroups map[string]bool
AllowedGroups map[string]bool // nil = not set (all allowed per mode)
Tier1ToolNames map[string]bool // populated after registry construction
}
func (*Policy) BlockReason ¶
BlockReason returns a human-readable explanation for why a tool is blocked.
func (*Policy) IsGroupAllowed ¶
IsGroupAllowed reports whether tools in the given group are permitted.
func (*Policy) SetTier1Tools ¶
SetTier1Tools stores the set of Tier-1 tool names for later reference.
Click to show internal directories.
Click to hide internal directories.