...

Source file src/github.com/openshift/api/helm/v1beta1/register.go

Documentation: github.com/openshift/api/helm/v1beta1

     1  package v1beta1
     2  
     3  import (
     4  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
     5  	"k8s.io/apimachinery/pkg/runtime"
     6  	"k8s.io/apimachinery/pkg/runtime/schema"
     7  )
     8  
     9  var (
    10  	GroupName     = "helm.openshift.io"
    11  	GroupVersion  = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
    12  	schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
    13  	// Install is a function which adds this version to a scheme
    14  	Install = schemeBuilder.AddToScheme
    15  
    16  	// SchemeGroupVersion generated code relies on this name
    17  	// Deprecated
    18  	SchemeGroupVersion = GroupVersion
    19  	// AddToScheme exists solely to keep the old generators creating valid code
    20  	// DEPRECATED
    21  	AddToScheme = schemeBuilder.AddToScheme
    22  )
    23  
    24  // Resource generated code relies on this being here, but it logically belongs to the group
    25  // DEPRECATED
    26  func Resource(resource string) schema.GroupResource {
    27  	return schema.GroupResource{Group: GroupName, Resource: resource}
    28  }
    29  
    30  // Adds the list of known types to api.Scheme.
    31  func addKnownTypes(scheme *runtime.Scheme) error {
    32  	scheme.AddKnownTypes(GroupVersion,
    33  		&HelmChartRepository{},
    34  		&HelmChartRepositoryList{},
    35  		&ProjectHelmChartRepository{},
    36  		&ProjectHelmChartRepositoryList{},
    37  	)
    38  	metav1.AddToGroupVersion(scheme, GroupVersion)
    39  	return nil
    40  }
    41  

View as plain text