/
general_config.go
822 lines (649 loc) · 16.2 KB
/
general_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
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
// Code generated by mockery v2.38.0. DO NOT EDIT.
package mocks
import (
chainlinkconfig "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config"
config "github.com/smartcontractkit/chainlink/v2/core/config"
cosmosconfig "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config"
mock "github.com/stretchr/testify/mock"
solana "github.com/smartcontractkit/chainlink-solana/pkg/solana"
time "time"
toml "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml"
uuid "github.com/google/uuid"
zapcore "go.uber.org/zap/zapcore"
)
// GeneralConfig is an autogenerated mock type for the GeneralConfig type
type GeneralConfig struct {
mock.Mock
}
// AppID provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) AuditLogger() config.AuditLogger {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for AuditLogger")
}
var r0 config.AuditLogger
if rf, ok := ret.Get(0).(func() config.AuditLogger); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.AuditLogger)
}
}
return r0
}
// AutoPprof provides a mock function with given fields:
func (_m *GeneralConfig) AutoPprof() config.AutoPprof {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for AutoPprof")
}
var r0 config.AutoPprof
if rf, ok := ret.Get(0).(func() config.AutoPprof); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.AutoPprof)
}
}
return r0
}
// Capabilities provides a mock function with given fields:
func (_m *GeneralConfig) Capabilities() config.Capabilities {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Capabilities")
}
var r0 config.Capabilities
if rf, ok := ret.Get(0).(func() config.Capabilities); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Capabilities)
}
}
return r0
}
// ConfigTOML provides a mock function with given fields:
func (_m *GeneralConfig) ConfigTOML() (string, string) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for ConfigTOML")
}
var r0 string
var r1 string
if rf, ok := ret.Get(0).(func() (string, string)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func() string); ok {
r1 = rf()
} else {
r1 = ret.Get(1).(string)
}
return r0, r1
}
// CosmosConfigs provides a mock function with given fields:
func (_m *GeneralConfig) CosmosConfigs() cosmosconfig.TOMLConfigs {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for CosmosConfigs")
}
var r0 cosmosconfig.TOMLConfigs
if rf, ok := ret.Get(0).(func() cosmosconfig.TOMLConfigs); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(cosmosconfig.TOMLConfigs)
}
}
return r0
}
// CosmosEnabled provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) Database() config.Database {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Database")
}
var r0 config.Database
if rf, ok := ret.Get(0).(func() config.Database); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Database)
}
}
return r0
}
// EVMConfigs provides a mock function with given fields:
func (_m *GeneralConfig) EVMConfigs() toml.EVMConfigs {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for EVMConfigs")
}
var r0 toml.EVMConfigs
if rf, ok := ret.Get(0).(func() toml.EVMConfigs); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(toml.EVMConfigs)
}
}
return r0
}
// EVMEnabled provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) 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 *GeneralConfig) Feature() config.Feature {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Feature")
}
var r0 config.Feature
if rf, ok := ret.Get(0).(func() config.Feature); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Feature)
}
}
return r0
}
// FluxMonitor provides a mock function with given fields:
func (_m *GeneralConfig) FluxMonitor() config.FluxMonitor {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for FluxMonitor")
}
var r0 config.FluxMonitor
if rf, ok := ret.Get(0).(func() config.FluxMonitor); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.FluxMonitor)
}
}
return r0
}
// Insecure provides a mock function with given fields:
func (_m *GeneralConfig) Insecure() config.Insecure {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Insecure")
}
var r0 config.Insecure
if rf, ok := ret.Get(0).(func() config.Insecure); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Insecure)
}
}
return r0
}
// InsecureFastScrypt provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) JobPipeline() config.JobPipeline {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for JobPipeline")
}
var r0 config.JobPipeline
if rf, ok := ret.Get(0).(func() config.JobPipeline); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.JobPipeline)
}
}
return r0
}
// Keeper provides a mock function with given fields:
func (_m *GeneralConfig) Keeper() config.Keeper {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Keeper")
}
var r0 config.Keeper
if rf, ok := ret.Get(0).(func() config.Keeper); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Keeper)
}
}
return r0
}
// Log provides a mock function with given fields:
func (_m *GeneralConfig) Log() config.Log {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Log")
}
var r0 config.Log
if rf, ok := ret.Get(0).(func() config.Log); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Log)
}
}
return r0
}
// LogConfiguration provides a mock function with given fields: log, warn
func (_m *GeneralConfig) LogConfiguration(log config.LogfFn, warn config.LogfFn) {
_m.Called(log, warn)
}
// Mercury provides a mock function with given fields:
func (_m *GeneralConfig) Mercury() config.Mercury {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Mercury")
}
var r0 config.Mercury
if rf, ok := ret.Get(0).(func() config.Mercury); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Mercury)
}
}
return r0
}
// OCR provides a mock function with given fields:
func (_m *GeneralConfig) OCR() config.OCR {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for OCR")
}
var r0 config.OCR
if rf, ok := ret.Get(0).(func() config.OCR); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.OCR)
}
}
return r0
}
// OCR2 provides a mock function with given fields:
func (_m *GeneralConfig) OCR2() config.OCR2 {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for OCR2")
}
var r0 config.OCR2
if rf, ok := ret.Get(0).(func() config.OCR2); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.OCR2)
}
}
return r0
}
// P2P provides a mock function with given fields:
func (_m *GeneralConfig) P2P() config.P2P {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for P2P")
}
var r0 config.P2P
if rf, ok := ret.Get(0).(func() config.P2P); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.P2P)
}
}
return r0
}
// Password provides a mock function with given fields:
func (_m *GeneralConfig) Password() config.Password {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Password")
}
var r0 config.Password
if rf, ok := ret.Get(0).(func() config.Password); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Password)
}
}
return r0
}
// Prometheus provides a mock function with given fields:
func (_m *GeneralConfig) Prometheus() config.Prometheus {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Prometheus")
}
var r0 config.Prometheus
if rf, ok := ret.Get(0).(func() config.Prometheus); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Prometheus)
}
}
return r0
}
// Pyroscope provides a mock function with given fields:
func (_m *GeneralConfig) Pyroscope() config.Pyroscope {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Pyroscope")
}
var r0 config.Pyroscope
if rf, ok := ret.Get(0).(func() config.Pyroscope); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Pyroscope)
}
}
return r0
}
// RootDir provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) Sentry() config.Sentry {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Sentry")
}
var r0 config.Sentry
if rf, ok := ret.Get(0).(func() config.Sentry); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Sentry)
}
}
return r0
}
// SetLogLevel provides a mock function with given fields: lvl
func (_m *GeneralConfig) 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 *GeneralConfig) SetLogSQL(logSQL bool) {
_m.Called(logSQL)
}
// SetPasswords provides a mock function with given fields: keystore, vrf
func (_m *GeneralConfig) SetPasswords(keystore *string, vrf *string) {
_m.Called(keystore, vrf)
}
// ShutdownGracePeriod provides a mock function with given fields:
func (_m *GeneralConfig) 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
}
// SolanaConfigs provides a mock function with given fields:
func (_m *GeneralConfig) SolanaConfigs() solana.TOMLConfigs {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for SolanaConfigs")
}
var r0 solana.TOMLConfigs
if rf, ok := ret.Get(0).(func() solana.TOMLConfigs); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(solana.TOMLConfigs)
}
}
return r0
}
// SolanaEnabled provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) 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
}
// StarknetConfigs provides a mock function with given fields:
func (_m *GeneralConfig) StarknetConfigs() chainlinkconfig.TOMLConfigs {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for StarknetConfigs")
}
var r0 chainlinkconfig.TOMLConfigs
if rf, ok := ret.Get(0).(func() chainlinkconfig.TOMLConfigs); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(chainlinkconfig.TOMLConfigs)
}
}
return r0
}
// TelemetryIngress provides a mock function with given fields:
func (_m *GeneralConfig) TelemetryIngress() config.TelemetryIngress {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for TelemetryIngress")
}
var r0 config.TelemetryIngress
if rf, ok := ret.Get(0).(func() config.TelemetryIngress); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.TelemetryIngress)
}
}
return r0
}
// Threshold provides a mock function with given fields:
func (_m *GeneralConfig) Threshold() config.Threshold {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Threshold")
}
var r0 config.Threshold
if rf, ok := ret.Get(0).(func() config.Threshold); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Threshold)
}
}
return r0
}
// Tracing provides a mock function with given fields:
func (_m *GeneralConfig) Tracing() config.Tracing {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Tracing")
}
var r0 config.Tracing
if rf, ok := ret.Get(0).(func() config.Tracing); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.Tracing)
}
}
return r0
}
// Validate provides a mock function with given fields:
func (_m *GeneralConfig) 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 *GeneralConfig) 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 *GeneralConfig) WebServer() config.WebServer {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for WebServer")
}
var r0 config.WebServer
if rf, ok := ret.Get(0).(func() config.WebServer); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(config.WebServer)
}
}
return r0
}
// NewGeneralConfig creates a new instance of GeneralConfig. 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 NewGeneralConfig(t interface {
mock.TestingT
Cleanup(func())
}) *GeneralConfig {
mock := &GeneralConfig{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}