-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmockDb.go
284 lines (242 loc) · 9.15 KB
/
mockDb.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
package six910mysql
/*
Six910 is a shopping cart and E-commerce system.
Copyright (C) 2020 Ulbora Labs LLC. (www.ulboralabs.com)
All rights reserved.
Copyright (C) 2020 Ken Williamson
All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// go mod init github.com/Ulbora/six910-mysql
import (
lg "github.com/Ulbora/Level_Logger"
dbi "github.com/Ulbora/dbinterface"
mdb "github.com/Ulbora/six910-database-interface"
sdbi "github.com/Ulbora/six910-database-interface"
)
//MockSix910Mysql MockSix910Mysql
type MockSix910Mysql struct {
DB dbi.Database
Log *lg.Logger
MockAddSecuritySuccess bool
MockSecurityID int64
MockUpdateSecuritySuccess bool
MockSecurity *mdb.Security
MockDeleteSecuritySuccess bool
MockAddStoreSuccess bool
MockStoreID int64
MockUpdateStoreSuccess bool
MockStore *mdb.Store
MockStoreCount int64
MockDeleteStoreSuccess bool
MockAddCustomerSuccess bool
MockCustomerID int64
MockUpdateCustomerSuccess bool
MockCustomer *mdb.Customer
MockCustomerList *[]mdb.Customer
MockDeleteCustomerSuccess bool
MockAddLocalAccountSuccess bool
MockLocalAccountID int64
MockUpdateLocalAccountSuccess bool
MockLocalAccount *mdb.LocalAccount
MockLocalAccountList *[]mdb.LocalAccount
MockDeleteLocalAccountSuccess bool
MockAddDistributorSuccess bool
MockDistributorID int64
MockUpdateDistributorSuccess bool
MockDistributor *mdb.Distributor
MockDistributorList *[]mdb.Distributor
MockDeleteDistributorSuccess bool
MockAddCartSuccess bool
MockCartID int64
MockUpdateCartSuccess bool
MockCart *mdb.Cart
MockCartList *[]mdb.Cart
MockDeleteCartSuccess bool
MockAddCartItemSuccess bool
MockCartItemID int64
MockUpdateCartItemSuccess bool
MockCartItem *mdb.CartItem
MockCartItemList *[]mdb.CartItem
MockDeleteCartItemSuccess bool
MockAddAddressSuccess bool
MockAddressID int64
MockUpdateAddressSuccess bool
MockAddress *mdb.Address
MockAddressList *[]mdb.Address
MockDeleteAddressSuccess bool
MockAddCategorySuccess bool
MockCategoryID int64
MockUpdateCategorySuccess bool
MockCategory *mdb.Category
MockCategoryList *[]mdb.Category
MockDeleteCategorySuccess bool
MockAddShippingMethodSuccess bool
MockShippingMethodID int64
MockUpdateShippingMethodSuccess bool
MockShippingMethod *mdb.ShippingMethod
MockShippingMethodList *[]mdb.ShippingMethod
MockDeleteShippingMethodSuccess bool
MockAddInsuranceSuccess bool
MockInsuranceID int64
MockUpdateInsuranceSuccess bool
MockInsurance *mdb.Insurance
MockInsuranceList *[]mdb.Insurance
MockDeleteInsuranceSuccess bool
MockAddProductSuccess bool
MockProductID int64
MockUpdateProductSuccess bool
MockUpdateProductQuantitySuccess bool
MockProduct *mdb.Product
MockProductList *[]mdb.Product
MockProductSubSkuList *[]mdb.Product
MockProductSearchList *[]mdb.Product
MockProductIDList *[]int64
MockDeleteProductSuccess bool
MockDeleteSubProductSuccess bool
MockAddRegionSuccess bool
MockRegionID int64
MockUpdateRegionSuccess bool
MockRegion *mdb.Region
MockRegionList *[]mdb.Region
MockDeleteRegionSuccess bool
MockAddSubRegionSuccess bool
MockSubRegionID int64
MockUpdateSubRegionSuccess bool
MockSubRegion *mdb.SubRegion
MockSubRegionList *[]mdb.SubRegion
MockDeleteSubRegionSuccess bool
MockAddExcludedSubRegionSuccess bool
MockExcludedSubRegionID int64
MockUpdateExcludedSubRegionSuccess bool
MockExcludedSubRegion *mdb.ExcludedSubRegion
MockExcludedSubRegionList *[]mdb.ExcludedSubRegion
MockDeleteExcludedSubRegionSuccess bool
MockAddIncludedSubRegionSuccess bool
MockIncludedSubRegionID int64
MockUpdateIncludedSubRegionSuccess bool
MockIncludedSubRegion *mdb.IncludedSubRegion
MockIncludedSubRegionList *[]mdb.IncludedSubRegion
MockDeleteIncludedSubRegionSuccess bool
MockAddZoneZipSuccess bool
MockZoneZipID int64
MockUpdateZoneZipSuccess bool
MockZoneZipRegion *mdb.ZoneZip
MockZoneZipList *[]mdb.ZoneZip
MockDeleteZoneZipSuccess bool
MockAddProductCategorySuccess bool
MockProductCategoryID int64
MockUpdateProductCategorySuccess bool
MockProductCategoryRegion *mdb.ProductCategory
MockProductCategoryList *[]mdb.ProductCategory
MockDeleteProductCategorySuccess bool
MockCategoryIDList *[]int64
MockAddOrderSuccess bool
MockOrderID int64
MockUpdateOrderSuccess bool
MockOrder *mdb.Order
MockOrderList *[]mdb.Order
MockOrderCountData *[]mdb.OrderCountData
MockOrderSalesData *[]mdb.OrderSalesData
MockDeleteOrderSuccess bool
MockAddOrderItemSuccess bool
MockOrderItemID int64
MockUpdateOrderItemSuccess bool
MockOrderItem *mdb.OrderItem
MockOrderItemList *[]mdb.OrderItem
MockDeleteOrderItemSuccess bool
MockAddOrderCommentSuccess bool
MockOrderCommentID int64
MockUpdateOrderCommentSuccess bool
MockOrderComment *mdb.OrderComment
MockOrderCommentList *[]mdb.OrderComment
MockDeleteOrderCommentSuccess bool
MockAddOrderTransactionSuccess bool
MockOrderTransactionID int64
MockUpdateOrderTransactionSuccess bool
MockOrderTransaction *mdb.OrderTransaction
MockOrderTransactionList *[]mdb.OrderTransaction
MockDeleteOrderTransactionSuccess bool
MockAddShipmentSuccess bool
MockShipmentID int64
MockUpdateShipmentSuccess bool
MockShipment *mdb.Shipment
MockShipmentList *[]mdb.Shipment
MockDeleteShipmentSuccess bool
MockAddShipmentBoxSuccess bool
MockShipmentBoxID int64
MockUpdateShipmentBoxSuccess bool
MockShipmentBox *mdb.ShipmentBox
MockShipmentBoxList *[]mdb.ShipmentBox
MockDeleteShipmentBoxSuccess bool
MockAddShipmentItemSuccess bool
MockShipmentItemID int64
MockUpdateShipmentItemSuccess bool
MockShipmentItem *mdb.ShipmentItem
MockShipmentItemList *[]mdb.ShipmentItem
MockDeleteShipmentItemSuccess bool
MockAddPluginSuccess bool
MockPluginID int64
MockUpdatePluginSuccess bool
MockPlugin *mdb.Plugins
MockPluginList *[]mdb.Plugins
MockDeletePluginSuccess bool
MockAddStorePluginSuccess bool
MockStorePluginID int64
MockUpdateStorePluginSuccess bool
MockStorePlugin *mdb.StorePlugins
MockStorePluginList *[]mdb.StorePlugins
MockDeleteStorePluginSuccess bool
MockAddPaymentGatewaySuccess bool
MockPaymentGatewayID int64
MockUpdatePaymentGatewaySuccess bool
MockPaymentGateway *mdb.PaymentGateway
MockPaymentGatewayList *[]mdb.PaymentGateway
MockDeletePaymentGatewaySuccess bool
MockAddShippingCarrierSuccess bool
MockShippingCarrierID int64
MockUpdateShippingCarrierSuccess bool
MockShippingCarrier *mdb.ShippingCarrier
MockShippingCarrierList *[]mdb.ShippingCarrier
MockDeleteShippingCarrierSuccess bool
MockAddLocalDataStoreSuccess bool
MockLocalDataStoreID int64
MockUpdateLocalDataStoreSuccess bool
MockLocalDataStore *mdb.LocalDataStore
MockLocalDataStoreList *[]mdb.LocalDataStore
MockDeleteLocalDataStoreSuccess bool
MockAddInstancesSuccess bool
MockInstancesID int64
MockUpdateInstancesSuccess bool
MockInstances *mdb.Instances
MockInstancesList *[]mdb.Instances
MockDeleteInstancesSuccess bool
MockAddDataStoreWriteLockSuccess bool
MockDataStoreWriteLockID int64
MockUpdateDataStoreWriteLockSuccess bool
MockDataStoreWriteLock *mdb.DataStoreWriteLock
MockDataStoreWriteLockList *[]mdb.DataStoreWriteLock
MockDeleteDataStoreWriteLockSuccess bool
MockAddTaxRateSuccess bool
MockTaxRateID int64
MockUpdateTaxRateSuccess bool
MockTaxRate *mdb.TaxRate
MockTaxRateList *[]mdb.TaxRate
MockDeleteTaxRateSuccess bool
MockManufacturerList *[]string
MockAddVisitorResp bool
MockVisitorData *[]mdb.VisitorData
}
//GetNew GetNew
func (d *MockSix910Mysql) GetNew() sdbi.Six910DB {
return d
}