forked from openshift/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.go
37 lines (30 loc) · 917 Bytes
/
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
31
32
33
34
35
36
37
package dockerpre012
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const (
GroupName = "image.openshift.io"
LegacyGroupName = ""
)
var (
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "pre012"}
LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: "pre012"}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
LegacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes)
AddToSchemeInCoreGroup = LegacySchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&DockerImage{},
)
return nil
}
func addLegacyKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(LegacySchemeGroupVersion,
&DockerImage{},
)
return nil
}