/
chain_scoped_config.go
591 lines (463 loc) · 11.8 KB
/
chain_scoped_config.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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
// Code generated by mockery v2.38.0. DO NOT EDIT.
package mocks
import (
config "github.com/O1MaGnUmO1/erinaceus-vrf/core/chains/evm/config"
coreconfig "github.com/O1MaGnUmO1/erinaceus-vrf/core/config"
mock "github.com/stretchr/testify/mock"
time "time"
uuid "github.com/google/uuid"
zapcore "go.uber.org/zap/zapcore"
)
// ChainScopedConfig is an autogenerated mock type for the ChainScopedConfig type
type ChainScopedConfig struct {
mock.Mock
}
// AppID provides a mock function with given fields:
func (_m *ChainScopedConfig) AppID() uuid.UUID {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for AppID")
}
var r0 uuid.UUID
if rf, ok := ret.Get(0).(func() uuid.UUID); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(uuid.UUID)
}
}
return r0
}
// AuditLogger provides a mock function with given fields:
func (_m *ChainScopedConfig) AuditLogger() coreconfig.AuditLogger {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for AuditLogger")
}
var r0 coreconfig.AuditLogger
if rf, ok := ret.Get(0).(func() coreconfig.AuditLogger); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.AuditLogger)
}
}
return r0
}
// AutoPprof provides a mock function with given fields:
func (_m *ChainScopedConfig) AutoPprof() coreconfig.AutoPprof {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for AutoPprof")
}
var r0 coreconfig.AutoPprof
if rf, ok := ret.Get(0).(func() coreconfig.AutoPprof); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.AutoPprof)
}
}
return r0
}
// CosmosEnabled provides a mock function with given fields:
func (_m *ChainScopedConfig) CosmosEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for CosmosEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Database provides a mock function with given fields:
func (_m *ChainScopedConfig) Database() coreconfig.Database {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Database")
}
var r0 coreconfig.Database
if rf, ok := ret.Get(0).(func() coreconfig.Database); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Database)
}
}
return r0
}
// EVM provides a mock function with given fields:
func (_m *ChainScopedConfig) EVM() config.EVM {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for EVM")
}
var r0 config.EVM
if rf, ok := ret.Get(0).(func() config.EVM); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.EVM)
}
}
return r0
}
// EVMEnabled provides a mock function with given fields:
func (_m *ChainScopedConfig) EVMEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for EVMEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// EVMRPCEnabled provides a mock function with given fields:
func (_m *ChainScopedConfig) EVMRPCEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for EVMRPCEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Feature provides a mock function with given fields:
func (_m *ChainScopedConfig) Feature() coreconfig.Feature {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Feature")
}
var r0 coreconfig.Feature
if rf, ok := ret.Get(0).(func() coreconfig.Feature); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Feature)
}
}
return r0
}
// Insecure provides a mock function with given fields:
func (_m *ChainScopedConfig) Insecure() coreconfig.Insecure {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Insecure")
}
var r0 coreconfig.Insecure
if rf, ok := ret.Get(0).(func() coreconfig.Insecure); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Insecure)
}
}
return r0
}
// InsecureFastScrypt provides a mock function with given fields:
func (_m *ChainScopedConfig) InsecureFastScrypt() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for InsecureFastScrypt")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// JobPipeline provides a mock function with given fields:
func (_m *ChainScopedConfig) JobPipeline() coreconfig.JobPipeline {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for JobPipeline")
}
var r0 coreconfig.JobPipeline
if rf, ok := ret.Get(0).(func() coreconfig.JobPipeline); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.JobPipeline)
}
}
return r0
}
// Keeper provides a mock function with given fields:
func (_m *ChainScopedConfig) Keeper() coreconfig.Keeper {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Keeper")
}
var r0 coreconfig.Keeper
if rf, ok := ret.Get(0).(func() coreconfig.Keeper); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Keeper)
}
}
return r0
}
// Log provides a mock function with given fields:
func (_m *ChainScopedConfig) Log() coreconfig.Log {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Log")
}
var r0 coreconfig.Log
if rf, ok := ret.Get(0).(func() coreconfig.Log); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Log)
}
}
return r0
}
// LogConfiguration provides a mock function with given fields: log, warn
func (_m *ChainScopedConfig) LogConfiguration(log coreconfig.LogfFn, warn coreconfig.LogfFn) {
_m.Called(log, warn)
}
// Password provides a mock function with given fields:
func (_m *ChainScopedConfig) Password() coreconfig.Password {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Password")
}
var r0 coreconfig.Password
if rf, ok := ret.Get(0).(func() coreconfig.Password); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Password)
}
}
return r0
}
// Prometheus provides a mock function with given fields:
func (_m *ChainScopedConfig) Prometheus() coreconfig.Prometheus {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Prometheus")
}
var r0 coreconfig.Prometheus
if rf, ok := ret.Get(0).(func() coreconfig.Prometheus); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Prometheus)
}
}
return r0
}
// Pyroscope provides a mock function with given fields:
func (_m *ChainScopedConfig) Pyroscope() coreconfig.Pyroscope {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Pyroscope")
}
var r0 coreconfig.Pyroscope
if rf, ok := ret.Get(0).(func() coreconfig.Pyroscope); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Pyroscope)
}
}
return r0
}
// RootDir provides a mock function with given fields:
func (_m *ChainScopedConfig) RootDir() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for RootDir")
}
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// Sentry provides a mock function with given fields:
func (_m *ChainScopedConfig) Sentry() coreconfig.Sentry {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Sentry")
}
var r0 coreconfig.Sentry
if rf, ok := ret.Get(0).(func() coreconfig.Sentry); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Sentry)
}
}
return r0
}
// SetLogLevel provides a mock function with given fields: lvl
func (_m *ChainScopedConfig) SetLogLevel(lvl zapcore.Level) error {
ret := _m.Called(lvl)
if len(ret) == 0 {
panic("no return value specified for SetLogLevel")
}
var r0 error
if rf, ok := ret.Get(0).(func(zapcore.Level) error); ok {
r0 = rf(lvl)
} else {
r0 = ret.Error(0)
}
return r0
}
// SetLogSQL provides a mock function with given fields: logSQL
func (_m *ChainScopedConfig) SetLogSQL(logSQL bool) {
_m.Called(logSQL)
}
// SetPasswords provides a mock function with given fields: keystore, vrf
func (_m *ChainScopedConfig) SetPasswords(keystore *string, vrf *string) {
_m.Called(keystore, vrf)
}
// ShutdownGracePeriod provides a mock function with given fields:
func (_m *ChainScopedConfig) ShutdownGracePeriod() time.Duration {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for ShutdownGracePeriod")
}
var r0 time.Duration
if rf, ok := ret.Get(0).(func() time.Duration); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(time.Duration)
}
return r0
}
// SolanaEnabled provides a mock function with given fields:
func (_m *ChainScopedConfig) SolanaEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for SolanaEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// StarkNetEnabled provides a mock function with given fields:
func (_m *ChainScopedConfig) StarkNetEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for StarkNetEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Threshold provides a mock function with given fields:
func (_m *ChainScopedConfig) Threshold() coreconfig.Threshold {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Threshold")
}
var r0 coreconfig.Threshold
if rf, ok := ret.Get(0).(func() coreconfig.Threshold); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Threshold)
}
}
return r0
}
// Tracing provides a mock function with given fields:
func (_m *ChainScopedConfig) Tracing() coreconfig.Tracing {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Tracing")
}
var r0 coreconfig.Tracing
if rf, ok := ret.Get(0).(func() coreconfig.Tracing); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.Tracing)
}
}
return r0
}
// Validate provides a mock function with given fields:
func (_m *ChainScopedConfig) Validate() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Validate")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// ValidateDB provides a mock function with given fields:
func (_m *ChainScopedConfig) ValidateDB() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for ValidateDB")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// WebServer provides a mock function with given fields:
func (_m *ChainScopedConfig) WebServer() coreconfig.WebServer {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for WebServer")
}
var r0 coreconfig.WebServer
if rf, ok := ret.Get(0).(func() coreconfig.WebServer); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(coreconfig.WebServer)
}
}
return r0
}
// NewChainScopedConfig creates a new instance of ChainScopedConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewChainScopedConfig(t interface {
mock.TestingT
Cleanup(func())
}) *ChainScopedConfig {
mock := &ChainScopedConfig{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}