Documentation ¶
Index ¶
- type OPAChecker
- type ResourceCollector
- func (rc *ResourceCollector) CollectMultipleResources(resources []struct{ ... }) (map[string][]unstructured.Unstructured, error)
- func (rc *ResourceCollector) CollectResources(kind, version string) ([]unstructured.Unstructured, error)
- func (rc *ResourceCollector) CollectResourcesWithFilter(kind, version string, filter ResourceFilter) ([]unstructured.Unstructured, error)
- type ResourceFilter
- type ResourcesManager
- type RulesManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OPAChecker ¶
type OPAChecker struct {
// contains filtered or unexported fields
}
func NewOPAChecker ¶
func NewOPAChecker(batchSize int, workers int) *OPAChecker
func (*OPAChecker) VailOpaRulesResult ¶
func (oc *OPAChecker) VailOpaRulesResult(rulesManager *RulesManager, resourcesManager *ResourcesManager) (v1alpha2.KubeeyeOpaResult, error)
type ResourceCollector ¶
type ResourceCollector struct {
// contains filtered or unexported fields
}
func NewResourceCollector ¶
func NewResourceCollector(config *rest.Config) (*ResourceCollector, error)
func (*ResourceCollector) CollectMultipleResources ¶
func (rc *ResourceCollector) CollectMultipleResources(resources []struct { Kind string Version string }) (map[string][]unstructured.Unstructured, error)
collect multiple resources
func (*ResourceCollector) CollectResources ¶
func (rc *ResourceCollector) CollectResources(kind, version string) ([]unstructured.Unstructured, error)
func (*ResourceCollector) CollectResourcesWithFilter ¶
func (rc *ResourceCollector) CollectResourcesWithFilter(kind, version string, filter ResourceFilter) ([]unstructured.Unstructured, error)
type ResourceFilter ¶
type ResourceFilter struct { NamespaceSelector []string // filter by namespace LabelSelector string // filter by label FieldSelector string // filter by field Names []string // filter by resource name ExcludeNames []string // exclude resource name }
collect resources with filter
type ResourcesManager ¶
type ResourcesManager struct {
Resources map[string][]unstructured.Unstructured
}
func NewResourcesManager ¶
func NewResourcesManager() *ResourcesManager
func (*ResourcesManager) AddResource ¶
func (rm *ResourcesManager) AddResource(resource string, collector *ResourceCollector) error
type RulesManager ¶
func NewRulesManager ¶
func NewRulesManager() *RulesManager
Click to show internal directories.
Click to hide internal directories.