-
Notifications
You must be signed in to change notification settings - Fork 19
/
data_source.pb.go
1333 lines (1178 loc) · 48.5 KB
/
data_source.pb.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
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: vega/data_source.proto
package vega
import (
v1 "code.vegaprotocol.io/vega/protos/vega/data/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Status describe the status of the data source spec
type DataSourceSpec_Status int32
const (
// Default value.
DataSourceSpec_STATUS_UNSPECIFIED DataSourceSpec_Status = 0
// STATUS_ACTIVE describes an active data source spec.
DataSourceSpec_STATUS_ACTIVE DataSourceSpec_Status = 1
// STATUS_DEACTIVATED describes a data source spec that is not listening to
// data anymore.
DataSourceSpec_STATUS_DEACTIVATED DataSourceSpec_Status = 2
)
// Enum value maps for DataSourceSpec_Status.
var (
DataSourceSpec_Status_name = map[int32]string{
0: "STATUS_UNSPECIFIED",
1: "STATUS_ACTIVE",
2: "STATUS_DEACTIVATED",
}
DataSourceSpec_Status_value = map[string]int32{
"STATUS_UNSPECIFIED": 0,
"STATUS_ACTIVE": 1,
"STATUS_DEACTIVATED": 2,
}
)
func (x DataSourceSpec_Status) Enum() *DataSourceSpec_Status {
p := new(DataSourceSpec_Status)
*p = x
return p
}
func (x DataSourceSpec_Status) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DataSourceSpec_Status) Descriptor() protoreflect.EnumDescriptor {
return file_vega_data_source_proto_enumTypes[0].Descriptor()
}
func (DataSourceSpec_Status) Type() protoreflect.EnumType {
return &file_vega_data_source_proto_enumTypes[0]
}
func (x DataSourceSpec_Status) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DataSourceSpec_Status.Descriptor instead.
func (DataSourceSpec_Status) EnumDescriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{10, 0}
}
// Represents the top level object that handles data sources.
// Data source definition can be external or internal, with whatever
// number of data sources are defined for each type in the child objects below.
type DataSourceDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to SourceType:
//
// *DataSourceDefinition_Internal
// *DataSourceDefinition_External
SourceType isDataSourceDefinition_SourceType `protobuf_oneof:"source_type"`
}
func (x *DataSourceDefinition) Reset() {
*x = DataSourceDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceDefinition) ProtoMessage() {}
func (x *DataSourceDefinition) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceDefinition.ProtoReflect.Descriptor instead.
func (*DataSourceDefinition) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{0}
}
func (m *DataSourceDefinition) GetSourceType() isDataSourceDefinition_SourceType {
if m != nil {
return m.SourceType
}
return nil
}
func (x *DataSourceDefinition) GetInternal() *DataSourceDefinitionInternal {
if x, ok := x.GetSourceType().(*DataSourceDefinition_Internal); ok {
return x.Internal
}
return nil
}
func (x *DataSourceDefinition) GetExternal() *DataSourceDefinitionExternal {
if x, ok := x.GetSourceType().(*DataSourceDefinition_External); ok {
return x.External
}
return nil
}
type isDataSourceDefinition_SourceType interface {
isDataSourceDefinition_SourceType()
}
type DataSourceDefinition_Internal struct {
Internal *DataSourceDefinitionInternal `protobuf:"bytes,1,opt,name=internal,proto3,oneof"`
}
type DataSourceDefinition_External struct {
External *DataSourceDefinitionExternal `protobuf:"bytes,2,opt,name=external,proto3,oneof"`
}
func (*DataSourceDefinition_Internal) isDataSourceDefinition_SourceType() {}
func (*DataSourceDefinition_External) isDataSourceDefinition_SourceType() {}
// Internal data source used for emitting timestamps.
type DataSourceSpecConfigurationTime struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Conditions that the timestamps should meet in order to be considered.
Conditions []*v1.Condition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"`
}
func (x *DataSourceSpecConfigurationTime) Reset() {
*x = DataSourceSpecConfigurationTime{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceSpecConfigurationTime) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceSpecConfigurationTime) ProtoMessage() {}
func (x *DataSourceSpecConfigurationTime) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceSpecConfigurationTime.ProtoReflect.Descriptor instead.
func (*DataSourceSpecConfigurationTime) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{1}
}
func (x *DataSourceSpecConfigurationTime) GetConditions() []*v1.Condition {
if x != nil {
return x.Conditions
}
return nil
}
// Internal data source used for emitting timestamps automatically using predefined intervals and conditions.
type DataSourceSpecConfigurationTimeTrigger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Conditions that the timestamps need to meet in order to be considered.
Conditions []*v1.Condition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"`
// An internal time trigger
Triggers []*v1.InternalTimeTrigger `protobuf:"bytes,2,rep,name=triggers,proto3" json:"triggers,omitempty"`
}
func (x *DataSourceSpecConfigurationTimeTrigger) Reset() {
*x = DataSourceSpecConfigurationTimeTrigger{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceSpecConfigurationTimeTrigger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceSpecConfigurationTimeTrigger) ProtoMessage() {}
func (x *DataSourceSpecConfigurationTimeTrigger) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceSpecConfigurationTimeTrigger.ProtoReflect.Descriptor instead.
func (*DataSourceSpecConfigurationTimeTrigger) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{2}
}
func (x *DataSourceSpecConfigurationTimeTrigger) GetConditions() []*v1.Condition {
if x != nil {
return x.Conditions
}
return nil
}
func (x *DataSourceSpecConfigurationTimeTrigger) GetTriggers() []*v1.InternalTimeTrigger {
if x != nil {
return x.Triggers
}
return nil
}
// Top level object used for all internal data sources.
// It contains one of any of the defined source type variants.
type DataSourceDefinitionInternal struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types of internal data sources
//
// Types that are assignable to SourceType:
//
// *DataSourceDefinitionInternal_Time
// *DataSourceDefinitionInternal_TimeTrigger
SourceType isDataSourceDefinitionInternal_SourceType `protobuf_oneof:"source_type"`
}
func (x *DataSourceDefinitionInternal) Reset() {
*x = DataSourceDefinitionInternal{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceDefinitionInternal) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceDefinitionInternal) ProtoMessage() {}
func (x *DataSourceDefinitionInternal) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceDefinitionInternal.ProtoReflect.Descriptor instead.
func (*DataSourceDefinitionInternal) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{3}
}
func (m *DataSourceDefinitionInternal) GetSourceType() isDataSourceDefinitionInternal_SourceType {
if m != nil {
return m.SourceType
}
return nil
}
func (x *DataSourceDefinitionInternal) GetTime() *DataSourceSpecConfigurationTime {
if x, ok := x.GetSourceType().(*DataSourceDefinitionInternal_Time); ok {
return x.Time
}
return nil
}
func (x *DataSourceDefinitionInternal) GetTimeTrigger() *DataSourceSpecConfigurationTimeTrigger {
if x, ok := x.GetSourceType().(*DataSourceDefinitionInternal_TimeTrigger); ok {
return x.TimeTrigger
}
return nil
}
type isDataSourceDefinitionInternal_SourceType interface {
isDataSourceDefinitionInternal_SourceType()
}
type DataSourceDefinitionInternal_Time struct {
Time *DataSourceSpecConfigurationTime `protobuf:"bytes,1,opt,name=time,proto3,oneof"`
}
type DataSourceDefinitionInternal_TimeTrigger struct {
TimeTrigger *DataSourceSpecConfigurationTimeTrigger `protobuf:"bytes,2,opt,name=time_trigger,json=timeTrigger,proto3,oneof"`
}
func (*DataSourceDefinitionInternal_Time) isDataSourceDefinitionInternal_SourceType() {}
func (*DataSourceDefinitionInternal_TimeTrigger) isDataSourceDefinitionInternal_SourceType() {}
// DataSourceDefinitionExternal is the top level object used for all external
// data sources. It contains one of any of the defined `SourceType` variants.
type DataSourceDefinitionExternal struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types of External data sources
//
// Types that are assignable to SourceType:
//
// *DataSourceDefinitionExternal_Oracle
// *DataSourceDefinitionExternal_EthOracle
SourceType isDataSourceDefinitionExternal_SourceType `protobuf_oneof:"source_type"`
}
func (x *DataSourceDefinitionExternal) Reset() {
*x = DataSourceDefinitionExternal{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceDefinitionExternal) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceDefinitionExternal) ProtoMessage() {}
func (x *DataSourceDefinitionExternal) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceDefinitionExternal.ProtoReflect.Descriptor instead.
func (*DataSourceDefinitionExternal) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{4}
}
func (m *DataSourceDefinitionExternal) GetSourceType() isDataSourceDefinitionExternal_SourceType {
if m != nil {
return m.SourceType
}
return nil
}
func (x *DataSourceDefinitionExternal) GetOracle() *DataSourceSpecConfiguration {
if x, ok := x.GetSourceType().(*DataSourceDefinitionExternal_Oracle); ok {
return x.Oracle
}
return nil
}
func (x *DataSourceDefinitionExternal) GetEthOracle() *EthCallSpec {
if x, ok := x.GetSourceType().(*DataSourceDefinitionExternal_EthOracle); ok {
return x.EthOracle
}
return nil
}
type isDataSourceDefinitionExternal_SourceType interface {
isDataSourceDefinitionExternal_SourceType()
}
type DataSourceDefinitionExternal_Oracle struct {
Oracle *DataSourceSpecConfiguration `protobuf:"bytes,1,opt,name=oracle,proto3,oneof"`
}
type DataSourceDefinitionExternal_EthOracle struct {
// Contains the data specification that is received from Ethereum sources.
EthOracle *EthCallSpec `protobuf:"bytes,2,opt,name=eth_oracle,json=ethOracle,proto3,oneof"`
}
func (*DataSourceDefinitionExternal_Oracle) isDataSourceDefinitionExternal_SourceType() {}
func (*DataSourceDefinitionExternal_EthOracle) isDataSourceDefinitionExternal_SourceType() {}
// All types of external data sources use the same configuration set for meeting
// requirements in order for the data to be useful for Vega - valid signatures
// and matching filters.
type DataSourceSpecConfiguration struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Signers is the list of authorized signatures that signed the data for this
// source. All the signatures in the data source data should be contained in
// this external source. All the signatures in the data should be contained in
// this list.
Signers []*v1.Signer `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"`
// Filters describes which source data are considered of interest or not for
// the product (or the risk model).
Filters []*v1.Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"`
}
func (x *DataSourceSpecConfiguration) Reset() {
*x = DataSourceSpecConfiguration{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceSpecConfiguration) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceSpecConfiguration) ProtoMessage() {}
func (x *DataSourceSpecConfiguration) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceSpecConfiguration.ProtoReflect.Descriptor instead.
func (*DataSourceSpecConfiguration) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{5}
}
func (x *DataSourceSpecConfiguration) GetSigners() []*v1.Signer {
if x != nil {
return x.Signers
}
return nil
}
func (x *DataSourceSpecConfiguration) GetFilters() []*v1.Filter {
if x != nil {
return x.Filters
}
return nil
}
// Specifies a data source that derives its content from calling a read method
// on an Ethereum contract.
type EthCallSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Ethereum address of the contract to call.
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// The ABI of that contract.
Abi string `protobuf:"bytes,2,opt,name=abi,proto3" json:"abi,omitempty"`
// Name of the method on the contract to call.
Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
// List of arguments to pass to method call.
// Protobuf 'Value' wraps an arbitrary JSON type that is mapped to an Ethereum
// type according to the ABI.
Args []*structpb.Value `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"`
// Conditions for determining when to call the contract method.
Trigger *EthCallTrigger `protobuf:"bytes,5,opt,name=trigger,proto3" json:"trigger,omitempty"`
// Number of confirmations required before the query is considered verified
RequiredConfirmations uint64 `protobuf:"varint,6,opt,name=required_confirmations,json=requiredConfirmations,proto3" json:"required_confirmations,omitempty"`
// Filters the data returned from the contract method
Filters []*v1.Filter `protobuf:"bytes,7,rep,name=filters,proto3" json:"filters,omitempty"`
// Normalisers are used to convert the data returned from the contract method
// into a standard format. The key of the map is the name of the property,
// which identifies the specific piece of data to other parts of the data
// sourcing framework, for example filters. The value is a JSONPath expression
// for expressing where in the contract call result the required data is
// located, for example $[0] indicates the first result. $[1].price would look
// in the second result returned from the contract for a structure with a key
// called 'price' and use that if it exists.
Normalisers []*Normaliser `protobuf:"bytes,8,rep,name=normalisers,proto3" json:"normalisers,omitempty"`
}
func (x *EthCallSpec) Reset() {
*x = EthCallSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EthCallSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EthCallSpec) ProtoMessage() {}
func (x *EthCallSpec) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EthCallSpec.ProtoReflect.Descriptor instead.
func (*EthCallSpec) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{6}
}
func (x *EthCallSpec) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (x *EthCallSpec) GetAbi() string {
if x != nil {
return x.Abi
}
return ""
}
func (x *EthCallSpec) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *EthCallSpec) GetArgs() []*structpb.Value {
if x != nil {
return x.Args
}
return nil
}
func (x *EthCallSpec) GetTrigger() *EthCallTrigger {
if x != nil {
return x.Trigger
}
return nil
}
func (x *EthCallSpec) GetRequiredConfirmations() uint64 {
if x != nil {
return x.RequiredConfirmations
}
return 0
}
func (x *EthCallSpec) GetFilters() []*v1.Filter {
if x != nil {
return x.Filters
}
return nil
}
func (x *EthCallSpec) GetNormalisers() []*Normaliser {
if x != nil {
return x.Normalisers
}
return nil
}
type Normaliser struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Expression string `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"`
}
func (x *Normaliser) Reset() {
*x = Normaliser{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Normaliser) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Normaliser) ProtoMessage() {}
func (x *Normaliser) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Normaliser.ProtoReflect.Descriptor instead.
func (*Normaliser) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{7}
}
func (x *Normaliser) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Normaliser) GetExpression() string {
if x != nil {
return x.Expression
}
return ""
}
// Determines when the contract method should be called.
type EthCallTrigger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Trigger:
//
// *EthCallTrigger_TimeTrigger
Trigger isEthCallTrigger_Trigger `protobuf_oneof:"trigger"`
}
func (x *EthCallTrigger) Reset() {
*x = EthCallTrigger{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EthCallTrigger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EthCallTrigger) ProtoMessage() {}
func (x *EthCallTrigger) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EthCallTrigger.ProtoReflect.Descriptor instead.
func (*EthCallTrigger) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{8}
}
func (m *EthCallTrigger) GetTrigger() isEthCallTrigger_Trigger {
if m != nil {
return m.Trigger
}
return nil
}
func (x *EthCallTrigger) GetTimeTrigger() *EthTimeTrigger {
if x, ok := x.GetTrigger().(*EthCallTrigger_TimeTrigger); ok {
return x.TimeTrigger
}
return nil
}
type isEthCallTrigger_Trigger interface {
isEthCallTrigger_Trigger()
}
type EthCallTrigger_TimeTrigger struct {
TimeTrigger *EthTimeTrigger `protobuf:"bytes,1,opt,name=time_trigger,json=timeTrigger,proto3,oneof"`
}
func (*EthCallTrigger_TimeTrigger) isEthCallTrigger_Trigger() {}
// Trigger for an Ethereum call based on the Ethereum block timestamp. Can be
// one-off or repeating.
type EthTimeTrigger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Trigger when the Ethereum time is greater or equal to this time, in Unix
// seconds.
Initial *uint64 `protobuf:"varint,1,opt,name=initial,proto3,oneof" json:"initial,omitempty"`
// Repeat the call every n seconds after the initial call. If no time for
// initial call was specified, begin repeating immediately.
Every *uint64 `protobuf:"varint,2,opt,name=every,proto3,oneof" json:"every,omitempty"`
// If repeating, stop once Ethereum time is greater than this time, in Unix
// seconds. If not set, then repeat indefinitely.
Until *uint64 `protobuf:"varint,3,opt,name=until,proto3,oneof" json:"until,omitempty"`
}
func (x *EthTimeTrigger) Reset() {
*x = EthTimeTrigger{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EthTimeTrigger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EthTimeTrigger) ProtoMessage() {}
func (x *EthTimeTrigger) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EthTimeTrigger.ProtoReflect.Descriptor instead.
func (*EthTimeTrigger) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{9}
}
func (x *EthTimeTrigger) GetInitial() uint64 {
if x != nil && x.Initial != nil {
return *x.Initial
}
return 0
}
func (x *EthTimeTrigger) GetEvery() uint64 {
if x != nil && x.Every != nil {
return *x.Every
}
return 0
}
func (x *EthTimeTrigger) GetUntil() uint64 {
if x != nil && x.Until != nil {
return *x.Until
}
return 0
}
// Data source spec describes the data source base that a product or a risk
// model wants to get from the data source engine. This message contains
// additional information used by the API.
type DataSourceSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash generated from the DataSpec data.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Creation date and time
CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Last Updated timestamp
UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
Data *DataSourceDefinition `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
// Status describes the status of the data source spec
Status DataSourceSpec_Status `protobuf:"varint,5,opt,name=status,proto3,enum=vega.DataSourceSpec_Status" json:"status,omitempty"`
}
func (x *DataSourceSpec) Reset() {
*x = DataSourceSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceSpec) ProtoMessage() {}
func (x *DataSourceSpec) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSourceSpec.ProtoReflect.Descriptor instead.
func (*DataSourceSpec) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{10}
}
func (x *DataSourceSpec) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DataSourceSpec) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *DataSourceSpec) GetUpdatedAt() int64 {
if x != nil {
return x.UpdatedAt
}
return 0
}
func (x *DataSourceSpec) GetData() *DataSourceDefinition {
if x != nil {
return x.Data
}
return nil
}
func (x *DataSourceSpec) GetStatus() DataSourceSpec_Status {
if x != nil {
return x.Status
}
return DataSourceSpec_STATUS_UNSPECIFIED
}
type ExternalDataSourceSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Spec *DataSourceSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
}
func (x *ExternalDataSourceSpec) Reset() {
*x = ExternalDataSourceSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_data_source_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExternalDataSourceSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExternalDataSourceSpec) ProtoMessage() {}
func (x *ExternalDataSourceSpec) ProtoReflect() protoreflect.Message {
mi := &file_vega_data_source_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExternalDataSourceSpec.ProtoReflect.Descriptor instead.
func (*ExternalDataSourceSpec) Descriptor() ([]byte, []int) {
return file_vega_data_source_proto_rawDescGZIP(), []int{11}
}
func (x *ExternalDataSourceSpec) GetSpec() *DataSourceSpec {
if x != nil {
return x.Spec
}
return nil
}
var File_vega_data_source_proto protoreflect.FileDescriptor
var file_vega_data_source_proto_rawDesc = []byte{
0x0a, 0x16, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x76, 0x65, 0x67, 0x61, 0x1a, 0x1c,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x65,
0x67, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61,
0x2f, 0x76, 0x31, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9,
0x01, 0x0a, 0x14, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66,
0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61,
0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52,
0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x40, 0x0a, 0x08, 0x65, 0x78, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65,
0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66,
0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48,
0x00, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5a, 0x0a, 0x1f, 0x44, 0x61,
0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a,
0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31,
0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x26, 0x44, 0x61, 0x74, 0x61, 0x53,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65,
0x72, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74,
0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x08, 0x74, 0x72,
0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76,
0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52,
0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x1c, 0x44, 0x61,
0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e,
0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x48,
0x00, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f,
0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e,
0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x74,