summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go')
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go70
1 files changed, 35 insertions, 35 deletions
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
index 3092bd8e1..a1c59959d 100644
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.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 v1
import (
+ v1 "k8s.io/api/core/v1"
meta_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"
- v1 "k8s.io/client-go/pkg/api/v1"
rest "k8s.io/client-go/rest"
)
@@ -57,6 +57,38 @@ func newNamespaces(c *CoreV1Client) *namespaces {
}
}
+// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
+func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Get().
+ Resource("namespaces").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
+func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
+ result = &v1.NamespaceList{}
+ err = c.client.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested namespaces.
+func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any.
func (c *namespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
result = &v1.Namespace{}
@@ -81,7 +113,7 @@ func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err
}
// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace, err error) {
result = &v1.Namespace{}
@@ -115,38 +147,6 @@ func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOption
Error()
}
-// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
-func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) {
- result = &v1.Namespace{}
- err = c.client.Get().
- Resource("namespaces").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
-func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
- result = &v1.NamespaceList{}
- err = c.client.Get().
- Resource("namespaces").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested namespaces.
-func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Resource("namespaces").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
// Patch applies the patch and returns the patched namespace.
func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
result = &v1.Namespace{}