1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/engine/api/engine.go

35 lines
815 B
Go
Raw Normal View History

package api
import (
"context"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/registryclient"
)
type Engine interface {
// Validate applies validation rules from policy on the resource
Validate(
ctx context.Context,
contextLoader ContextLoaderFactory,
policyContext PolicyContext,
cfg config.Configuration,
) *EngineResponse
// Mutate performs mutation. Overlay first and then mutation patches
Mutate(
ctx context.Context,
contextLoader ContextLoaderFactory,
policyContext PolicyContext,
) *EngineResponse
// VerifyAndPatchImages ...
VerifyAndPatchImages(
ctx context.Context,
contextLoader ContextLoaderFactory,
rclient registryclient.Client,
policyContext PolicyContext,
cfg config.Configuration,
) (*EngineResponse, *ImageVerificationMetadata)
}