github.com/oam-dev/kubevela@v1.9.11/apis/core.oam.dev/groupversion_info.go (about)

     1  /*
     2  Copyright 2021 The KubeVela Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // Package core_oam_dev contains API Schema definitions for the core.oam.dev v1alpha2 API group
    18  package core_oam_dev
    19  
    20  import (
    21  	"k8s.io/apimachinery/pkg/runtime"
    22  
    23  	"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha1"
    24  	"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
    25  )
    26  
    27  func init() {
    28  	// Register the types with the Scheme so the resources can map objects to GroupVersionKinds and back
    29  	AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, v1beta1.SchemeBuilder.AddToScheme)
    30  }
    31  
    32  // AddToSchemes may be used to add all resources defined in the project to a Scheme
    33  var AddToSchemes runtime.SchemeBuilder
    34  
    35  // AddToScheme adds all Resources to the Scheme
    36  func AddToScheme(s *runtime.Scheme) error {
    37  	return AddToSchemes.AddToScheme(s)
    38  }