forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake.go
89 lines (68 loc) · 2.52 KB
/
fake.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package client
type FakeAction struct {
Action string
Value interface{}
}
// Fake implements Interface. Meant to be embedded into a struct to get a default
// implementation. This makes faking out just the method you want to test easier.
type Fake struct {
// Fake by default keeps a simple list of the methods that have been called.
Actions []FakeAction
}
func (c *Fake) Builds(namespace string) BuildInterface {
return &FakeBuilds{Fake: c, Namespace: namespace}
}
func (c *Fake) BuildConfigs(namespace string) BuildConfigInterface {
return &FakeBuildConfigs{Fake: c, Namespace: namespace}
}
func (c *Fake) Images(namespace string) ImageInterface {
return &FakeImages{Fake: c, Namespace: namespace}
}
func (c *Fake) ImageRepositories(namespace string) ImageRepositoryInterface {
return &FakeImageRepositories{Fake: c, Namespace: namespace}
}
func (c *Fake) ImageRepositoryMappings(namespace string) ImageRepositoryMappingInterface {
return &FakeImageRepositoryMappings{Fake: c, Namespace: namespace}
}
func (c *Fake) ImageRepositoryTags(namespace string) ImageRepositoryTagInterface {
return &FakeImageRepositoryTags{Fake: c, Namespace: namespace}
}
func (c *Fake) Deployments(namespace string) DeploymentInterface {
return &FakeDeployments{Fake: c, Namespace: namespace}
}
func (c *Fake) DeploymentConfigs(namespace string) DeploymentConfigInterface {
return &FakeDeploymentConfigs{Fake: c, Namespace: namespace}
}
func (c *Fake) Routes(namespace string) RouteInterface {
return &FakeRoutes{Fake: c, Namespace: namespace}
}
func (c *Fake) Templates(namespace string) TemplateInterface {
return &FakeTemplates{Fake: c}
}
func (c *Fake) Users() UserInterface {
return &FakeUsers{Fake: c}
}
func (c *Fake) UserIdentityMappings() UserIdentityMappingInterface {
return &FakeUserIdentityMappings{Fake: c}
}
func (c *Fake) Projects() ProjectInterface {
return &FakeProjects{Fake: c}
}
func (c *Fake) Policies(namespace string) PolicyInterface {
return &FakePolicies{Fake: c}
}
func (c *Fake) Roles(namespace string) RoleInterface {
return &FakeRoles{Fake: c}
}
func (c *Fake) RoleBindings(namespace string) RoleBindingInterface {
return &FakeRoleBindings{Fake: c}
}
func (c *Fake) PolicyBindings(namespace string) PolicyBindingInterface {
return &FakePolicyBindings{Fake: c}
}
func (c *Fake) ResourceAccessReviews(namespace string) ResourceAccessReviewInterface {
return &FakeResourceAccessReviews{Fake: c}
}
func (c *Fake) SubjectAccessReviews(namespace string) SubjectAccessReviewInterface {
return &FakeSubjectAccessReviews{Fake: c}
}