Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDevelopToolsRules ¶
func DefaultDevelopToolsRules() []security.SecurityRule
DefaultDevelopToolsRules returns the default safe development tool rules.
Types ¶
type FileRuleSource ¶
type FileRuleSource struct {
// contains filtered or unexported fields
}
FileRuleSource loads security rules from a file.
func NewFileRuleSource ¶
func NewFileRuleSource(filename string) *FileRuleSource
NewFileRuleSource creates a new FileRuleSource.
func (*FileRuleSource) LoadRules ¶
func (f *FileRuleSource) LoadRules(ctx context.Context) ([]security.SecurityRule, error)
LoadRules loads rules from the configured file.
func (*FileRuleSource) Name ¶
func (f *FileRuleSource) Name() string
Name returns the name of this rule source.
type MemoryRuleSource ¶
type MemoryRuleSource struct {
// contains filtered or unexported fields
}
MemoryRuleSource provides in-memory security rules.
func NewMemoryRuleSource ¶
func NewMemoryRuleSource(name string, rules []security.SecurityRule) *MemoryRuleSource
NewMemoryRuleSource creates a new MemoryRuleSource with the given rules.
func (*MemoryRuleSource) AddRule ¶
func (m *MemoryRuleSource) AddRule(rule security.SecurityRule)
AddRule adds a new rule to the source.
func (*MemoryRuleSource) LoadRules ¶
func (m *MemoryRuleSource) LoadRules(ctx context.Context) ([]security.SecurityRule, error)
LoadRules returns the rules loaded in memory.
func (*MemoryRuleSource) Name ¶
func (m *MemoryRuleSource) Name() string
Name returns the name of this rule source.
Click to show internal directories.
Click to hide internal directories.