-
Notifications
You must be signed in to change notification settings - Fork 48
/
manager_mock.go
172 lines (147 loc) · 6.05 KB
/
manager_mock.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// Code generated by MockGen. DO NOT EDIT.
// Source: manager.go
// Package mock_manager is a generated GoMock package.
package mock_manager
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
q "github.com/horizoncd/horizon/lib/q"
models "github.com/horizoncd/horizon/pkg/user/models"
)
// MockManager is a mock of Manager interface.
type MockManager struct {
ctrl *gomock.Controller
recorder *MockManagerMockRecorder
}
// MockManagerMockRecorder is the mock recorder for MockManager.
type MockManagerMockRecorder struct {
mock *MockManager
}
// NewMockManager creates a new mock instance.
func NewMockManager(ctrl *gomock.Controller) *MockManager {
mock := &MockManager{ctrl: ctrl}
mock.recorder = &MockManagerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockManager) EXPECT() *MockManagerMockRecorder {
return m.recorder
}
// Create mocks base method.
func (m *MockManager) Create(ctx context.Context, user *models.User) (*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", ctx, user)
ret0, _ := ret[0].(*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Create indicates an expected call of Create.
func (mr *MockManagerMockRecorder) Create(ctx, user interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockManager)(nil).Create), ctx, user)
}
// DeleteUser mocks base method.
func (m *MockManager) DeleteUser(ctx context.Context, id uint) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteUser", ctx, id)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteUser indicates an expected call of DeleteUser.
func (mr *MockManagerMockRecorder) DeleteUser(ctx, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUser", reflect.TypeOf((*MockManager)(nil).DeleteUser), ctx, id)
}
// GetUserByID mocks base method.
func (m *MockManager) GetUserByID(ctx context.Context, userID uint) (*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetUserByID", ctx, userID)
ret0, _ := ret[0].(*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetUserByID indicates an expected call of GetUserByID.
func (mr *MockManagerMockRecorder) GetUserByID(ctx, userID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByID", reflect.TypeOf((*MockManager)(nil).GetUserByID), ctx, userID)
}
// GetUserByIDP mocks base method.
func (m *MockManager) GetUserByIDP(ctx context.Context, email, idp string) (*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetUserByIDP", ctx, email, idp)
ret0, _ := ret[0].(*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetUserByIDP indicates an expected call of GetUserByIDP.
func (mr *MockManagerMockRecorder) GetUserByIDP(ctx, email, idp interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByIDP", reflect.TypeOf((*MockManager)(nil).GetUserByIDP), ctx, email, idp)
}
// GetUserByIDs mocks base method.
func (m *MockManager) GetUserByIDs(ctx context.Context, userIDs []uint) ([]*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetUserByIDs", ctx, userIDs)
ret0, _ := ret[0].([]*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetUserByIDs indicates an expected call of GetUserByIDs.
func (mr *MockManagerMockRecorder) GetUserByIDs(ctx, userIDs interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByIDs", reflect.TypeOf((*MockManager)(nil).GetUserByIDs), ctx, userIDs)
}
// GetUserMapByIDs mocks base method.
func (m *MockManager) GetUserMapByIDs(ctx context.Context, userIDs []uint) (map[uint]*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetUserMapByIDs", ctx, userIDs)
ret0, _ := ret[0].(map[uint]*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetUserMapByIDs indicates an expected call of GetUserMapByIDs.
func (mr *MockManagerMockRecorder) GetUserMapByIDs(ctx, userIDs interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserMapByIDs", reflect.TypeOf((*MockManager)(nil).GetUserMapByIDs), ctx, userIDs)
}
// List mocks base method.
func (m *MockManager) List(ctx context.Context, query *q.Query) (int64, []*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", ctx, query)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].([]*models.User)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// List indicates an expected call of List.
func (mr *MockManagerMockRecorder) List(ctx, query interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockManager)(nil).List), ctx, query)
}
// ListByEmail mocks base method.
func (m *MockManager) ListByEmail(ctx context.Context, emails []string) ([]*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListByEmail", ctx, emails)
ret0, _ := ret[0].([]*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListByEmail indicates an expected call of ListByEmail.
func (mr *MockManagerMockRecorder) ListByEmail(ctx, emails interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByEmail", reflect.TypeOf((*MockManager)(nil).ListByEmail), ctx, emails)
}
// UpdateByID mocks base method.
func (m *MockManager) UpdateByID(ctx context.Context, id uint, db *models.User) (*models.User, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateByID", ctx, id, db)
ret0, _ := ret[0].(*models.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateByID indicates an expected call of UpdateByID.
func (mr *MockManagerMockRecorder) UpdateByID(ctx, id, db interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateByID", reflect.TypeOf((*MockManager)(nil).UpdateByID), ctx, id, db)
}