Skip to content

Commit

Permalink
Log records schemas to be compatible with postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Mar 24, 2020
1 parent 1b4c663 commit f418111
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/resources/avro/LogDetailsRecord.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
{
"name": "topics",
"type": {
"name": "topic",
"type": "array",
"items": ["string"]
"items": "string"
}
},
{
Expand Down
64 changes: 64 additions & 0 deletions src/main/resources/avro/LogDetailsRecordPostgres.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"namespace": "io.keyko.monitoring.schemas",
"type": "record",
"name": "LogDetailsRecordPostgres",
"fields": [
{
"name": "nodeName",
"type": "string"
},
{
"name": "data",
"type":"string"
},
{
"name": "topic0",
"type": "string",
"default": ""
},
{
"name": "topic1",
"type": "string",
"default": ""
},
{
"name": "topic2",
"type": "string",
"default": ""
},
{
"name": "topic3",
"type": "string",
"default": ""
},
{
"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": "id",
"type": "string"
}
]
}
22 changes: 22 additions & 0 deletions src/main/resources/avro/LogRecordPostgres.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"namespace": "io.keyko.monitoring.schemas",
"type": "record",
"name": "LogRecordPostgres",
"fields": [{
"name": "id",
"type": "string"
},
{
"name": "type",
"type": "string"
},
{
"name": "details",
"type": "LogDetailsRecordPostgres"
},
{
"name": "retries",
"type": "int"
}
]
}

0 comments on commit f418111

Please sign in to comment.