...
1
16
17
18
19 package v1
20
21 import (
22 "context"
23
24 v1 "k8s.io/api/authentication/v1"
25 metav1 "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
31
32 type TokenReviewsGetter interface {
33 TokenReviews() TokenReviewInterface
34 }
35
36
37 type TokenReviewInterface interface {
38 Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (*v1.TokenReview, error)
39 TokenReviewExpansion
40 }
41
42
43 type tokenReviews struct {
44 client rest.Interface
45 }
46
47
48 func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
49 return &tokenReviews{
50 client: c.RESTClient(),
51 }
52 }
53
54
55 func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) {
56 result = &v1.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 }
65
View as plain text