diff --git a/engine/policy.go b/engine/policy.go deleted file mode 100644 index 7a80be9877..0000000000 --- a/engine/policy.go +++ /dev/null @@ -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, -} diff --git a/pkg/engine/policy.go b/pkg/engine/policy.go new file mode 100644 index 0000000000..6a42b4f573 --- /dev/null +++ b/pkg/engine/policy.go @@ -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) +} diff --git a/violation/violation.go b/pkg/violation/violation.go similarity index 100% rename from violation/violation.go rename to pkg/violation/violation.go