...

Source file src/github.com/openshift/api/oauth/v1/register.go

Documentation: github.com/openshift/api/oauth/v1

     1  package v1
     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     = "oauth.openshift.io"
    11  	GroupVersion  = schema.GroupVersion{Group: GroupName, Version: "v1"}
    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  		&OAuthAccessToken{},
    34  		&OAuthAccessTokenList{},
    35  		&OAuthAuthorizeToken{},
    36  		&OAuthAuthorizeTokenList{},
    37  		&OAuthClient{},
    38  		&OAuthClientList{},
    39  		&OAuthClientAuthorization{},
    40  		&OAuthClientAuthorizationList{},
    41  		&OAuthRedirectReference{},
    42  		&UserOAuthAccessToken{},
    43  		&UserOAuthAccessTokenList{},
    44  	)
    45  	metav1.AddToGroupVersion(scheme, GroupVersion)
    46  	return nil
    47  }
    48  

View as plain text