1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 18:38:40 +00:00

move engine and violation into pkg

This commit is contained in:
shuting 2019-04-26 18:53:38 -07:00
parent c42f130d1a
commit 2b25eee07c
3 changed files with 13 additions and 9 deletions

View file

@ -1,9 +0,0 @@
package engine
import (
types "github.com/nirmata/kube-policy/pkg/apis/policy/v1alpha1"
)
type policyInterface interface {
Apply(policy types.Policy, kind string, resource string, resourceRaw []byte) []byte,
}

13
pkg/engine/policy.go Normal file
View file

@ -0,0 +1,13 @@
package engine
import (
types "github.com/nirmata/kube-policy/pkg/apis/policy/v1alpha1"
"github.com/nirmata/kube-policy/pkg/violation"
"github.com/nirmata/kube-policy/webhooks"
)
type policyInterface interface {
ApplySingle(policy types.Policy, resourceRaw []byte) (webhooks.PatchBytes, violation.Violations, error)
ApplyRegex(policy types.Policy) (webhooks.PatchBytes, violation.Violations, error)
}