~evanj/cms

ref: 5eb977545bd0bfaacf289952a8b7f5a273168ab6 cms/internal/c/user/mock.go -rw-r--r-- 6.1 KiB
5eb97754Evan M Jones Chore(Error2 -> Error): Swapped Error impl. for Error2 in all 10 months ago
                                                                                
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
173
174
175
176
177
178
179
// Code generated by MockGen. DO NOT EDIT.
// Source: user.go

// Package user is a generated GoMock package.
package user

import (
	space "git.sr.ht/~evanj/cms/internal/m/space"
	tier "git.sr.ht/~evanj/cms/internal/m/tier"
	user "git.sr.ht/~evanj/cms/internal/m/user"
	gomock "github.com/golang/mock/gomock"
	reflect "reflect"
)

// Mockdber is a mock of dber interface
type Mockdber struct {
	ctrl     *gomock.Controller
	recorder *MockdberMockRecorder
}

// MockdberMockRecorder is the mock recorder for Mockdber
type MockdberMockRecorder struct {
	mock *Mockdber
}

// NewMockdber creates a new mock instance
func NewMockdber(ctrl *gomock.Controller) *Mockdber {
	mock := &Mockdber{ctrl: ctrl}
	mock.recorder = &MockdberMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *Mockdber) EXPECT() *MockdberMockRecorder {
	return m.recorder
}

// UserNew mocks base method
func (m *Mockdber) UserNew(username, password, verifyPassword string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserNew", username, password, verifyPassword)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserNew indicates an expected call of UserNew
func (mr *MockdberMockRecorder) UserNew(username, password, verifyPassword interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserNew", reflect.TypeOf((*Mockdber)(nil).UserNew), username, password, verifyPassword)
}

// UserGet mocks base method
func (m *Mockdber) UserGet(username, password string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserGet", username, password)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserGet indicates an expected call of UserGet
func (mr *MockdberMockRecorder) UserGet(username, password interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserGet", reflect.TypeOf((*Mockdber)(nil).UserGet), username, password)
}

// UserGetFromToken mocks base method
func (m *Mockdber) UserGetFromToken(token string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserGetFromToken", token)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserGetFromToken indicates an expected call of UserGetFromToken
func (mr *MockdberMockRecorder) UserGetFromToken(token interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserGetFromToken", reflect.TypeOf((*Mockdber)(nil).UserGetFromToken), token)
}

// UserSetEmail mocks base method
func (m *Mockdber) UserSetEmail(u user.User, email string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserSetEmail", u, email)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserSetEmail indicates an expected call of UserSetEmail
func (mr *MockdberMockRecorder) UserSetEmail(u, email interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserSetEmail", reflect.TypeOf((*Mockdber)(nil).UserSetEmail), u, email)
}

// UserSetPassword mocks base method
func (m *Mockdber) UserSetPassword(u user.User, current, password, verify string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserSetPassword", u, current, password, verify)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserSetPassword indicates an expected call of UserSetPassword
func (mr *MockdberMockRecorder) UserSetPassword(u, current, password, verify interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserSetPassword", reflect.TypeOf((*Mockdber)(nil).UserSetPassword), u, current, password, verify)
}

// SpacesPerUser mocks base method
func (m *Mockdber) SpacesPerUser(user user.User, before int) (space.SpaceList, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SpacesPerUser", user, before)
	ret0, _ := ret[0].(space.SpaceList)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// SpacesPerUser indicates an expected call of SpacesPerUser
func (mr *MockdberMockRecorder) SpacesPerUser(user, before interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacesPerUser", reflect.TypeOf((*Mockdber)(nil).SpacesPerUser), user, before)
}

// MockStriper is a mock of Striper interface
type MockStriper struct {
	ctrl     *gomock.Controller
	recorder *MockStriperMockRecorder
}

// MockStriperMockRecorder is the mock recorder for MockStriper
type MockStriperMockRecorder struct {
	mock *MockStriper
}

// NewMockStriper creates a new mock instance
func NewMockStriper(ctrl *gomock.Controller) *MockStriper {
	mock := &MockStriper{ctrl: ctrl}
	mock.recorder = &MockStriperMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockStriper) EXPECT() *MockStriperMockRecorder {
	return m.recorder
}

// StartCheckout mocks base method
func (m *MockStriper) StartCheckout(user user.User, t tier.Tier) (string, string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StartCheckout", user, t)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(string)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// StartCheckout indicates an expected call of StartCheckout
func (mr *MockStriperMockRecorder) StartCheckout(user, t interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartCheckout", reflect.TypeOf((*MockStriper)(nil).StartCheckout), user, t)
}

// CancelSubscription mocks base method
func (m *MockStriper) CancelSubscription(user user.User) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CancelSubscription", user)
	ret0, _ := ret[0].(error)
	return ret0
}

// CancelSubscription indicates an expected call of CancelSubscription
func (mr *MockStriperMockRecorder) CancelSubscription(user interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelSubscription", reflect.TypeOf((*MockStriper)(nil).CancelSubscription), user)
}