Files
kubescape/core/pkg/resourcehandler/interface.go
Amir Malka e2f96200e0 Code refactor (follow up to PR #1300) (#1323)
* 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>
2023-08-03 17:50:33 +03:00

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
}