1
0
mirror of https://github.com/rancher/types.git synced 2025-09-09 00:48:56 +00:00

Generate code for new init() method

This commit is contained in:
dax
2019-04-20 14:13:40 -07:00
committed by Craig Jellick
parent 0aaea5ae1a
commit 233ec77bbc
112 changed files with 1249 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/rancher/norman/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/resource"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -28,8 +29,18 @@ var (
Kind: ClusterAuthTokenGroupVersionKind.Kind,
}
ClusterAuthTokenGroupVersionResource = schema.GroupVersionResource{
Group: GroupName,
Version: Version,
Resource: "clusterauthtokens",
}
)
func init() {
resource.Put(ClusterAuthTokenGroupVersionResource)
}
func NewClusterAuthToken(namespace, name string, obj ClusterAuthToken) *ClusterAuthToken {
obj.APIVersion, obj.Kind = ClusterAuthTokenGroupVersionKind.ToAPIVersionAndKind()
obj.Name = name

View File

@@ -5,6 +5,7 @@ import (
"github.com/rancher/norman/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/resource"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -28,8 +29,18 @@ var (
Kind: ClusterUserAttributeGroupVersionKind.Kind,
}
ClusterUserAttributeGroupVersionResource = schema.GroupVersionResource{
Group: GroupName,
Version: Version,
Resource: "clusteruserattributes",
}
)
func init() {
resource.Put(ClusterUserAttributeGroupVersionResource)
}
func NewClusterUserAttribute(namespace, name string, obj ClusterUserAttribute) *ClusterUserAttribute {
obj.APIVersion, obj.Kind = ClusterUserAttributeGroupVersionKind.ToAPIVersionAndKind()
obj.Name = name