Documentation ¶
Index ¶
- Constants
- type AuditResultsCache
- func (c *AuditResultsCache) Get(constraintId string, resourceId string) (agent.AuditResultStatus, bool)
- func (c *AuditResultsCache) Put(constraintId string, resourceId string, status agent.AuditResultStatus)
- func (c *AuditResultsCache) RemoveConstraint(constraintId string)
- func (c *AuditResultsCache) RemoveResource(resourceId string)
- type Constraint
- type OpaAuditor
- func (a *OpaAuditor) AddConstraint(constraint *agent.Constraint) (bool, error)
- func (a *OpaAuditor) Audit(resource *unstructured.Unstructured, constraintIds []string, useCache bool) ([]*agent.AuditResult, []error)
- func (a *OpaAuditor) RemoveConstraint(id string)
- func (a *OpaAuditor) RemoveResource(resource *unstructured.Unstructured)
- func (a *OpaAuditor) UpdateConstraints(constraints []*agent.Constraint) ([]string, map[string]error)
- type Template
Constants ¶
View Source
const (
PolicyQuery = "violation"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditResultsCache ¶
type AuditResultsCache struct {
// contains filtered or unexported fields
}
func NewAuditResultsCache ¶
func NewAuditResultsCache() *AuditResultsCache
func (*AuditResultsCache) Get ¶
func (c *AuditResultsCache) Get(constraintId string, resourceId string) (agent.AuditResultStatus, bool)
func (*AuditResultsCache) Put ¶
func (c *AuditResultsCache) Put(constraintId string, resourceId string, status agent.AuditResultStatus)
func (*AuditResultsCache) RemoveConstraint ¶
func (c *AuditResultsCache) RemoveConstraint(constraintId string)
func (*AuditResultsCache) RemoveResource ¶
func (c *AuditResultsCache) RemoveResource(resourceId string)
type Constraint ¶
type OpaAuditor ¶
type OpaAuditor struct {
// contains filtered or unexported fields
}
func New ¶
func New(parentsStore *kuber.ParentsStore) *OpaAuditor
func (*OpaAuditor) AddConstraint ¶
func (a *OpaAuditor) AddConstraint(constraint *agent.Constraint) (bool, error)
func (*OpaAuditor) Audit ¶
func (a *OpaAuditor) Audit(resource *unstructured.Unstructured, constraintIds []string, useCache bool) ([]*agent.AuditResult, []error)
func (*OpaAuditor) RemoveConstraint ¶
func (a *OpaAuditor) RemoveConstraint(id string)
func (*OpaAuditor) RemoveResource ¶
func (a *OpaAuditor) RemoveResource(resource *unstructured.Unstructured)
func (*OpaAuditor) UpdateConstraints ¶
func (a *OpaAuditor) UpdateConstraints(constraints []*agent.Constraint) ([]string, map[string]error)
Click to show internal directories.
Click to hide internal directories.