code.vegaprotocol.io/vega@v0.79.0/protos/sources/vega/data/v1/spec.proto (about) 1 syntax = "proto3"; 2 3 package vega.data.v1; 4 5 option go_package = "code.vegaprotocol.io/vega/protos/vega/data/v1"; 6 7 // Filter describes the conditions under which a data source data is considered of 8 // interest or not. 9 message Filter { 10 // Data source's data property key targeted by the filter. 11 PropertyKey key = 1; 12 // Conditions that should be matched by the data to be 13 // considered of interest. 14 repeated Condition conditions = 2; 15 } 16 17 // PropertyKey describes the property key contained in data source data. 18 message PropertyKey { 19 // Name of the property. 20 string name = 1; 21 // Data type of the property. 22 Type type = 2; 23 // Optional decimal place to be be applied on the provided value 24 // valid only for PropertyType of type DECIMAL and INTEGER 25 optional uint64 number_decimal_places = 3; 26 27 // Type describes the data type of properties that are supported by the data source 28 // engine. 29 enum Type { 30 // The default value. 31 TYPE_UNSPECIFIED = 0; 32 // Any type. 33 TYPE_EMPTY = 1; 34 // Integer type. 35 TYPE_INTEGER = 2; 36 // String type. 37 TYPE_STRING = 3; 38 // Boolean type. 39 TYPE_BOOLEAN = 4; 40 // Any floating point decimal type. 41 TYPE_DECIMAL = 5; 42 // Timestamp date type. 43 TYPE_TIMESTAMP = 6; 44 } 45 } 46 47 // Condition describes the condition that must be validated by the network 48 message Condition { 49 // Type of comparison to make on the value. 50 Operator operator = 1; 51 // Value to be compared with by the operator. 52 string value = 2; 53 // Operator describes the type of comparison. 54 enum Operator { 55 // The default value 56 OPERATOR_UNSPECIFIED = 0; 57 // Verify if the property values are strictly equal or not. 58 OPERATOR_EQUALS = 1; 59 // Verify if the data source data value is greater than the Condition value. 60 OPERATOR_GREATER_THAN = 2; 61 // Verify if the data source data value is greater than or equal to the Condition 62 // value. 63 OPERATOR_GREATER_THAN_OR_EQUAL = 3; 64 // Verify if the data source data value is less than the Condition value. 65 OPERATOR_LESS_THAN = 4; 66 // Verify if the data source data value is less or equal to than the Condition 67 // value. 68 OPERATOR_LESS_THAN_OR_EQUAL = 5; 69 } 70 } 71 72 // Trigger for an internal time data source. 73 message InternalTimeTrigger { 74 // Trigger when the vega time is greater or equal to this time, in Unix seconds. 75 optional int64 initial = 1; 76 // Repeat the trigger every n seconds after the initial. If no time for 77 // initial was specified, begin repeating immediately. 78 int64 every = 2; 79 }