aboutsummaryrefslogtreecommitdiffstats
path: root/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-09-04 15:00:54 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-09-04 15:06:21 +0800
commit43dac0bc4302fed79eaeb661723ca584a9c0496a (patch)
treea78f60300d73f0a69ed12e946d3fe4580455d8ba /kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac
parenta7837a0ac51704003c6aacba2dacb8e64f681622 (diff)
restructure the source directory
Issue-ID: OOM-61 Change-Id: Ib6f633d517ad197bfdbca59b374cdad2f1ed897e Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac')
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go241
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go20
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go130
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go64
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go178
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go536
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go238
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go21
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go2209
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto159
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go52
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go4327
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go165
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go138
14 files changed, 0 insertions, 8478 deletions
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go
deleted file mode 100644
index 10d8c40..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go
+++ /dev/null
@@ -1,241 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
-
-package rbac
-
-import (
- api "k8s.io/kubernetes/pkg/api"
- conversion "k8s.io/kubernetes/pkg/conversion"
- runtime "k8s.io/kubernetes/pkg/runtime"
-)
-
-func init() {
- if err := api.Scheme.AddGeneratedDeepCopyFuncs(
- DeepCopy_rbac_ClusterRole,
- DeepCopy_rbac_ClusterRoleBinding,
- DeepCopy_rbac_ClusterRoleBindingList,
- DeepCopy_rbac_ClusterRoleList,
- DeepCopy_rbac_PolicyRule,
- DeepCopy_rbac_Role,
- DeepCopy_rbac_RoleBinding,
- DeepCopy_rbac_RoleBindingList,
- DeepCopy_rbac_RoleList,
- DeepCopy_rbac_Subject,
- ); err != nil {
- // if one of the deep copy functions is malformed, detect it immediately.
- panic(err)
- }
-}
-
-func DeepCopy_rbac_ClusterRole(in ClusterRole, out *ClusterRole, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := in.Rules, &out.Rules
- *out = make([]PolicyRule, len(in))
- for i := range in {
- if err := DeepCopy_rbac_PolicyRule(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_ClusterRoleBinding(in ClusterRoleBinding, out *ClusterRoleBinding, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := in.Subjects, &out.Subjects
- *out = make([]Subject, len(in))
- for i := range in {
- (*out)[i] = in[i]
- }
- } else {
- out.Subjects = nil
- }
- out.RoleRef = in.RoleRef
- return nil
-}
-
-func DeepCopy_rbac_ClusterRoleBindingList(in ClusterRoleBindingList, out *ClusterRoleBindingList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]ClusterRoleBinding, len(in))
- for i := range in {
- if err := DeepCopy_rbac_ClusterRoleBinding(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_ClusterRoleList(in ClusterRoleList, out *ClusterRoleList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]ClusterRole, len(in))
- for i := range in {
- if err := DeepCopy_rbac_ClusterRole(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_PolicyRule(in PolicyRule, out *PolicyRule, c *conversion.Cloner) error {
- if in.Verbs != nil {
- in, out := in.Verbs, &out.Verbs
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.Verbs = nil
- }
- if in.AttributeRestrictions == nil {
- out.AttributeRestrictions = nil
- } else if newVal, err := c.DeepCopy(in.AttributeRestrictions); err != nil {
- return err
- } else {
- out.AttributeRestrictions = newVal.(runtime.Object)
- }
- if in.APIGroups != nil {
- in, out := in.APIGroups, &out.APIGroups
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.APIGroups = nil
- }
- if in.Resources != nil {
- in, out := in.Resources, &out.Resources
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.Resources = nil
- }
- if in.ResourceNames != nil {
- in, out := in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.ResourceNames = nil
- }
- if in.NonResourceURLs != nil {
- in, out := in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.NonResourceURLs = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_Role(in Role, out *Role, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := in.Rules, &out.Rules
- *out = make([]PolicyRule, len(in))
- for i := range in {
- if err := DeepCopy_rbac_PolicyRule(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_RoleBinding(in RoleBinding, out *RoleBinding, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := in.Subjects, &out.Subjects
- *out = make([]Subject, len(in))
- for i := range in {
- (*out)[i] = in[i]
- }
- } else {
- out.Subjects = nil
- }
- out.RoleRef = in.RoleRef
- return nil
-}
-
-func DeepCopy_rbac_RoleBindingList(in RoleBindingList, out *RoleBindingList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]RoleBinding, len(in))
- for i := range in {
- if err := DeepCopy_rbac_RoleBinding(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_RoleList(in RoleList, out *RoleList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]Role, len(in))
- for i := range in {
- if err := DeepCopy_rbac_Role(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_rbac_Subject(in Subject, out *Subject, c *conversion.Cloner) error {
- out.Kind = in.Kind
- out.APIVersion = in.APIVersion
- out.Name = in.Name
- out.Namespace = in.Namespace
- return nil
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go
deleted file mode 100644
index e4ce69b..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +k8s:deepcopy-gen=package,register
-
-// +groupName=rbac.authorization.k8s.io
-package rbac
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go
deleted file mode 100644
index 0f6dc91..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package install installs the batch API group, making it available as
-// an option to all of the API encoding/decoding machinery.
-package install
-
-import (
- "fmt"
-
- "github.com/golang/glog"
-
- "k8s.io/kubernetes/pkg/api"
- "k8s.io/kubernetes/pkg/api/meta"
- "k8s.io/kubernetes/pkg/api/unversioned"
- "k8s.io/kubernetes/pkg/apimachinery"
- "k8s.io/kubernetes/pkg/apimachinery/registered"
- "k8s.io/kubernetes/pkg/apis/rbac"
- "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
- "k8s.io/kubernetes/pkg/runtime"
- "k8s.io/kubernetes/pkg/util/sets"
-)
-
-const importPrefix = "k8s.io/kubernetes/pkg/apis/rbac"
-
-var accessor = meta.NewAccessor()
-
-// availableVersions lists all known external versions for this group from most preferred to least preferred
-var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
-
-func init() {
- registered.RegisterVersions(availableVersions)
- externalVersions := []unversioned.GroupVersion{}
- for _, v := range availableVersions {
- if registered.IsAllowedVersion(v) {
- externalVersions = append(externalVersions, v)
- }
- }
- if len(externalVersions) == 0 {
- glog.V(4).Infof("No version is registered for group %v", rbac.GroupName)
- return
- }
-
- if err := registered.EnableVersions(externalVersions...); err != nil {
- glog.V(4).Infof("%v", err)
- return
- }
- if err := enableVersions(externalVersions); err != nil {
- glog.V(4).Infof("%v", err)
- return
- }
-}
-
-// TODO: enableVersions should be centralized rather than spread in each API
-// group.
-// We can combine registered.RegisterVersions, registered.EnableVersions and
-// registered.RegisterGroup once we have moved enableVersions there.
-func enableVersions(externalVersions []unversioned.GroupVersion) error {
- addVersionsToScheme(externalVersions...)
- preferredExternalVersion := externalVersions[0]
-
- groupMeta := apimachinery.GroupMeta{
- GroupVersion: preferredExternalVersion,
- GroupVersions: externalVersions,
- RESTMapper: newRESTMapper(externalVersions),
- SelfLinker: runtime.SelfLinker(accessor),
- InterfacesFor: interfacesFor,
- }
-
- if err := registered.RegisterGroup(groupMeta); err != nil {
- return err
- }
- api.RegisterRESTMapper(groupMeta.RESTMapper)
- return nil
-}
-
-func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
- rootScoped := sets.NewString(
- "ClusterRole",
- "ClusterRoleBinding",
- )
-
- ignoredKinds := sets.NewString()
-
- return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
-}
-
-// interfacesFor returns the default Codec and ResourceVersioner for a given version
-// string, or an error if the version is not known.
-func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
- switch version {
- case v1alpha1.SchemeGroupVersion:
- return &meta.VersionInterfaces{
- ObjectConvertor: api.Scheme,
- MetadataAccessor: accessor,
- }, nil
- default:
- g, _ := registered.Group(rbac.GroupName)
- return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
- }
-}
-
-func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
- // add the internal version to Scheme
- rbac.AddToScheme(api.Scheme)
- // add the enabled external versions to Scheme
- for _, v := range externalVersions {
- if !registered.IsEnabledVersion(v) {
- glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
- continue
- }
- switch v {
- case v1alpha1.SchemeGroupVersion:
- v1alpha1.AddToScheme(api.Scheme)
- }
- }
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go
deleted file mode 100644
index 5d89656..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package rbac
-
-import (
- "k8s.io/kubernetes/pkg/api"
- "k8s.io/kubernetes/pkg/api/unversioned"
- "k8s.io/kubernetes/pkg/runtime"
- "k8s.io/kubernetes/pkg/watch/versioned"
-)
-
-const GroupName = "rbac.authorization.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
-
-// Kind takes an unqualified kind and returns back a Group qualified GroupKind
-func Kind(kind string) unversioned.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns back a Group qualified GroupResource
-func Resource(resource string) unversioned.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-func AddToScheme(scheme *runtime.Scheme) {
- // Add the API to Scheme.
- addKnownTypes(scheme)
-}
-
-// Adds the list of known types to api.Scheme.
-func addKnownTypes(scheme *runtime.Scheme) {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Role{},
- &RoleBinding{},
- &RoleBindingList{},
- &RoleList{},
-
- &ClusterRole{},
- &ClusterRoleBinding{},
- &ClusterRoleBindingList{},
- &ClusterRoleList{},
-
- &api.ListOptions{},
- &api.DeleteOptions{},
- &api.ExportOptions{},
- )
- versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go
deleted file mode 100644
index 44a3897..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package rbac
-
-import (
- "k8s.io/kubernetes/pkg/api"
- "k8s.io/kubernetes/pkg/api/unversioned"
- "k8s.io/kubernetes/pkg/runtime"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-const (
- APIGroupAll = "*"
- ResourceAll = "*"
- VerbAll = "*"
- NonResourceAll = "*"
-
- GroupKind = "Group"
- ServiceAccountKind = "ServiceAccount"
- UserKind = "User"
-
- UserAll = "*"
-)
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-type PolicyRule struct {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- Verbs []string
- // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
- // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
- AttributeRestrictions runtime.Object
- // APIGroups is the name of the APIGroup that contains the resources.
- // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
- APIGroups []string
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- Resources []string
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- ResourceNames []string
- // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // If an action is not a resource API request, then the URL is split on '/' and is checked against the NonResourceURLs to look for a match.
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- NonResourceURLs []string
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-type Subject struct {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- Kind string
- // APIVersion holds the API group and version of the referenced object. For non-object references such as "Group" and "User" this is
- // expected to be API version of this API group. For example "rbac/v1alpha1".
- APIVersion string
- // Name of the object being referenced.
- Name string
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- Namespace string
-}
-
-// +genclient=true
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-type Role struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- api.ObjectMeta
-
- // Rules holds all the PolicyRules for this Role
- Rules []PolicyRule
-}
-
-// +genclient=true
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-type RoleBinding struct {
- unversioned.TypeMeta
- api.ObjectMeta
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef api.ObjectReference
-}
-
-// RoleBindingList is a collection of RoleBindings
-type RoleBindingList struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- unversioned.ListMeta
-
- // Items is a list of roleBindings
- Items []RoleBinding
-}
-
-// RoleList is a collection of Roles
-type RoleList struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- unversioned.ListMeta
-
- // Items is a list of roles
- Items []Role
-}
-
-// +genclient=true
-// +nonNamespaced=true
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-type ClusterRole struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- api.ObjectMeta
-
- // Rules holds all the PolicyRules for this ClusterRole
- Rules []PolicyRule
-}
-
-// +genclient=true
-// +nonNamespaced=true
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-type ClusterRoleBinding struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- api.ObjectMeta
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef api.ObjectReference
-}
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-type ClusterRoleBindingList struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- unversioned.ListMeta
-
- // Items is a list of ClusterRoleBindings
- Items []ClusterRoleBinding
-}
-
-// ClusterRoleList is a collection of ClusterRoles
-type ClusterRoleList struct {
- unversioned.TypeMeta
- // Standard object's metadata.
- unversioned.ListMeta
-
- // Items is a list of ClusterRoles
- Items []ClusterRole
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go
deleted file mode 100644
index 5588146..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go
+++ /dev/null
@@ -1,536 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by conversion-gen. Do not edit it manually!
-
-package v1alpha1
-
-import (
- api "k8s.io/kubernetes/pkg/api"
- rbac "k8s.io/kubernetes/pkg/apis/rbac"
- conversion "k8s.io/kubernetes/pkg/conversion"
- runtime "k8s.io/kubernetes/pkg/runtime"
-)
-
-func init() {
- if err := api.Scheme.AddGeneratedConversionFuncs(
- Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole,
- Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole,
- Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
- Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding,
- Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList,
- Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList,
- Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList,
- Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList,
- Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule,
- Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule,
- Convert_v1alpha1_Role_To_rbac_Role,
- Convert_rbac_Role_To_v1alpha1_Role,
- Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding,
- Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding,
- Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList,
- Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList,
- Convert_v1alpha1_RoleList_To_rbac_RoleList,
- Convert_rbac_RoleList_To_v1alpha1_RoleList,
- Convert_v1alpha1_Subject_To_rbac_Subject,
- Convert_rbac_Subject_To_v1alpha1_Subject,
- ); err != nil {
- // if one of the conversion functions is malformed, detect it immediately.
- panic(err)
- }
-}
-
-func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]rbac.PolicyRule, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
- return autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in, out, s)
-}
-
-func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
- return autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in, out, s)
-}
-
-func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]rbac.Subject, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Subjects = nil
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
- return autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s)
-}
-
-func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- for i := range *in {
- if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Subjects = nil
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
- return autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in, out, s)
-}
-
-func autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]rbac.ClusterRoleBinding, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
- return autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s)
-}
-
-func autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRoleBinding, len(*in))
- for i := range *in {
- if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
- return autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in, out, s)
-}
-
-func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]rbac.ClusterRole, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
- return autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s)
-}
-
-func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ClusterRole, len(*in))
- for i := range *in {
- if err := Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
- return autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in, out, s)
-}
-
-func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
- out.Verbs = in.Verbs
- if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil {
- return err
- }
- out.APIGroups = in.APIGroups
- out.Resources = in.Resources
- out.ResourceNames = in.ResourceNames
- out.NonResourceURLs = in.NonResourceURLs
- return nil
-}
-
-func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
- return autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in, out, s)
-}
-
-func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
- out.Verbs = in.Verbs
- if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil {
- return err
- }
- out.APIGroups = in.APIGroups
- out.Resources = in.Resources
- out.ResourceNames = in.ResourceNames
- out.NonResourceURLs = in.NonResourceURLs
- return nil
-}
-
-func Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
- return autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in, out, s)
-}
-
-func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]rbac.PolicyRule, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
- return autoConvert_v1alpha1_Role_To_rbac_Role(in, out, s)
-}
-
-func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := &in.Rules, &out.Rules
- *out = make([]PolicyRule, len(*in))
- for i := range *in {
- if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
- return autoConvert_rbac_Role_To_v1alpha1_Role(in, out, s)
-}
-
-func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]rbac.Subject, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Subjects = nil
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
- return autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in, out, s)
-}
-
-func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := &in.Subjects, &out.Subjects
- *out = make([]Subject, len(*in))
- for i := range *in {
- if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Subjects = nil
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
- return autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in, out, s)
-}
-
-func autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]rbac.RoleBinding, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
- return autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in, out, s)
-}
-
-func autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]RoleBinding, len(*in))
- for i := range *in {
- if err := Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
- return autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in, out, s)
-}
-
-func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]rbac.Role, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_Role_To_rbac_Role(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
- return autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in, out, s)
-}
-
-func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Role, len(*in))
- for i := range *in {
- if err := Convert_rbac_Role_To_v1alpha1_Role(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
- return autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in, out, s)
-}
-
-func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
- out.Kind = in.Kind
- out.APIVersion = in.APIVersion
- out.Name = in.Name
- out.Namespace = in.Namespace
- return nil
-}
-
-func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
- return autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s)
-}
-
-func autoConvert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
- out.Kind = in.Kind
- out.APIVersion = in.APIVersion
- out.Name = in.Name
- out.Namespace = in.Namespace
- return nil
-}
-
-func Convert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
- return autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s)
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go
deleted file mode 100644
index 3f0e1eb..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go
+++ /dev/null
@@ -1,238 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
-
-package v1alpha1
-
-import (
- api "k8s.io/kubernetes/pkg/api"
- v1 "k8s.io/kubernetes/pkg/api/v1"
- conversion "k8s.io/kubernetes/pkg/conversion"
- runtime "k8s.io/kubernetes/pkg/runtime"
-)
-
-func init() {
- if err := api.Scheme.AddGeneratedDeepCopyFuncs(
- DeepCopy_v1alpha1_ClusterRole,
- DeepCopy_v1alpha1_ClusterRoleBinding,
- DeepCopy_v1alpha1_ClusterRoleBindingList,
- DeepCopy_v1alpha1_ClusterRoleList,
- DeepCopy_v1alpha1_PolicyRule,
- DeepCopy_v1alpha1_Role,
- DeepCopy_v1alpha1_RoleBinding,
- DeepCopy_v1alpha1_RoleBindingList,
- DeepCopy_v1alpha1_RoleList,
- DeepCopy_v1alpha1_Subject,
- ); err != nil {
- // if one of the deep copy functions is malformed, detect it immediately.
- panic(err)
- }
-}
-
-func DeepCopy_v1alpha1_ClusterRole(in ClusterRole, out *ClusterRole, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := in.Rules, &out.Rules
- *out = make([]PolicyRule, len(in))
- for i := range in {
- if err := DeepCopy_v1alpha1_PolicyRule(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_ClusterRoleBinding(in ClusterRoleBinding, out *ClusterRoleBinding, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := in.Subjects, &out.Subjects
- *out = make([]Subject, len(in))
- for i := range in {
- (*out)[i] = in[i]
- }
- } else {
- out.Subjects = nil
- }
- out.RoleRef = in.RoleRef
- return nil
-}
-
-func DeepCopy_v1alpha1_ClusterRoleBindingList(in ClusterRoleBindingList, out *ClusterRoleBindingList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]ClusterRoleBinding, len(in))
- for i := range in {
- if err := DeepCopy_v1alpha1_ClusterRoleBinding(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_ClusterRoleList(in ClusterRoleList, out *ClusterRoleList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]ClusterRole, len(in))
- for i := range in {
- if err := DeepCopy_v1alpha1_ClusterRole(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_PolicyRule(in PolicyRule, out *PolicyRule, c *conversion.Cloner) error {
- if in.Verbs != nil {
- in, out := in.Verbs, &out.Verbs
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.Verbs = nil
- }
- if err := runtime.DeepCopy_runtime_RawExtension(in.AttributeRestrictions, &out.AttributeRestrictions, c); err != nil {
- return err
- }
- if in.APIGroups != nil {
- in, out := in.APIGroups, &out.APIGroups
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.APIGroups = nil
- }
- if in.Resources != nil {
- in, out := in.Resources, &out.Resources
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.Resources = nil
- }
- if in.ResourceNames != nil {
- in, out := in.ResourceNames, &out.ResourceNames
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.ResourceNames = nil
- }
- if in.NonResourceURLs != nil {
- in, out := in.NonResourceURLs, &out.NonResourceURLs
- *out = make([]string, len(in))
- copy(*out, in)
- } else {
- out.NonResourceURLs = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_Role(in Role, out *Role, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Rules != nil {
- in, out := in.Rules, &out.Rules
- *out = make([]PolicyRule, len(in))
- for i := range in {
- if err := DeepCopy_v1alpha1_PolicyRule(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Rules = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_RoleBinding(in RoleBinding, out *RoleBinding, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if in.Subjects != nil {
- in, out := in.Subjects, &out.Subjects
- *out = make([]Subject, len(in))
- for i := range in {
- (*out)[i] = in[i]
- }
- } else {
- out.Subjects = nil
- }
- out.RoleRef = in.RoleRef
- return nil
-}
-
-func DeepCopy_v1alpha1_RoleBindingList(in RoleBindingList, out *RoleBindingList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]RoleBinding, len(in))
- for i := range in {
- if err := DeepCopy_v1alpha1_RoleBinding(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_RoleList(in RoleList, out *RoleList, c *conversion.Cloner) error {
- out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
- if in.Items != nil {
- in, out := in.Items, &out.Items
- *out = make([]Role, len(in))
- for i := range in {
- if err := DeepCopy_v1alpha1_Role(in[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func DeepCopy_v1alpha1_Subject(in Subject, out *Subject, c *conversion.Cloner) error {
- out.Kind = in.Kind
- out.APIVersion = in.APIVersion
- out.Name = in.Name
- out.Namespace = in.Namespace
- return nil
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go
deleted file mode 100644
index e471bd3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// +groupName=rbac.authorization.k8s.io
-// +k8s:deepcopy-gen=package,register
-// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
-
-package v1alpha1
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go
deleted file mode 100644
index fb917c3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,2209 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by protoc-gen-gogo.
-// source: k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
-
- It has these top-level messages:
- ClusterRole
- ClusterRoleBinding
- ClusterRoleBindingList
- ClusterRoleList
- PolicyRule
- Role
- RoleBinding
- RoleBindingList
- RoleList
- Subject
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-func (m *ClusterRole) Reset() { *m = ClusterRole{} }
-func (m *ClusterRole) String() string { return proto.CompactTextString(m) }
-func (*ClusterRole) ProtoMessage() {}
-
-func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
-func (m *ClusterRoleBinding) String() string { return proto.CompactTextString(m) }
-func (*ClusterRoleBinding) ProtoMessage() {}
-
-func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
-func (m *ClusterRoleBindingList) String() string { return proto.CompactTextString(m) }
-func (*ClusterRoleBindingList) ProtoMessage() {}
-
-func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
-func (m *ClusterRoleList) String() string { return proto.CompactTextString(m) }
-func (*ClusterRoleList) ProtoMessage() {}
-
-func (m *PolicyRule) Reset() { *m = PolicyRule{} }
-func (m *PolicyRule) String() string { return proto.CompactTextString(m) }
-func (*PolicyRule) ProtoMessage() {}
-
-func (m *Role) Reset() { *m = Role{} }
-func (m *Role) String() string { return proto.CompactTextString(m) }
-func (*Role) ProtoMessage() {}
-
-func (m *RoleBinding) Reset() { *m = RoleBinding{} }
-func (m *RoleBinding) String() string { return proto.CompactTextString(m) }
-func (*RoleBinding) ProtoMessage() {}
-
-func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
-func (m *RoleBindingList) String() string { return proto.CompactTextString(m) }
-func (*RoleBindingList) ProtoMessage() {}
-
-func (m *RoleList) Reset() { *m = RoleList{} }
-func (m *RoleList) String() string { return proto.CompactTextString(m) }
-func (*RoleList) ProtoMessage() {}
-
-func (m *Subject) Reset() { *m = Subject{} }
-func (m *Subject) String() string { return proto.CompactTextString(m) }
-func (*Subject) ProtoMessage() {}
-
-func init() {
- proto.RegisterType((*ClusterRole)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRole")
- proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBinding")
- proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList")
- proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleList")
- proto.RegisterType((*PolicyRule)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.PolicyRule")
- proto.RegisterType((*Role)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.Role")
- proto.RegisterType((*RoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleBinding")
- proto.RegisterType((*RoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleBindingList")
- proto.RegisterType((*RoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleList")
- proto.RegisterType((*Subject)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.Subject")
-}
-func (m *ClusterRole) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *ClusterRole) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
- n1, err := m.ObjectMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRoleBinding) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *ClusterRoleBinding) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
- n2, err := m.ObjectMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size()))
- n3, err := m.RoleRef.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *ClusterRoleBindingList) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *ClusterRoleBindingList) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
- n4, err := m.ListMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *ClusterRoleList) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *ClusterRoleList) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
- n5, err := m.ListMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *PolicyRule) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *PolicyRule) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- data[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(m.AttributeRestrictions.Size()))
- n6, err := m.AttributeRestrictions.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- data[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- data[i] = 0x22
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- data[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- data[i] = 0x32
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- return i, nil
-}
-
-func (m *Role) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *Role) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
- n7, err := m.ObjectMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- if len(m.Rules) > 0 {
- for _, msg := range m.Rules {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleBinding) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *RoleBinding) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
- n8, err := m.ObjectMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- if len(m.Subjects) > 0 {
- for _, msg := range m.Subjects {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size()))
- n9, err := m.RoleRef.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- return i, nil
-}
-
-func (m *RoleBindingList) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *RoleBindingList) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
- n10, err := m.ListMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *RoleList) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *RoleList) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
- n11, err := m.ListMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- if len(m.Items) > 0 {
- for _, msg := range m.Items {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *Subject) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
-}
-
-func (m *Subject) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Kind)))
- i += copy(data[i:], m.Kind)
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion)))
- i += copy(data[i:], m.APIVersion)
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Name)))
- i += copy(data[i:], m.Name)
- data[i] = 0x22
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Namespace)))
- i += copy(data[i:], m.Namespace)
- return i, nil
-}
-
-func encodeFixed64Generated(data []byte, offset int, v uint64) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- data[offset+4] = uint8(v >> 32)
- data[offset+5] = uint8(v >> 40)
- data[offset+6] = uint8(v >> 48)
- data[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(data []byte, offset int, v uint32) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-func encodeVarintGenerated(data []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- data[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- data[offset] = uint8(v)
- return offset + 1
-}
-func (m *ClusterRole) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ClusterRoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ClusterRoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *PolicyRule) Size() (n int) {
- var l int
- _ = l
- if len(m.Verbs) > 0 {
- for _, s := range m.Verbs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.AttributeRestrictions.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.APIGroups) > 0 {
- for _, s := range m.APIGroups {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Resources) > 0 {
- for _, s := range m.Resources {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.NonResourceURLs) > 0 {
- for _, s := range m.NonResourceURLs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Role) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleBinding) Size() (n int) {
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Subjects) > 0 {
- for _, e := range m.Subjects {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.RoleRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *RoleBindingList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *RoleList) Size() (n int) {
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *Subject) Size() (n int) {
- var l int
- _ = l
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.APIVersion)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (m *ClusterRole) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBinding) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleBindingList) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ClusterRoleList) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ClusterRole{})
- if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PolicyRule) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AttributeRestrictions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.AttributeRestrictions.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroups = append(m.APIGroups, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resources = append(m.Resources, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ResourceNames = append(m.ResourceNames, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NonResourceURLs = append(m.NonResourceURLs, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Role) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Role: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Rules = append(m.Rules, PolicyRule{})
- if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBinding) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Subjects = append(m.Subjects, Subject{})
- if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleBindingList) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, RoleBinding{})
- if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *RoleList) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, Role{})
- if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Subject) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Subject: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Kind = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIVersion = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(data []byte) (n int, err error) {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if data[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(data[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
-)
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
deleted file mode 100644
index 062f815..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = 'proto2';
-
-package k8s.io.kubernetes.pkg.apis.rbac.v1alpha1;
-
-import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
-import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
-import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
-import "k8s.io/kubernetes/pkg/runtime/generated.proto";
-import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-message ClusterRole {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this ClusterRole
- repeated PolicyRule rules = 2;
-}
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-message ClusterRoleBinding {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional k8s.io.kubernetes.pkg.api.v1.ObjectReference roleRef = 3;
-}
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-message ClusterRoleBindingList {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoleBindings
- repeated ClusterRoleBinding items = 2;
-}
-
-// ClusterRoleList is a collection of ClusterRoles
-message ClusterRoleList {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
-
- // Items is a list of ClusterRoles
- repeated ClusterRole items = 2;
-}
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-message PolicyRule {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- repeated string verbs = 1;
-
- // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
- // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
- optional k8s.io.kubernetes.pkg.runtime.RawExtension attributeRestrictions = 2;
-
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- repeated string apiGroups = 3;
-
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- repeated string resources = 4;
-
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- repeated string resourceNames = 5;
-
- // NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- repeated string nonResourceURLs = 6;
-}
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-message Role {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
-
- // Rules holds all the PolicyRules for this Role
- repeated PolicyRule rules = 2;
-}
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-message RoleBinding {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
-
- // Subjects holds references to the objects the role applies to.
- repeated Subject subjects = 2;
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- optional k8s.io.kubernetes.pkg.api.v1.ObjectReference roleRef = 3;
-}
-
-// RoleBindingList is a collection of RoleBindings
-message RoleBindingList {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
-
- // Items is a list of RoleBindings
- repeated RoleBinding items = 2;
-}
-
-// RoleList is a collection of Roles
-message RoleList {
- // Standard object's metadata.
- optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
-
- // Items is a list of Roles
- repeated Role items = 2;
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-message Subject {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- optional string kind = 1;
-
- // APIVersion holds the API group and version of the referenced object.
- optional string apiVersion = 2;
-
- // Name of the object being referenced.
- optional string name = 3;
-
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- optional string namespace = 4;
-}
-
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go
deleted file mode 100644
index cff4720..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- "k8s.io/kubernetes/pkg/api/unversioned"
- "k8s.io/kubernetes/pkg/api/v1"
- "k8s.io/kubernetes/pkg/apis/rbac"
- "k8s.io/kubernetes/pkg/runtime"
- "k8s.io/kubernetes/pkg/watch/versioned"
-)
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: rbac.GroupName, Version: "v1alpha1"}
-
-func AddToScheme(scheme *runtime.Scheme) {
- addKnownTypes(scheme)
-}
-
-// Adds the list of known types to api.Scheme.
-func addKnownTypes(scheme *runtime.Scheme) {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Role{},
- &RoleBinding{},
- &RoleBindingList{},
- &RoleList{},
-
- &ClusterRole{},
- &ClusterRoleBinding{},
- &ClusterRoleBindingList{},
- &ClusterRoleList{},
-
- &v1.ListOptions{},
- &v1.DeleteOptions{},
- &v1.ExportOptions{},
- )
- versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go
deleted file mode 100644
index bf7b3db..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go
+++ /dev/null
@@ -1,4327 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package v1alpha1
-
-import (
- "errors"
- "fmt"
- codec1978 "github.com/ugorji/go/codec"
- pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
- pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
- pkg1_runtime "k8s.io/kubernetes/pkg/runtime"
- pkg4_types "k8s.io/kubernetes/pkg/types"
- "reflect"
- "runtime"
- time "time"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF81234 = 1
- codecSelferC_RAW1234 = 0
- // ----- value types used ----
- codecSelferValueTypeArray1234 = 10
- codecSelferValueTypeMap1234 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey1234 = 2
- codecSelfer_containerMapValue1234 = 3
- codecSelfer_containerMapEnd1234 = 4
- codecSelfer_containerArrayElem1234 = 6
- codecSelfer_containerArrayEnd1234 = 7
-)
-
-var (
- codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelfer1234 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 pkg2_unversioned.TypeMeta
- var v1 pkg3_v1.ObjectMeta
- var v2 pkg1_runtime.RawExtension
- var v3 pkg4_types.UID
- var v4 time.Time
- _, _, _, _, _ = v0, v1, v2, v3, v4
- }
-}
-
-func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [6]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[1] = true
- yyq2[4] = len(x.ResourceNames) != 0
- yyq2[5] = len(x.NonResourceURLs) != 0
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(6)
- } else {
- yynn2 = 3
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Verbs == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- z.F.EncSliceStringV(x.Verbs, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("verbs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Verbs == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- z.F.EncSliceStringV(x.Verbs, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[1] {
- yy7 := &x.AttributeRestrictions
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else if z.HasExtensions() && z.EncExt(yy7) {
- } else if !yym8 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy7)
- } else {
- z.EncFallback(yy7)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("attributeRestrictions"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy9 := &x.AttributeRestrictions
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else if z.HasExtensions() && z.EncExt(yy9) {
- } else if !yym10 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy9)
- } else {
- z.EncFallback(yy9)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.APIGroups == nil {
- r.EncodeNil()
- } else {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- z.F.EncSliceStringV(x.APIGroups, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.APIGroups == nil {
- r.EncodeNil()
- } else {
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- z.F.EncSliceStringV(x.APIGroups, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Resources == nil {
- r.EncodeNil()
- } else {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- z.F.EncSliceStringV(x.Resources, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("resources"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Resources == nil {
- r.EncodeNil()
- } else {
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- z.F.EncSliceStringV(x.Resources, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[4] {
- if x.ResourceNames == nil {
- r.EncodeNil()
- } else {
- yym18 := z.EncBinary()
- _ = yym18
- if false {
- } else {
- z.F.EncSliceStringV(x.ResourceNames, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("resourceNames"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.ResourceNames == nil {
- r.EncodeNil()
- } else {
- yym19 := z.EncBinary()
- _ = yym19
- if false {
- } else {
- z.F.EncSliceStringV(x.ResourceNames, false, e)
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[5] {
- if x.NonResourceURLs == nil {
- r.EncodeNil()
- } else {
- yym21 := z.EncBinary()
- _ = yym21
- if false {
- } else {
- z.F.EncSliceStringV(x.NonResourceURLs, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[5] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.NonResourceURLs == nil {
- r.EncodeNil()
- } else {
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else {
- z.F.EncSliceStringV(x.NonResourceURLs, false, e)
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "verbs":
- if r.TryDecodeAsNil() {
- x.Verbs = nil
- } else {
- yyv4 := &x.Verbs
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- z.F.DecSliceStringX(yyv4, false, d)
- }
- }
- case "attributeRestrictions":
- if r.TryDecodeAsNil() {
- x.AttributeRestrictions = pkg1_runtime.RawExtension{}
- } else {
- yyv6 := &x.AttributeRestrictions
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv6) {
- } else if !yym7 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv6)
- } else {
- z.DecFallback(yyv6, false)
- }
- }
- case "apiGroups":
- if r.TryDecodeAsNil() {
- x.APIGroups = nil
- } else {
- yyv8 := &x.APIGroups
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- z.F.DecSliceStringX(yyv8, false, d)
- }
- }
- case "resources":
- if r.TryDecodeAsNil() {
- x.Resources = nil
- } else {
- yyv10 := &x.Resources
- yym11 := z.DecBinary()
- _ = yym11
- if false {
- } else {
- z.F.DecSliceStringX(yyv10, false, d)
- }
- }
- case "resourceNames":
- if r.TryDecodeAsNil() {
- x.ResourceNames = nil
- } else {
- yyv12 := &x.ResourceNames
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- z.F.DecSliceStringX(yyv12, false, d)
- }
- }
- case "nonResourceURLs":
- if r.TryDecodeAsNil() {
- x.NonResourceURLs = nil
- } else {
- yyv14 := &x.NonResourceURLs
- yym15 := z.DecBinary()
- _ = yym15
- if false {
- } else {
- z.F.DecSliceStringX(yyv14, false, d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj16 int
- var yyb16 bool
- var yyhl16 bool = l >= 0
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Verbs = nil
- } else {
- yyv17 := &x.Verbs
- yym18 := z.DecBinary()
- _ = yym18
- if false {
- } else {
- z.F.DecSliceStringX(yyv17, false, d)
- }
- }
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.AttributeRestrictions = pkg1_runtime.RawExtension{}
- } else {
- yyv19 := &x.AttributeRestrictions
- yym20 := z.DecBinary()
- _ = yym20
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv19) {
- } else if !yym20 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv19)
- } else {
- z.DecFallback(yyv19, false)
- }
- }
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIGroups = nil
- } else {
- yyv21 := &x.APIGroups
- yym22 := z.DecBinary()
- _ = yym22
- if false {
- } else {
- z.F.DecSliceStringX(yyv21, false, d)
- }
- }
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Resources = nil
- } else {
- yyv23 := &x.Resources
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- z.F.DecSliceStringX(yyv23, false, d)
- }
- }
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ResourceNames = nil
- } else {
- yyv25 := &x.ResourceNames
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- z.F.DecSliceStringX(yyv25, false, d)
- }
- }
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NonResourceURLs = nil
- } else {
- yyv27 := &x.NonResourceURLs
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- z.F.DecSliceStringX(yyv27, false, d)
- }
- }
- for {
- yyj16++
- if yyhl16 {
- yyb16 = yyj16 > l
- } else {
- yyb16 = r.CheckBreak()
- }
- if yyb16 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj16-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[1] = x.APIVersion != ""
- yyq2[3] = x.Namespace != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[1] {
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Name))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("name"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Name))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("namespace"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "name":
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- x.Name = string(r.DecodeString())
- }
- case "namespace":
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj8 int
- var yyb8 bool
- var yyhl8 bool = l >= 0
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- x.Name = string(r.DecodeString())
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- for {
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj8-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[2] = x.Kind != ""
- yyq2[3] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ObjectMeta
- yy4.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ObjectMeta
- yy6.CodecEncodeSelf(e)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Rules == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rules"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Rules == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv4 := &x.ObjectMeta
- yyv4.CodecDecodeSelf(d)
- }
- case "rules":
- if r.TryDecodeAsNil() {
- x.Rules = nil
- } else {
- yyv5 := &x.Rules
- yym6 := z.DecBinary()
- _ = yym6
- if false {
- } else {
- h.decSlicePolicyRule((*[]PolicyRule)(yyv5), d)
- }
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj9 int
- var yyb9 bool
- var yyhl9 bool = l >= 0
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv10 := &x.ObjectMeta
- yyv10.CodecDecodeSelf(d)
- }
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Rules = nil
- } else {
- yyv11 := &x.Rules
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- h.decSlicePolicyRule((*[]PolicyRule)(yyv11), d)
- }
- }
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj9-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [5]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[3] = x.Kind != ""
- yyq2[4] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(5)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ObjectMeta
- yy4.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ObjectMeta
- yy6.CodecEncodeSelf(e)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Subjects == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceSubject(([]Subject)(x.Subjects), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("subjects"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Subjects == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceSubject(([]Subject)(x.Subjects), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy12 := &x.RoleRef
- yy12.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy14 := &x.RoleRef
- yy14.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym18 := z.EncBinary()
- _ = yym18
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[4] {
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym21 := z.EncBinary()
- _ = yym21
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv4 := &x.ObjectMeta
- yyv4.CodecDecodeSelf(d)
- }
- case "subjects":
- if r.TryDecodeAsNil() {
- x.Subjects = nil
- } else {
- yyv5 := &x.Subjects
- yym6 := z.DecBinary()
- _ = yym6
- if false {
- } else {
- h.decSliceSubject((*[]Subject)(yyv5), d)
- }
- }
- case "roleRef":
- if r.TryDecodeAsNil() {
- x.RoleRef = pkg3_v1.ObjectReference{}
- } else {
- yyv7 := &x.RoleRef
- yyv7.CodecDecodeSelf(d)
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv11 := &x.ObjectMeta
- yyv11.CodecDecodeSelf(d)
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Subjects = nil
- } else {
- yyv12 := &x.Subjects
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- h.decSliceSubject((*[]Subject)(yyv12), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RoleRef = pkg3_v1.ObjectReference{}
- } else {
- yyv14 := &x.RoleRef
- yyv14.CodecDecodeSelf(d)
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[2] = x.Kind != ""
- yyq2[3] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ListMeta
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.EncExt(yy4) {
- } else {
- z.EncFallback(yy4)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ListMeta
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else if z.HasExtensions() && z.EncExt(yy6) {
- } else {
- z.EncFallback(yy6)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("items"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv4 := &x.ListMeta
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv4) {
- } else {
- z.DecFallback(yyv4, false)
- }
- }
- case "items":
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv6 := &x.Items
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- h.decSliceRoleBinding((*[]RoleBinding)(yyv6), d)
- }
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv11 := &x.ListMeta
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv11) {
- } else {
- z.DecFallback(yyv11, false)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv13 := &x.Items
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- h.decSliceRoleBinding((*[]RoleBinding)(yyv13), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[2] = x.Kind != ""
- yyq2[3] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ListMeta
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.EncExt(yy4) {
- } else {
- z.EncFallback(yy4)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ListMeta
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else if z.HasExtensions() && z.EncExt(yy6) {
- } else {
- z.EncFallback(yy6)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceRole(([]Role)(x.Items), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("items"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceRole(([]Role)(x.Items), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv4 := &x.ListMeta
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv4) {
- } else {
- z.DecFallback(yyv4, false)
- }
- }
- case "items":
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv6 := &x.Items
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- h.decSliceRole((*[]Role)(yyv6), d)
- }
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv11 := &x.ListMeta
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv11) {
- } else {
- z.DecFallback(yyv11, false)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv13 := &x.Items
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- h.decSliceRole((*[]Role)(yyv13), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[2] = x.Kind != ""
- yyq2[3] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ObjectMeta
- yy4.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ObjectMeta
- yy6.CodecEncodeSelf(e)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Rules == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rules"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Rules == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv4 := &x.ObjectMeta
- yyv4.CodecDecodeSelf(d)
- }
- case "rules":
- if r.TryDecodeAsNil() {
- x.Rules = nil
- } else {
- yyv5 := &x.Rules
- yym6 := z.DecBinary()
- _ = yym6
- if false {
- } else {
- h.decSlicePolicyRule((*[]PolicyRule)(yyv5), d)
- }
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj9 int
- var yyb9 bool
- var yyhl9 bool = l >= 0
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv10 := &x.ObjectMeta
- yyv10.CodecDecodeSelf(d)
- }
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Rules = nil
- } else {
- yyv11 := &x.Rules
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- h.decSlicePolicyRule((*[]PolicyRule)(yyv11), d)
- }
- }
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj9++
- if yyhl9 {
- yyb9 = yyj9 > l
- } else {
- yyb9 = r.CheckBreak()
- }
- if yyb9 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj9-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [5]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[3] = x.Kind != ""
- yyq2[4] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(5)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ObjectMeta
- yy4.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ObjectMeta
- yy6.CodecEncodeSelf(e)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Subjects == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceSubject(([]Subject)(x.Subjects), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("subjects"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Subjects == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceSubject(([]Subject)(x.Subjects), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy12 := &x.RoleRef
- yy12.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy14 := &x.RoleRef
- yy14.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym18 := z.EncBinary()
- _ = yym18
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[4] {
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym21 := z.EncBinary()
- _ = yym21
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv4 := &x.ObjectMeta
- yyv4.CodecDecodeSelf(d)
- }
- case "subjects":
- if r.TryDecodeAsNil() {
- x.Subjects = nil
- } else {
- yyv5 := &x.Subjects
- yym6 := z.DecBinary()
- _ = yym6
- if false {
- } else {
- h.decSliceSubject((*[]Subject)(yyv5), d)
- }
- }
- case "roleRef":
- if r.TryDecodeAsNil() {
- x.RoleRef = pkg3_v1.ObjectReference{}
- } else {
- yyv7 := &x.RoleRef
- yyv7.CodecDecodeSelf(d)
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg3_v1.ObjectMeta{}
- } else {
- yyv11 := &x.ObjectMeta
- yyv11.CodecDecodeSelf(d)
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Subjects = nil
- } else {
- yyv12 := &x.Subjects
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- h.decSliceSubject((*[]Subject)(yyv12), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RoleRef = pkg3_v1.ObjectReference{}
- } else {
- yyv14 := &x.RoleRef
- yyv14.CodecDecodeSelf(d)
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[2] = x.Kind != ""
- yyq2[3] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ListMeta
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.EncExt(yy4) {
- } else {
- z.EncFallback(yy4)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ListMeta
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else if z.HasExtensions() && z.EncExt(yy6) {
- } else {
- z.EncFallback(yy6)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("items"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv4 := &x.ListMeta
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv4) {
- } else {
- z.DecFallback(yyv4, false)
- }
- }
- case "items":
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv6 := &x.Items
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv6), d)
- }
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv11 := &x.ListMeta
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv11) {
- } else {
- z.DecFallback(yyv11, false)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv13 := &x.Items
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv13), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [4]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = true
- yyq2[2] = x.Kind != ""
- yyq2[3] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(4)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yy4 := &x.ListMeta
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.EncExt(yy4) {
- } else {
- z.EncFallback(yy4)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy6 := &x.ListMeta
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else if z.HasExtensions() && z.EncExt(yy6) {
- } else {
- z.EncFallback(yy6)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("items"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap1234 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray1234 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3 := string(yys3Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys3 {
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv4 := &x.ListMeta
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv4) {
- } else {
- z.DecFallback(yyv4, false)
- }
- }
- case "items":
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv6 := &x.Items
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- h.decSliceClusterRole((*[]ClusterRole)(yyv6), d)
- }
- }
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv11 := &x.ListMeta
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv11) {
- } else {
- z.DecFallback(yyv11, false)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv13 := &x.Items
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- h.decSliceClusterRole((*[]ClusterRole)(yyv13), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []PolicyRule{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 160)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]PolicyRule, yyrl1)
- }
- } else {
- yyv1 = make([]PolicyRule, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = PolicyRule{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, PolicyRule{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = PolicyRule{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = PolicyRule{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []PolicyRule{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []Subject{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 64)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]Subject, yyrl1)
- }
- } else {
- yyv1 = make([]Subject, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Subject{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, Subject{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Subject{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, Subject{}) // var yyz1 Subject
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Subject{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []Subject{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []RoleBinding{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 376)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]RoleBinding, yyrl1)
- }
- } else {
- yyv1 = make([]RoleBinding, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = RoleBinding{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, RoleBinding{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = RoleBinding{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = RoleBinding{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []RoleBinding{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []Role{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 264)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]Role, yyrl1)
- }
- } else {
- yyv1 = make([]Role, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Role{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, Role{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Role{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, Role{}) // var yyz1 Role
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Role{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []Role{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []ClusterRoleBinding{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 376)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]ClusterRoleBinding, yyrl1)
- }
- } else {
- yyv1 = make([]ClusterRoleBinding, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = ClusterRoleBinding{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, ClusterRoleBinding{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = ClusterRoleBinding{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = ClusterRoleBinding{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []ClusterRoleBinding{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []ClusterRole{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 264)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]ClusterRole, yyrl1)
- }
- } else {
- yyv1 = make([]ClusterRole, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = ClusterRole{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, ClusterRole{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = ClusterRole{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = ClusterRole{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []ClusterRole{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go
deleted file mode 100644
index a260fac..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-import (
- "k8s.io/kubernetes/pkg/api/unversioned"
- "k8s.io/kubernetes/pkg/api/v1"
- "k8s.io/kubernetes/pkg/runtime"
-)
-
-// Authorization is calculated against
-// 1. evaluation of ClusterRoleBindings - short circuit on match
-// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
-// 3. deny by default
-
-// PolicyRule holds information that describes a policy rule, but does not contain information
-// about who the rule applies to or which namespace the rule applies to.
-type PolicyRule struct {
- // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
- Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
- // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
- // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
- AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"`
- // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
- // the enumerated resources in any API group will be allowed.
- APIGroups []string `json:"apiGroups" protobuf:"bytes,3,rep,name=apiGroups"`
- // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
- Resources []string `json:"resources" protobuf:"bytes,4,rep,name=resources"`
- // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
- ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
- // NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
- // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
- // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
- NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
-}
-
-// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
-// or a value for non-objects such as user and group names.
-type Subject struct {
- // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
- // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
- Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
- // APIVersion holds the API group and version of the referenced object.
- APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
- // Name of the object being referenced.
- Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
- // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
- // the Authorizer should report an error.
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
-}
-
-// +genclient=true
-
-// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
-type Role struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this Role
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-}
-
-// +genclient=true
-
-// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
-// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
-// namespace only have effect in that namespace.
-type RoleBinding struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef v1.ObjectReference `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// RoleBindingList is a collection of RoleBindings
-type RoleBindingList struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of RoleBindings
- Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// RoleList is a collection of Roles
-type RoleList struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of Roles
- Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient=true
-// +nonNamespaced=true
-
-// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
-type ClusterRole struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Rules holds all the PolicyRules for this ClusterRole
- Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
-}
-
-// +genclient=true
-// +nonNamespaced=true
-
-// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
-// and adds who information via Subject.
-type ClusterRoleBinding struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Subjects holds references to the objects the role applies to.
- Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
-
- // RoleRef can only reference a ClusterRole in the global namespace.
- // If the RoleRef cannot be resolved, the Authorizer must return an error.
- RoleRef v1.ObjectReference `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
-}
-
-// ClusterRoleBindingList is a collection of ClusterRoleBindings
-type ClusterRoleBindingList struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoleBindings
- Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// ClusterRoleList is a collection of ClusterRoles
-type ClusterRoleList struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Items is a list of ClusterRoles
- Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index f1c6fdb..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1alpha1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_ClusterRole = map[string]string{
- "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this ClusterRole",
-}
-
-func (ClusterRole) SwaggerDoc() map[string]string {
- return map_ClusterRole
-}
-
-var map_ClusterRoleBinding = map[string]string{
- "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (ClusterRoleBinding) SwaggerDoc() map[string]string {
- return map_ClusterRoleBinding
-}
-
-var map_ClusterRoleBindingList = map[string]string{
- "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoleBindings",
-}
-
-func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
- return map_ClusterRoleBindingList
-}
-
-var map_ClusterRoleList = map[string]string{
- "": "ClusterRoleList is a collection of ClusterRoles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of ClusterRoles",
-}
-
-func (ClusterRoleList) SwaggerDoc() map[string]string {
- return map_ClusterRoleList
-}
-
-var map_PolicyRule = map[string]string{
- "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
- "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
- "attributeRestrictions": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.",
- "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
- "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
- "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
- "nonResourceURLs": "NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.",
-}
-
-func (PolicyRule) SwaggerDoc() map[string]string {
- return map_PolicyRule
-}
-
-var map_Role = map[string]string{
- "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
- "metadata": "Standard object's metadata.",
- "rules": "Rules holds all the PolicyRules for this Role",
-}
-
-func (Role) SwaggerDoc() map[string]string {
- return map_Role
-}
-
-var map_RoleBinding = map[string]string{
- "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
- "metadata": "Standard object's metadata.",
- "subjects": "Subjects holds references to the objects the role applies to.",
- "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
-}
-
-func (RoleBinding) SwaggerDoc() map[string]string {
- return map_RoleBinding
-}
-
-var map_RoleBindingList = map[string]string{
- "": "RoleBindingList is a collection of RoleBindings",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of RoleBindings",
-}
-
-func (RoleBindingList) SwaggerDoc() map[string]string {
- return map_RoleBindingList
-}
-
-var map_RoleList = map[string]string{
- "": "RoleList is a collection of Roles",
- "metadata": "Standard object's metadata.",
- "items": "Items is a list of Roles",
-}
-
-func (RoleList) SwaggerDoc() map[string]string {
- return map_RoleList
-}
-
-var map_Subject = map[string]string{
- "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
- "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
- "apiVersion": "APIVersion holds the API group and version of the referenced object.",
- "name": "Name of the object being referenced.",
- "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
-}
-
-func (Subject) SwaggerDoc() map[string]string {
- return map_Subject
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE