Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Keeps editors from reintroducing CRLF. The enforcement is .gitattributes plus the CI
# check; this is so a contributor's working tree does not fight it in the first place.
root = true

[*]
end_of_line = lf
charset = utf-8

[*.{bat,cmd}]
end_of_line = crlf
66 changes: 66 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Line endings are LF in the repository and in the working tree, on every platform.
# Git applies this on `git add`, so a contributor's core.autocrlf setting cannot put CRLF
# into the index. Adding this file does not fix what is already committed - that needs
# `git add --renormalize .` once, which is what the commit introducing this file did.
#
# The extensions are listed explicitly rather than relying on `text=auto` alone: auto
# detection is a heuristic, and this repository had files keep their CRLF for years despite
# a `* text=auto eol=lf` rule. The CI check is the actual guarantee.

* text=auto eol=lf

# source and config
*.java text eol=lf
*.kt text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.json text eol=lf
*.jsonc text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.xml text eol=lf
*.sql text eol=lf
*.avsc text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.html text eol=lf
*.properties text eol=lf
*.sh text eol=lf
*.env text eol=lf
Dockerfile text eol=lf
Makefile text eol=lf

# read by cmd.exe, which wants CRLF
*.bat text eol=crlf
*.cmd text eol=crlf

# never converted, never diffed
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.svg text eol=lf
*.woff binary
*.woff2 binary
*.ttf binary
*.otf binary
*.eot binary
*.pdf binary
*.zip binary
*.gz binary
*.tar binary
*.jar binary
*.wasm binary
*.glb binary
*.gltf binary
*.mp4 binary
*.webm binary
*.avro binary
19 changes: 19 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: validate
on:
push:
workflow_dispatch:

jobs:
line-endings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check line endings
run: |
# .gitattributes normalises on add; this catches anything that slipped past it,
# including files committed before the rule existed. Fix with:
# git add --renormalize . && git commit
if git ls-files --eol | grep -E '^i/(crlf|mixed)'; then
echo '::error::the files listed above have CRLF or mixed line endings in the index'
exit 1
fi
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.lh/
.lh/
.classpath
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Event processor contract shared
Git submodule for shared files of event-processor-contract implementation.
- parent pom
# Event processor contract shared
Git submodule for shared files of event-processor-contract implementation.

- parent pom
- common AVRO schemata
60 changes: 30 additions & 30 deletions src/main/avro/shared/realtime/notification.avsc
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"type": "record",
"name": "notification",
"namespace": "contracts",
"fields": [
{
"name": "id",
"type": "long"
},
{
"name": "blocknum",
"type": "long"
},
{
"name": "block_timestamp",
"type": "long"
},
{
"name": "account",
"type": "string"
},
{
"name": "context",
"type": "string"
},
{
"name": "data",
"type": "string"
}
]
{
"type": "record",
"name": "notification",
"namespace": "contracts",
"fields": [
{
"name": "id",
"type": "long"
},
{
"name": "blocknum",
"type": "long"
},
{
"name": "block_timestamp",
"type": "long"
},
{
"name": "account",
"type": "string"
},
{
"name": "context",
"type": "string"
},
{
"name": "data",
"type": "string"
}
]
}
84 changes: 42 additions & 42 deletions src/main/avro/shared/realtime/realtime_event.avsc
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"type": "record",
"name": "realtime_event",
"namespace": "contracts",
"fields": [
{
"name": "blocknum",
"type": "long"
},
{
"name": "block_timestamp",
"type": "long"
},
{
"name": "global_sequence",
"type": "long"
},
{
"name": "asset_id",
"type": ["null","long"]
},
{
"name": "template_id",
"type": ["null","long"]
},
{
"name": "collection_id",
"type": "string"
},
{
"name": "context",
"type": "string"
},
{
"name": "type",
"type": "string"
},
{
"name": "data",
"type": ["null","string"]
}
]
{
"type": "record",
"name": "realtime_event",
"namespace": "contracts",
"fields": [
{
"name": "blocknum",
"type": "long"
},
{
"name": "block_timestamp",
"type": "long"
},
{
"name": "global_sequence",
"type": "long"
},
{
"name": "asset_id",
"type": ["null","long"]
},
{
"name": "template_id",
"type": ["null","long"]
},
{
"name": "collection_id",
"type": "string"
},
{
"name": "context",
"type": "string"
},
{
"name": "type",
"type": "string"
},
{
"name": "data",
"type": ["null","string"]
}
]
}
Loading
Loading