...
1
16
17
18
19 package v1alpha1
20
21 import (
22 "context"
23
24 v1alpha1 "k8s.io/api/authentication/v1alpha1"
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
31
32 type SelfSubjectReviewsGetter interface {
33 SelfSubjectReviews() SelfSubjectReviewInterface
34 }
35
36
37 type SelfSubjectReviewInterface interface {
38 Create(ctx context.Context, selfSubjectReview *v1alpha1.SelfSubjectReview, opts v1.CreateOptions) (*v1alpha1.SelfSubjectReview, error)
39 SelfSubjectReviewExpansion
40 }
41
42
43 type selfSubjectReviews struct {
44 client rest.Interface
45 }
46
47
48 func newSelfSubjectReviews(c *AuthenticationV1alpha1Client) *selfSubjectReviews {
49 return &selfSubjectReviews{
50 client: c.RESTClient(),
51 }
52 }
53
54
55 func (c *selfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1alpha1.SelfSubjectReview, opts v1.CreateOptions) (result *v1alpha1.SelfSubjectReview, err error) {
56 result = &v1alpha1.SelfSubjectReview{}
57 err = c.client.Post().
58 Resource("selfsubjectreviews").
59 VersionedParams(&opts, scheme.ParameterCodec).
60 Body(selfSubjectReview).
61 Do(ctx).
62 Into(result)
63 return
64 }
65
View as plain text