forked from ugodiggi/ladon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanager_mock_test.go
135 lines (112 loc) · 4.09 KB
/
manager_mock_test.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*
* Copyright © 2016-2018 Aeneas Rekkas <aeneas+oss@aeneas.io>
*
* 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.
*
* @author Aeneas Rekkas <aeneas+oss@aeneas.io>
* @copyright 2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io>
* @license Apache-2.0
*/
// Automatically generated by MockGen. DO NOT EDIT!
// Source: github.com/UrbanCompass/ladon (interfaces: Manager)
package ladon_test
import (
gomock "github.com/golang/mock/gomock"
ladon "github.com/UrbanCompass/ladon"
)
// Mock of Manager interface
type MockManager struct {
ctrl *gomock.Controller
recorder *_MockManagerRecorder
}
// Recorder for MockManager (not exported)
type _MockManagerRecorder struct {
mock *MockManager
}
func NewMockManager(ctrl *gomock.Controller) *MockManager {
mock := &MockManager{ctrl: ctrl}
mock.recorder = &_MockManagerRecorder{mock}
return mock
}
func (_m *MockManager) EXPECT() *_MockManagerRecorder {
return _m.recorder
}
func (_m *MockManager) Create(_param0 ladon.Policy) error {
ret := _m.ctrl.Call(_m, "Create", _param0)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockManagerRecorder) Create(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0)
}
func (_m *MockManager) Delete(_param0 string) error {
ret := _m.ctrl.Call(_m, "Delete", _param0)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockManagerRecorder) Delete(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0)
}
func (_m *MockManager) FindRequestCandidates(_param0 *ladon.Request) (ladon.Policies, error) {
ret := _m.ctrl.Call(_m, "FindRequestCandidates", _param0)
ret0, _ := ret[0].(ladon.Policies)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockManagerRecorder) FindRequestCandidates(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "FindRequestCandidates", arg0)
}
func (_m *MockManager) FindPoliciesForSubject(_param0 string) (ladon.Policies, error) {
ret := _m.ctrl.Call(_m, "FindPoliciesForSubject", _param0)
ret0, _ := ret[0].(ladon.Policies)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockManagerRecorder) FindPoliciesForSubject(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "FindPoliciesForSubject", arg0)
}
func (_m *MockManager) FindPoliciesForResource(_param0 string) (ladon.Policies, error) {
ret := _m.ctrl.Call(_m, "FindPoliciesForResource", _param0)
ret0, _ := ret[0].(ladon.Policies)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockManagerRecorder) FindPoliciesForResource(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "FindPoliciesForResource", arg0)
}
func (_m *MockManager) Get(_param0 string) (ladon.Policy, error) {
ret := _m.ctrl.Call(_m, "Get", _param0)
ret0, _ := ret[0].(ladon.Policy)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockManagerRecorder) Get(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0)
}
func (_m *MockManager) GetAll(_param0 int64, _param1 int64) (ladon.Policies, error) {
ret := _m.ctrl.Call(_m, "GetAll", _param0, _param1)
ret0, _ := ret[0].(ladon.Policies)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockManagerRecorder) GetAll(arg0, arg1 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetAll", arg0, arg1)
}
func (_m *MockManager) Update(_param0 ladon.Policy) error {
ret := _m.ctrl.Call(_m, "Update", _param0)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockManagerRecorder) Update(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0)
}