mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
* code refactor Signed-off-by: Amir Malka <amirm@armosec.io> * use scaninfo object in resource handler Signed-off-by: Amir Malka <amirm@armosec.io> --------- Signed-off-by: Amir Malka <amirm@armosec.io>
16 lines
578 B
Go
16 lines
578 B
Go
package resourcehandler
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kubescape/k8s-interface/workloadinterface"
|
|
"github.com/kubescape/kubescape/v2/core/cautils"
|
|
"github.com/kubescape/kubescape/v2/core/pkg/opaprocessor"
|
|
"k8s.io/apimachinery/pkg/version"
|
|
)
|
|
|
|
type IResourceHandler interface {
|
|
GetResources(context.Context, *cautils.OPASessionObj, opaprocessor.IJobProgressNotificationClient, *cautils.ScanInfo) (cautils.K8SResources, map[string]workloadinterface.IMetadata, cautils.ExternalResources, map[string]bool, error)
|
|
GetClusterAPIServerInfo(ctx context.Context) *version.Info
|
|
}
|