Skip to content

Commit

Permalink
New version of the schemas with the flattening of the details
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Mar 24, 2020
1 parent f26134d commit b173eb6
Show file tree
Hide file tree
Showing 16 changed files with 256 additions and 340 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,15 @@ You can include the stubs generated with the schemas including the following dep
The AVRO implementation of the schemas can be found in the **src/main/resources/avro/** folder. This are the schemas implemented:

* AlertRecord.avsc
* BlockDetailsRecord.avsc
* BlockRecord.avsc
* EventBlockRecord.avsc
* EventDetailsRecord.avsc
* EventRecord.avsc
* LogDetailsRecord.avsc
* LogRecord.avsc
* LogRecordTopicsFlattened.avsc
* NumberParameter.avsc
* StringParameter.avsc
* TimeSeriesParameter.avsc
* TimeSeriesRecord.avsc
* TransactionDetailsRecord.avsc
* TransactionRecord.avsc
* ViewBlockRecord.avsc
* ViewDetailsRecord.avsc
* ViewRecord.avsc
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>io.keyko.monitoring</groupId>
<artifactId>schemas</artifactId>
<packaging>jar</packaging>
<version>0.2.7</version>
<version>0.3.0</version>
<name>Web3 Monitoring Schemas</name>
<url>https://github.com/keyko-io/web3-monitoring-schemas</url>

Expand Down
23 changes: 0 additions & 23 deletions src/main/resources/avro/BlockDetailsRecord.avsc

This file was deleted.

15 changes: 12 additions & 3 deletions src/main/resources/avro/BlockRecord.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@
"type": "string"
},
{
"name": "type",
"name": "number",
"type": "long"
},
{
"name": "hash",
"type": "string"
},
{
"name": "details",
"type": "BlockDetailsRecord"
"name": "timestamp",
"type": "long",
"logicalType": "timestamp-millis"
},
{
"name": "nodeName",
"type": "string"
},
{
"name": "retries",
Expand Down
12 changes: 4 additions & 8 deletions src/main/resources/avro/EventBlockRecord.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@
"type": "string"
},
{
"name": "type",
"type": "string"
},
{
"name": "details",
"type": "EventDetailsRecord"
"name": "event",
"type": "EventRecord"
},
{
"name": "detailsBlock",
"type": "BlockDetailsRecord"
"name": "block",
"type": "BlockRecord"
},
{
"name": "retries",
Expand Down
85 changes: 0 additions & 85 deletions src/main/resources/avro/EventDetailsRecord.avsc

This file was deleted.

75 changes: 72 additions & 3 deletions src/main/resources/avro/EventRecord.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,81 @@
"type": "string"
},
{
"name": "type",
"name": "name",
"type": "string"
},
{
"name": "details",
"type": "EventDetailsRecord"
"name": "contractName",
"type": "string",
"default": ""
},
{
"name": "filterId",
"type": "string"
},
{
"name": "nodeName",
"type": "string"
},
{
"name": "indexedParameters",
"type": {
"type": "array",
"items": ["StringParameter", "NumberParameter"]
}
},

{
"name": "nonIndexedParameters",
"type": {
"type": "array",
"items": ["StringParameter", "NumberParameter"]
}
},
{
"name": "transactionHash",
"type": "string"
},
{
"name": "logIndex",
"type": "string",
"java-class": "java.math.BigInteger"
},
{
"name": "blockNumber",
"type": "long"
},
{
"name": "blockHash",
"type": "string"
},
{
"name": "address",
"type": "string"
},
{
"name": "status",
"type": {
"name": "ContractEventStatus",
"type": "enum",
"symbols": [
"UNCONFIRMED",
"CONFIRMED",
"INVALIDATED"
]
}
},
{
"name": "eventSpecificationSignature",
"type": "string"
},
{
"name": "networkName",
"type": "string"
},
{
"name": "id",
"type": "string"
},
{
"name": "retries",
Expand Down
52 changes: 0 additions & 52 deletions src/main/resources/avro/LogDetailsRecord.avsc

This file was deleted.

51 changes: 48 additions & 3 deletions src/main/resources/avro/LogRecord.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,57 @@
"type": "string"
},
{
"name": "type",
"name": "nodeName",
"type": "string"
},
{
"name": "details",
"type": "LogDetailsRecord"
"name": "data",
"type":"string"
},
{
"name": "topics",
"type": {
"name": "topic",
"type": "array",
"items": "string"
}
},
{
"name": "transactionHash",
"type": "string"
},
{
"name": "logIndex",
"type": "string",
"java-class": "java.math.BigInteger"
},
{
"name": "blockNumber",
"type": "long"
},
{
"name": "blockHash",
"type": "string"
},
{
"name": "address",
"type": "string"
},
{
"name": "networkName",
"type": "string"
},
{
"name": "status",
"type": {
"name": "ContractEventStatus",
"type": "enum",
"symbols": [
"UNCONFIRMED",
"CONFIRMED",
"INVALIDATED"
]
}
},
{
"name": "retries",
Expand Down
Loading

0 comments on commit b173eb6

Please sign in to comment.