create the methods in the generated expansion files

pull/6/head
xilabao 2017-09-01 19:15:59 +08:00
parent ed8adf6e51
commit 790374da10
15 changed files with 192 additions and 6 deletions

View File

@ -16,6 +16,7 @@ go_library(
"selfsubjectaccessreview.go",
"selfsubjectaccessreview_expansion.go",
"selfsubjectrulesreview.go",
"selfsubjectrulesreview_expansion.go",
"subjectaccessreview.go",
"subjectaccessreview_expansion.go",
],

View File

@ -16,6 +16,7 @@ go_library(
"fake_selfsubjectaccessreview.go",
"fake_selfsubjectaccessreview_expansion.go",
"fake_selfsubjectrulesreview.go",
"fake_selfsubjectrulesreview_expansion.go",
"fake_subjectaccessreview.go",
"fake_subjectaccessreview_expansion.go",
],

View File

@ -0,0 +1,27 @@
/*
Copyright 2017 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
core "k8s.io/client-go/testing"
authorizationapi "k8s.io/kubernetes/pkg/apis/authorization"
)
func (c *FakeSelfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{})
return obj.(*authorizationapi.SelfSubjectRulesReview), err
}

View File

@ -15,5 +15,3 @@ limitations under the License.
*/
package internalversion
type SelfSubjectRulesReviewExpansion interface{}

View File

@ -0,0 +1,35 @@
/*
Copyright 2017 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package internalversion
import (
authorizationapi "k8s.io/kubernetes/pkg/apis/authorization"
)
type SelfSubjectRulesReviewExpansion interface {
Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
}
func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
result = &authorizationapi.SelfSubjectRulesReview{}
err = c.client.Post().
Resource("selfsubjectrulesreviews").
Body(srr).
Do().
Into(result)
return
}

View File

@ -16,6 +16,7 @@ go_library(
"selfsubjectaccessreview.go",
"selfsubjectaccessreview_expansion.go",
"selfsubjectrulesreview.go",
"selfsubjectrulesreview_expansion.go",
"subjectaccessreview.go",
"subjectaccessreview_expansion.go",
],

View File

@ -15,6 +15,7 @@ go_library(
"fake_selfsubjectaccessreview.go",
"fake_selfsubjectaccessreview_expansion.go",
"fake_selfsubjectrulesreview.go",
"fake_selfsubjectrulesreview_expansion.go",
"fake_subjectaccessreview.go",
"fake_subjectaccessreview_expansion.go",
],

View File

@ -0,0 +1,27 @@
/*
Copyright 2017 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
authorizationapi "k8s.io/api/authorization/v1"
core "k8s.io/client-go/testing"
)
func (c *FakeSelfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{})
return obj.(*authorizationapi.SelfSubjectRulesReview), err
}

View File

@ -15,5 +15,3 @@ limitations under the License.
*/
package v1
type SelfSubjectRulesReviewExpansion interface{}

View File

@ -0,0 +1,35 @@
/*
Copyright 2017 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
authorizationapi "k8s.io/api/authorization/v1"
)
type SelfSubjectRulesReviewExpansion interface {
Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
}
func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
result = &authorizationapi.SelfSubjectRulesReview{}
err = c.client.Post().
Resource("selfsubjectrulesreviews").
Body(srr).
Do().
Into(result)
return
}

View File

@ -16,6 +16,7 @@ go_library(
"selfsubjectaccessreview.go",
"selfsubjectaccessreview_expansion.go",
"selfsubjectrulesreview.go",
"selfsubjectrulesreview_expansion.go",
"subjectaccessreview.go",
"subjectaccessreview_expansion.go",
],

View File

@ -16,6 +16,7 @@ go_library(
"fake_selfsubjectaccessreview.go",
"fake_selfsubjectaccessreview_expansion.go",
"fake_selfsubjectrulesreview.go",
"fake_selfsubjectrulesreview_expansion.go",
"fake_subjectaccessreview.go",
"fake_subjectaccessreview_expansion.go",
],

View File

@ -0,0 +1,27 @@
/*
Copyright 2017 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
authorizationapi "k8s.io/api/authorization/v1beta1"
core "k8s.io/client-go/testing"
)
func (c *FakeSelfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{})
return obj.(*authorizationapi.SelfSubjectRulesReview), err
}

View File

@ -15,5 +15,3 @@ limitations under the License.
*/
package v1beta1
type SelfSubjectRulesReviewExpansion interface{}

View File

@ -0,0 +1,35 @@
/*
Copyright 2017 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
import (
authorizationapi "k8s.io/api/authorization/v1beta1"
)
type SelfSubjectRulesReviewExpansion interface {
Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error)
}
func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) {
result = &authorizationapi.SelfSubjectRulesReview{}
err = c.client.Post().
Resource("selfsubjectrulesreviews").
Body(srr).
Do().
Into(result)
return
}