forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.go
30 lines (23 loc) · 1.04 KB
/
register.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package v1
import (
"github.com/openshift/api/oauth/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const (
GroupName = "oauth.openshift.io"
LegacyGroupName = ""
)
// SchemeGroupVersion is group version used to register these objects
var (
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: "v1"}
LegacySchemeBuilder = runtime.NewSchemeBuilder(v1.LegacySchemeBuilder.AddToScheme, addConversionFuncs, addLegacyFieldSelectorKeyConversions, v1.RegisterDeepCopies, RegisterDefaults, RegisterConversions)
AddToSchemeInCoreGroup = LegacySchemeBuilder.AddToScheme
SchemeBuilder = runtime.NewSchemeBuilder(v1.SchemeBuilder.AddToScheme, addConversionFuncs, addFieldSelectorKeyConversions, RegisterDefaults)
AddToScheme = SchemeBuilder.AddToScheme
localSchemeBuilder = &SchemeBuilder
)
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}