diff options
Diffstat (limited to 'pkg/apis')
-rw-r--r-- | pkg/apis/k8s/v1alpha1/register.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/apis/k8s/v1alpha1/register.go b/pkg/apis/k8s/v1alpha1/register.go index b65f347..81d8db8 100644 --- a/pkg/apis/k8s/v1alpha1/register.go +++ b/pkg/apis/k8s/v1alpha1/register.go @@ -16,4 +16,13 @@ var ( // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme is a global function variable that registers this API + AddToScheme = SchemeBuilder.AddToScheme ) + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + |