Matteo Scandolo | a428586 | 2020-12-01 18:10:10 -0800 | [diff] [blame^] | 1 | /* |
| 2 | Copyright The Kubernetes Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | // Code generated by client-gen. DO NOT EDIT. |
| 18 | |
| 19 | package v1beta1 |
| 20 | |
| 21 | import ( |
| 22 | "context" |
| 23 | |
| 24 | v1beta1 "k8s.io/api/authentication/v1beta1" |
| 25 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 26 | scheme "k8s.io/client-go/kubernetes/scheme" |
| 27 | rest "k8s.io/client-go/rest" |
| 28 | ) |
| 29 | |
| 30 | // TokenReviewsGetter has a method to return a TokenReviewInterface. |
| 31 | // A group's client should implement this interface. |
| 32 | type TokenReviewsGetter interface { |
| 33 | TokenReviews() TokenReviewInterface |
| 34 | } |
| 35 | |
| 36 | // TokenReviewInterface has methods to work with TokenReview resources. |
| 37 | type TokenReviewInterface interface { |
| 38 | Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (*v1beta1.TokenReview, error) |
| 39 | TokenReviewExpansion |
| 40 | } |
| 41 | |
| 42 | // tokenReviews implements TokenReviewInterface |
| 43 | type tokenReviews struct { |
| 44 | client rest.Interface |
| 45 | } |
| 46 | |
| 47 | // newTokenReviews returns a TokenReviews |
| 48 | func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews { |
| 49 | return &tokenReviews{ |
| 50 | client: c.RESTClient(), |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. |
| 55 | func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { |
| 56 | result = &v1beta1.TokenReview{} |
| 57 | err = c.client.Post(). |
| 58 | Resource("tokenreviews"). |
| 59 | VersionedParams(&opts, scheme.ParameterCodec). |
| 60 | Body(tokenReview). |
| 61 | Do(ctx). |
| 62 | Into(result) |
| 63 | return |
| 64 | } |