forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_policybindings.go
38 lines (30 loc) · 1.53 KB
/
fake_policybindings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package client
import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
authorizationapi "github.com/openshift/origin/pkg/authorization/api"
)
type FakePolicyBindings struct {
Fake *Fake
}
func (c *FakePolicyBindings) List(label labels.Selector, field fields.Selector) (*authorizationapi.PolicyBindingList, error) {
obj, err := c.Fake.Invokes(FakeAction{Action: "list-policyBindings"}, &authorizationapi.PolicyBindingList{})
return obj.(*authorizationapi.PolicyBindingList), err
}
func (c *FakePolicyBindings) Get(name string) (*authorizationapi.PolicyBinding, error) {
obj, err := c.Fake.Invokes(FakeAction{Action: "get-policyBinding"}, &authorizationapi.PolicyBinding{})
return obj.(*authorizationapi.PolicyBinding), err
}
func (c *FakePolicyBindings) Create(policyBinding *authorizationapi.PolicyBinding) (*authorizationapi.PolicyBinding, error) {
obj, err := c.Fake.Invokes(FakeAction{Action: "create-policyBinding", Value: policyBinding}, &authorizationapi.PolicyBinding{})
return obj.(*authorizationapi.PolicyBinding), err
}
func (c *FakePolicyBindings) Delete(name string) error {
c.Fake.Actions = append(c.Fake.Actions, FakeAction{Action: "delete-policyBinding", Value: name})
return nil
}
func (c *FakePolicyBindings) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error) {
c.Fake.Actions = append(c.Fake.Actions, FakeAction{Action: "watch-policyBinding"})
return nil, nil
}