mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 18:06:55 +00:00
22 lines
520 B
Go
22 lines
520 B
Go
package resource
|
|
|
|
import (
|
|
"github.com/kyverno/kyverno/test/e2e/framework/gvr"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
)
|
|
|
|
func Namespaced(gvr schema.GroupVersionResource, ns string, raw []byte) Resource {
|
|
return Resource{gvr, ns, raw}
|
|
}
|
|
|
|
func Role(ns string, raw []byte) Resource {
|
|
return Namespaced(gvr.Role, ns, raw)
|
|
}
|
|
|
|
func RoleBinding(ns string, raw []byte) Resource {
|
|
return Namespaced(gvr.RoleBinding, ns, raw)
|
|
}
|
|
|
|
func ConfigMap(ns string, raw []byte) Resource {
|
|
return Namespaced(gvr.ConfigMap, ns, raw)
|
|
}
|