summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go')
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go74
1 files changed, 37 insertions, 37 deletions
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
index 9c4fa915e..0c7e49f0d 100644
--- a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
@@ -1,5 +1,5 @@
/*
-Copyright 2017 The Kubernetes Authors.
+Copyright 2018 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.
@@ -17,11 +17,11 @@ limitations under the License.
package v1alpha1
import (
+ v1alpha1 "k8s.io/api/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
- v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
rest "k8s.io/client-go/rest"
)
@@ -58,6 +58,41 @@ func newRoles(c *RbacV1alpha1Client, namespace string) *roles {
}
}
+// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
+func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Roles that match those selectors.
+func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) {
+ result = &v1alpha1.RoleList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roles.
+func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
func (c *roles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
result = &v1alpha1.Role{}
@@ -105,41 +140,6 @@ func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListO
Error()
}
-// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
-func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) {
- result = &v1alpha1.Role{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Roles that match those selectors.
-func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) {
- result = &v1alpha1.RoleList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested roles.
-func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("roles").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
// Patch applies the patch and returns the patched role.
func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) {
result = &v1alpha1.Role{}