neon_schemas 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +73 -0
- data/README.md +40 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/neon_schemas.rb +36 -0
- data/lib/neon_schemas/version.rb +3 -0
- data/neon_schemas.gemspec +24 -0
- data/package.json +14 -0
- data/poetry.lock +294 -0
- data/pyproject.toml +18 -0
- data/src/outbound_email.avsc +51 -0
- metadata +60 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d84516d40ad530331857a31972415977f31188ed8f2c5d4f85dd100d059a1407
|
4
|
+
data.tar.gz: 861821060eebeb57ae20c613baf0317ac06c1f78e6673c509d99194ba3013421
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 20a95ba96dfc029d5fa9f4143bd6d77c7fed61151b43979ade161d25ce5482b5a3b4d6f58eaa3a32024ff3f2f6db2cd7cf33d266aeadc7276ff7331ae35444bb
|
7
|
+
data.tar.gz: 5a5bfad27901f0b2de2ef516e1fefa3e3dc7c8741e56d5110cc6b972b16c8f458a5f1149625ac1aef71d16f2f75bfb070d69c455733c1309ddcb29ca2cbf437e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
neon_schemas (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
avro (1.10.2)
|
11
|
+
multi_json (~> 1)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.4.4)
|
14
|
+
method_source (1.0.0)
|
15
|
+
multi_json (1.15.0)
|
16
|
+
parallel (1.20.1)
|
17
|
+
parser (3.0.1.1)
|
18
|
+
ast (~> 2.4.1)
|
19
|
+
pry (0.14.1)
|
20
|
+
coderay (~> 1.1)
|
21
|
+
method_source (~> 1.0)
|
22
|
+
rainbow (3.0.0)
|
23
|
+
rake (12.3.3)
|
24
|
+
regexp_parser (2.1.1)
|
25
|
+
rexml (3.2.5)
|
26
|
+
rspec (3.10.0)
|
27
|
+
rspec-core (~> 3.10.0)
|
28
|
+
rspec-expectations (~> 3.10.0)
|
29
|
+
rspec-mocks (~> 3.10.0)
|
30
|
+
rspec-core (3.10.1)
|
31
|
+
rspec-support (~> 3.10.0)
|
32
|
+
rspec-expectations (3.10.1)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.10.0)
|
35
|
+
rspec-mocks (3.10.2)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-support (3.10.2)
|
39
|
+
rubocop (1.14.0)
|
40
|
+
parallel (~> 1.10)
|
41
|
+
parser (>= 3.0.0.0)
|
42
|
+
rainbow (>= 2.2.2, < 4.0)
|
43
|
+
regexp_parser (>= 1.8, < 3.0)
|
44
|
+
rexml
|
45
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
46
|
+
ruby-progressbar (~> 1.7)
|
47
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
48
|
+
rubocop-ast (1.5.0)
|
49
|
+
parser (>= 3.0.1.1)
|
50
|
+
rubocop-performance (1.11.2)
|
51
|
+
rubocop (>= 1.7.0, < 2.0)
|
52
|
+
rubocop-ast (>= 0.4.0)
|
53
|
+
ruby-progressbar (1.11.0)
|
54
|
+
standard (1.1.1)
|
55
|
+
rubocop (= 1.14.0)
|
56
|
+
rubocop-performance (= 1.11.2)
|
57
|
+
standardrb (1.0.0)
|
58
|
+
standard
|
59
|
+
unicode-display_width (2.0.0)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
ruby
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
avro (~> 1.10)
|
66
|
+
neon_schemas!
|
67
|
+
pry (~> 0.14.1)
|
68
|
+
rake (~> 12.0)
|
69
|
+
rspec (~> 3.0)
|
70
|
+
standardrb (~> 1.0)
|
71
|
+
|
72
|
+
BUNDLED WITH
|
73
|
+
2.1.4
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Neon Schemas
|
2
|
+
|
3
|
+
This is a package in Node and Ruby that contain schemas written in [Apache
|
4
|
+
Avro](https://avro.apache.org/docs/current/spec.html#schemas) for **all** of our
|
5
|
+
microservices.
|
6
|
+
|
7
|
+
This package can be included to guarantee correct publishing and subscribing of
|
8
|
+
messages from our message queue.
|
9
|
+
|
10
|
+
## Upgrading the GCP Schema
|
11
|
+
|
12
|
+
You can update the GCP Pub/Sub schema with the GCloud CLI.
|
13
|
+
|
14
|
+
```bash
|
15
|
+
gcloud config set project neon-law-staging # or neon-law-production
|
16
|
+
|
17
|
+
# list topics
|
18
|
+
gcloud pubsub topics list
|
19
|
+
|
20
|
+
# Add schema
|
21
|
+
gcloud beta pubsub schemas create outbound_email \
|
22
|
+
--type=avro \
|
23
|
+
--definition="$(cat ./src/outbound_email.avsc)"
|
24
|
+
|
25
|
+
# Create the outbound email topic
|
26
|
+
gcloud beta pubsub topics create outbound_email \
|
27
|
+
--message-encoding=BINARY \
|
28
|
+
--schema=outbound_email
|
29
|
+
# Create the dead-letter-queue outbound-email-topic
|
30
|
+
gcloud beta pubsub topics create outbound_email_dlq \
|
31
|
+
--message-encoding=BINARY \
|
32
|
+
--schema=outbound_email
|
33
|
+
|
34
|
+
# Create the subscription
|
35
|
+
gcloud pubsub subscriptions create outbound_email \
|
36
|
+
--topic=outbound_email \
|
37
|
+
--ack-deadline=30 \
|
38
|
+
--dead-letter-topic=outbound_email_dlq \
|
39
|
+
--max-delivery-attempts=10
|
40
|
+
```
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "schemas"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/neon_schemas.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require "neon_schemas/version"
|
2
|
+
require "avro"
|
3
|
+
|
4
|
+
module NeonSchemas
|
5
|
+
class Error < StandardError; end
|
6
|
+
|
7
|
+
class Avro
|
8
|
+
SCHEMA_DIRECTORY = "#{__dir__}/../src"
|
9
|
+
|
10
|
+
def self.encode(record:, schema_name:)
|
11
|
+
avro_schema = ::Avro::Schema.parse(
|
12
|
+
File.read("#{SCHEMA_DIRECTORY}/#{schema_name}.avsc")
|
13
|
+
)
|
14
|
+
writer = ::Avro::IO::DatumWriter.new avro_schema
|
15
|
+
buffer = ::StringIO.new
|
16
|
+
encoder = ::Avro::IO::BinaryEncoder.new buffer
|
17
|
+
|
18
|
+
writer.write record, encoder
|
19
|
+
|
20
|
+
buffer
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.decode(string:, schema_name:)
|
24
|
+
avro_schema = ::Avro::Schema.parse(
|
25
|
+
File.read("#{SCHEMA_DIRECTORY}/#{schema_name}.avsc")
|
26
|
+
)
|
27
|
+
buffer = ::StringIO.new string
|
28
|
+
decoder = ::Avro::IO::BinaryDecoder.new buffer
|
29
|
+
reader = ::Avro::IO::DatumReader.new avro_schema
|
30
|
+
|
31
|
+
json = reader.read(decoder).to_json
|
32
|
+
|
33
|
+
JSON.parse(json, symbolize_names: true)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative "lib/neon_schemas/version"
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "neon_schemas"
|
5
|
+
spec.version = NeonSchemas::VERSION
|
6
|
+
spec.authors = ["Neon Law"]
|
7
|
+
spec.email = ["support@neonlaw.com"]
|
8
|
+
|
9
|
+
spec.summary = "A gem containing schemas and encoding/decoding Avro classes"
|
10
|
+
spec.description = spec.summary
|
11
|
+
spec.homepage = "https://github.com/neonlaw/codebase"
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
13
|
+
|
14
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
15
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
16
|
+
spec.metadata["changelog_uri"] = spec.homepage
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
end
|
data/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "@neonlaw/schemas",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"license": "Apache-2.0",
|
5
|
+
"author": "@neonlaw",
|
6
|
+
"scripts": {
|
7
|
+
"check-types": "tsc -p .",
|
8
|
+
"lint": "eslint './**/*.{js,jsx,ts,tsx}'"
|
9
|
+
},
|
10
|
+
"dependencies": {
|
11
|
+
"avro-js": "^1.10.2"
|
12
|
+
},
|
13
|
+
"devDependencies": {}
|
14
|
+
}
|
data/poetry.lock
ADDED
@@ -0,0 +1,294 @@
|
|
1
|
+
[[package]]
|
2
|
+
category = "dev"
|
3
|
+
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
4
|
+
name = "appdirs"
|
5
|
+
optional = false
|
6
|
+
python-versions = "*"
|
7
|
+
version = "1.4.4"
|
8
|
+
|
9
|
+
[[package]]
|
10
|
+
category = "dev"
|
11
|
+
description = "Atomic file writes."
|
12
|
+
marker = "sys_platform == \"win32\""
|
13
|
+
name = "atomicwrites"
|
14
|
+
optional = false
|
15
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
16
|
+
version = "1.4.0"
|
17
|
+
|
18
|
+
[[package]]
|
19
|
+
category = "dev"
|
20
|
+
description = "Classes Without Boilerplate"
|
21
|
+
name = "attrs"
|
22
|
+
optional = false
|
23
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
24
|
+
version = "21.2.0"
|
25
|
+
|
26
|
+
[package.extras]
|
27
|
+
dev = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"]
|
28
|
+
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
|
29
|
+
tests = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"]
|
30
|
+
tests_no_zope = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"]
|
31
|
+
|
32
|
+
[[package]]
|
33
|
+
category = "main"
|
34
|
+
description = "Avro is a serialization and RPC framework."
|
35
|
+
name = "avro"
|
36
|
+
optional = false
|
37
|
+
python-versions = ">=2.7"
|
38
|
+
version = "1.10.2"
|
39
|
+
|
40
|
+
[package.extras]
|
41
|
+
snappy = ["python-snappy"]
|
42
|
+
zstandard = ["zstandard"]
|
43
|
+
|
44
|
+
[[package]]
|
45
|
+
category = "dev"
|
46
|
+
description = "The uncompromising code formatter."
|
47
|
+
name = "black"
|
48
|
+
optional = false
|
49
|
+
python-versions = ">=3.6.2"
|
50
|
+
version = "21.5b1"
|
51
|
+
|
52
|
+
[package.dependencies]
|
53
|
+
appdirs = "*"
|
54
|
+
click = ">=7.1.2"
|
55
|
+
mypy-extensions = ">=0.4.3"
|
56
|
+
pathspec = ">=0.8.1,<1"
|
57
|
+
regex = ">=2020.1.8"
|
58
|
+
toml = ">=0.10.1"
|
59
|
+
|
60
|
+
[package.extras]
|
61
|
+
colorama = ["colorama (>=0.4.3)"]
|
62
|
+
d = ["aiohttp (>=3.6.0)", "aiohttp-cors"]
|
63
|
+
python2 = ["typed-ast (>=1.4.2)"]
|
64
|
+
|
65
|
+
[[package]]
|
66
|
+
category = "dev"
|
67
|
+
description = "Composable command line interface toolkit"
|
68
|
+
name = "click"
|
69
|
+
optional = false
|
70
|
+
python-versions = ">=3.6"
|
71
|
+
version = "8.0.0"
|
72
|
+
|
73
|
+
[package.dependencies]
|
74
|
+
colorama = "*"
|
75
|
+
|
76
|
+
[[package]]
|
77
|
+
category = "dev"
|
78
|
+
description = "Cross-platform colored terminal text."
|
79
|
+
marker = "sys_platform == \"win32\" or platform_system == \"Windows\""
|
80
|
+
name = "colorama"
|
81
|
+
optional = false
|
82
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
83
|
+
version = "0.4.4"
|
84
|
+
|
85
|
+
[[package]]
|
86
|
+
category = "dev"
|
87
|
+
description = "iniconfig: brain-dead simple config-ini parsing"
|
88
|
+
name = "iniconfig"
|
89
|
+
optional = false
|
90
|
+
python-versions = "*"
|
91
|
+
version = "1.1.1"
|
92
|
+
|
93
|
+
[[package]]
|
94
|
+
category = "dev"
|
95
|
+
description = "Experimental type system extensions for programs checked with the mypy typechecker."
|
96
|
+
name = "mypy-extensions"
|
97
|
+
optional = false
|
98
|
+
python-versions = "*"
|
99
|
+
version = "0.4.3"
|
100
|
+
|
101
|
+
[[package]]
|
102
|
+
category = "dev"
|
103
|
+
description = "Core utilities for Python packages"
|
104
|
+
name = "packaging"
|
105
|
+
optional = false
|
106
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
107
|
+
version = "20.9"
|
108
|
+
|
109
|
+
[package.dependencies]
|
110
|
+
pyparsing = ">=2.0.2"
|
111
|
+
|
112
|
+
[[package]]
|
113
|
+
category = "dev"
|
114
|
+
description = "Utility library for gitignore style pattern matching of file paths."
|
115
|
+
name = "pathspec"
|
116
|
+
optional = false
|
117
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
118
|
+
version = "0.8.1"
|
119
|
+
|
120
|
+
[[package]]
|
121
|
+
category = "dev"
|
122
|
+
description = "plugin and hook calling mechanisms for python"
|
123
|
+
name = "pluggy"
|
124
|
+
optional = false
|
125
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
126
|
+
version = "0.13.1"
|
127
|
+
|
128
|
+
[package.extras]
|
129
|
+
dev = ["pre-commit", "tox"]
|
130
|
+
|
131
|
+
[[package]]
|
132
|
+
category = "dev"
|
133
|
+
description = "library with cross-python path, ini-parsing, io, code, log facilities"
|
134
|
+
name = "py"
|
135
|
+
optional = false
|
136
|
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
137
|
+
version = "1.10.0"
|
138
|
+
|
139
|
+
[[package]]
|
140
|
+
category = "dev"
|
141
|
+
description = "Python parsing module"
|
142
|
+
name = "pyparsing"
|
143
|
+
optional = false
|
144
|
+
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
|
145
|
+
version = "2.4.7"
|
146
|
+
|
147
|
+
[[package]]
|
148
|
+
category = "dev"
|
149
|
+
description = "pytest: simple powerful testing with Python"
|
150
|
+
name = "pytest"
|
151
|
+
optional = false
|
152
|
+
python-versions = ">=3.6"
|
153
|
+
version = "6.2.4"
|
154
|
+
|
155
|
+
[package.dependencies]
|
156
|
+
atomicwrites = ">=1.0"
|
157
|
+
attrs = ">=19.2.0"
|
158
|
+
colorama = "*"
|
159
|
+
iniconfig = "*"
|
160
|
+
packaging = "*"
|
161
|
+
pluggy = ">=0.12,<1.0.0a1"
|
162
|
+
py = ">=1.8.2"
|
163
|
+
toml = "*"
|
164
|
+
|
165
|
+
[package.extras]
|
166
|
+
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
|
167
|
+
|
168
|
+
[[package]]
|
169
|
+
category = "dev"
|
170
|
+
description = "Alternative regular expression module, to replace re."
|
171
|
+
name = "regex"
|
172
|
+
optional = false
|
173
|
+
python-versions = "*"
|
174
|
+
version = "2021.4.4"
|
175
|
+
|
176
|
+
[[package]]
|
177
|
+
category = "dev"
|
178
|
+
description = "Python Library for Tom's Obvious, Minimal Language"
|
179
|
+
name = "toml"
|
180
|
+
optional = false
|
181
|
+
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
|
182
|
+
version = "0.10.2"
|
183
|
+
|
184
|
+
[metadata]
|
185
|
+
content-hash = "fc966e492a1e152083e16aee2508d21f7d146ff185b298ac08acbb6c28cc9875"
|
186
|
+
python-versions = "^3.8"
|
187
|
+
|
188
|
+
[metadata.files]
|
189
|
+
appdirs = [
|
190
|
+
{file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"},
|
191
|
+
{file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"},
|
192
|
+
]
|
193
|
+
atomicwrites = [
|
194
|
+
{file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"},
|
195
|
+
{file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
|
196
|
+
]
|
197
|
+
attrs = [
|
198
|
+
{file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"},
|
199
|
+
{file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"},
|
200
|
+
]
|
201
|
+
avro = [
|
202
|
+
{file = "avro-1.10.2.tar.gz", hash = "sha256:381b990cc4c4444743c3297348ffd46e0c3a5d7a17e15b2f4a9042f6e955c31a"},
|
203
|
+
]
|
204
|
+
black = [
|
205
|
+
{file = "black-21.5b1-py3-none-any.whl", hash = "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008"},
|
206
|
+
{file = "black-21.5b1.tar.gz", hash = "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1"},
|
207
|
+
]
|
208
|
+
click = [
|
209
|
+
{file = "click-8.0.0-py3-none-any.whl", hash = "sha256:e90e62ced43dc8105fb9a26d62f0d9340b5c8db053a814e25d95c19873ae87db"},
|
210
|
+
{file = "click-8.0.0.tar.gz", hash = "sha256:7d8c289ee437bcb0316820ccee14aefcb056e58d31830ecab8e47eda6540e136"},
|
211
|
+
]
|
212
|
+
colorama = [
|
213
|
+
{file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},
|
214
|
+
{file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"},
|
215
|
+
]
|
216
|
+
iniconfig = [
|
217
|
+
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
218
|
+
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
|
219
|
+
]
|
220
|
+
mypy-extensions = [
|
221
|
+
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
|
222
|
+
{file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
|
223
|
+
]
|
224
|
+
packaging = [
|
225
|
+
{file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"},
|
226
|
+
{file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"},
|
227
|
+
]
|
228
|
+
pathspec = [
|
229
|
+
{file = "pathspec-0.8.1-py2.py3-none-any.whl", hash = "sha256:aa0cb481c4041bf52ffa7b0d8fa6cd3e88a2ca4879c533c9153882ee2556790d"},
|
230
|
+
{file = "pathspec-0.8.1.tar.gz", hash = "sha256:86379d6b86d75816baba717e64b1a3a3469deb93bb76d613c9ce79edc5cb68fd"},
|
231
|
+
]
|
232
|
+
pluggy = [
|
233
|
+
{file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"},
|
234
|
+
{file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"},
|
235
|
+
]
|
236
|
+
py = [
|
237
|
+
{file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"},
|
238
|
+
{file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"},
|
239
|
+
]
|
240
|
+
pyparsing = [
|
241
|
+
{file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
|
242
|
+
{file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
|
243
|
+
]
|
244
|
+
pytest = [
|
245
|
+
{file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"},
|
246
|
+
{file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"},
|
247
|
+
]
|
248
|
+
regex = [
|
249
|
+
{file = "regex-2021.4.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:619d71c59a78b84d7f18891fe914446d07edd48dc8328c8e149cbe0929b4e000"},
|
250
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:47bf5bf60cf04d72bf6055ae5927a0bd9016096bf3d742fa50d9bf9f45aa0711"},
|
251
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:281d2fd05555079448537fe108d79eb031b403dac622621c78944c235f3fcf11"},
|
252
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:bd28bc2e3a772acbb07787c6308e00d9626ff89e3bfcdebe87fa5afbfdedf968"},
|
253
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:7c2a1af393fcc09e898beba5dd59196edaa3116191cc7257f9224beaed3e1aa0"},
|
254
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c38c71df845e2aabb7fb0b920d11a1b5ac8526005e533a8920aea97efb8ec6a4"},
|
255
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:96fcd1888ab4d03adfc9303a7b3c0bd78c5412b2bfbe76db5b56d9eae004907a"},
|
256
|
+
{file = "regex-2021.4.4-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:ade17eb5d643b7fead300a1641e9f45401c98eee23763e9ed66a43f92f20b4a7"},
|
257
|
+
{file = "regex-2021.4.4-cp36-cp36m-win32.whl", hash = "sha256:e8e5b509d5c2ff12f8418006d5a90e9436766133b564db0abaec92fd27fcee29"},
|
258
|
+
{file = "regex-2021.4.4-cp36-cp36m-win_amd64.whl", hash = "sha256:11d773d75fa650cd36f68d7ca936e3c7afaae41b863b8c387a22aaa78d3c5c79"},
|
259
|
+
{file = "regex-2021.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d3029c340cfbb3ac0a71798100ccc13b97dddf373a4ae56b6a72cf70dfd53bc8"},
|
260
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:18c071c3eb09c30a264879f0d310d37fe5d3a3111662438889ae2eb6fc570c31"},
|
261
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:4c557a7b470908b1712fe27fb1ef20772b78079808c87d20a90d051660b1d69a"},
|
262
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:01afaf2ec48e196ba91b37451aa353cb7eda77efe518e481707e0515025f0cd5"},
|
263
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:3a9cd17e6e5c7eb328517969e0cb0c3d31fd329298dd0c04af99ebf42e904f82"},
|
264
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:90f11ff637fe8798933fb29f5ae1148c978cccb0452005bf4c69e13db951e765"},
|
265
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:919859aa909429fb5aa9cf8807f6045592c85ef56fdd30a9a3747e513db2536e"},
|
266
|
+
{file = "regex-2021.4.4-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:339456e7d8c06dd36a22e451d58ef72cef293112b559010db3d054d5560ef439"},
|
267
|
+
{file = "regex-2021.4.4-cp37-cp37m-win32.whl", hash = "sha256:67bdb9702427ceddc6ef3dc382455e90f785af4c13d495f9626861763ee13f9d"},
|
268
|
+
{file = "regex-2021.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:32e65442138b7b76dd8173ffa2cf67356b7bc1768851dded39a7a13bf9223da3"},
|
269
|
+
{file = "regex-2021.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1e1c20e29358165242928c2de1482fb2cf4ea54a6a6dea2bd7a0e0d8ee321500"},
|
270
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:314d66636c494ed9c148a42731b3834496cc9a2c4251b1661e40936814542b14"},
|
271
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6d1b01031dedf2503631d0903cb563743f397ccaf6607a5e3b19a3d76fc10480"},
|
272
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:741a9647fcf2e45f3a1cf0e24f5e17febf3efe8d4ba1281dcc3aa0459ef424dc"},
|
273
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:4c46e22a0933dd783467cf32b3516299fb98cfebd895817d685130cc50cd1093"},
|
274
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:e512d8ef5ad7b898cdb2d8ee1cb09a8339e4f8be706d27eaa180c2f177248a10"},
|
275
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:980d7be47c84979d9136328d882f67ec5e50008681d94ecc8afa8a65ed1f4a6f"},
|
276
|
+
{file = "regex-2021.4.4-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:ce15b6d103daff8e9fee13cf7f0add05245a05d866e73926c358e871221eae87"},
|
277
|
+
{file = "regex-2021.4.4-cp38-cp38-win32.whl", hash = "sha256:a91aa8619b23b79bcbeb37abe286f2f408d2f2d6f29a17237afda55bb54e7aac"},
|
278
|
+
{file = "regex-2021.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:c0502c0fadef0d23b128605d69b58edb2c681c25d44574fc673b0e52dce71ee2"},
|
279
|
+
{file = "regex-2021.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:598585c9f0af8374c28edd609eb291b5726d7cbce16be6a8b95aa074d252ee17"},
|
280
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:ee54ff27bf0afaf4c3b3a62bcd016c12c3fdb4ec4f413391a90bd38bc3624605"},
|
281
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7d9884d86dd4dd489e981d94a65cd30d6f07203d90e98f6f657f05170f6324c9"},
|
282
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:bf5824bfac591ddb2c1f0a5f4ab72da28994548c708d2191e3b87dd207eb3ad7"},
|
283
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:563085e55b0d4fb8f746f6a335893bda5c2cef43b2f0258fe1020ab1dd874df8"},
|
284
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9c3db21af35e3b3c05764461b262d6f05bbca08a71a7849fd79d47ba7bc33ed"},
|
285
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:3916d08be28a1149fb97f7728fca1f7c15d309a9f9682d89d79db75d5e52091c"},
|
286
|
+
{file = "regex-2021.4.4-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:fd45ff9293d9274c5008a2054ecef86a9bfe819a67c7be1afb65e69b405b3042"},
|
287
|
+
{file = "regex-2021.4.4-cp39-cp39-win32.whl", hash = "sha256:fa4537fb4a98fe8fde99626e4681cc644bdcf2a795038533f9f711513a862ae6"},
|
288
|
+
{file = "regex-2021.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:97f29f57d5b84e73fbaf99ab3e26134e6687348e95ef6b48cfd2c06807005a07"},
|
289
|
+
{file = "regex-2021.4.4.tar.gz", hash = "sha256:52ba3d3f9b942c49d7e4bc105bb28551c44065f139a65062ab7912bef10c9afb"},
|
290
|
+
]
|
291
|
+
toml = [
|
292
|
+
{file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
|
293
|
+
{file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
|
294
|
+
]
|
data/pyproject.toml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
[tool.poetry]
|
2
|
+
name = "neon_schemas"
|
3
|
+
version = "0.1.0"
|
4
|
+
description = "Schemas for Neon Law"
|
5
|
+
authors = ["neon law <support@neonlaw.com>"]
|
6
|
+
license = "Apache-2.0"
|
7
|
+
|
8
|
+
[tool.poetry.dependencies]
|
9
|
+
python = "^3.8"
|
10
|
+
avro = "^1.10.2"
|
11
|
+
|
12
|
+
[tool.poetry.dev-dependencies]
|
13
|
+
pytest = "^6.2.4"
|
14
|
+
black = "^21.5b1"
|
15
|
+
|
16
|
+
[build-system]
|
17
|
+
requires = ["poetry>=0.12"]
|
18
|
+
build-backend = "poetry.masonry.api"
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"namespace": "com.neon_law.email",
|
3
|
+
"name": "outbound_email",
|
4
|
+
"type": "record",
|
5
|
+
"fields": [
|
6
|
+
{
|
7
|
+
"name": "email",
|
8
|
+
"type": "string",
|
9
|
+
"doc": "The 'to' email to send the email to."
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name": "email_type",
|
13
|
+
"type": [
|
14
|
+
{
|
15
|
+
"type" : "record",
|
16
|
+
"name" : "new_registration",
|
17
|
+
"namespace" : "com.neon_law.email",
|
18
|
+
"fields" : [
|
19
|
+
{
|
20
|
+
"type" : "string",
|
21
|
+
"name" : "sub"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"type" : "string",
|
25
|
+
"name" : "template",
|
26
|
+
"pattern": "^new_registration$"
|
27
|
+
}
|
28
|
+
],
|
29
|
+
"doc:" : "Subscribers to this message can send a welcome email."
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"type" : "record",
|
33
|
+
"name" : "new_document",
|
34
|
+
"namespace" : "com.neon_law.email",
|
35
|
+
"fields" : [
|
36
|
+
{
|
37
|
+
"type" : "string",
|
38
|
+
"name" : "sub"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"type" : "string",
|
42
|
+
"name" : "template",
|
43
|
+
"pattern": "^new_registration$"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"doc:" : "Subscribers to this message can send a welcome email."
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: neon_schemas
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Neon Law
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-05-22 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A gem containing schemas and encoding/decoding Avro classes
|
14
|
+
email:
|
15
|
+
- support@neonlaw.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".gitignore"
|
21
|
+
- ".rspec"
|
22
|
+
- Gemfile
|
23
|
+
- Gemfile.lock
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- bin/console
|
27
|
+
- bin/setup
|
28
|
+
- lib/neon_schemas.rb
|
29
|
+
- lib/neon_schemas/version.rb
|
30
|
+
- neon_schemas.gemspec
|
31
|
+
- package.json
|
32
|
+
- poetry.lock
|
33
|
+
- pyproject.toml
|
34
|
+
- src/outbound_email.avsc
|
35
|
+
homepage: https://github.com/neonlaw/codebase
|
36
|
+
licenses: []
|
37
|
+
metadata:
|
38
|
+
homepage_uri: https://github.com/neonlaw/codebase
|
39
|
+
source_code_uri: https://github.com/neonlaw/codebase
|
40
|
+
changelog_uri: https://github.com/neonlaw/codebase
|
41
|
+
post_install_message:
|
42
|
+
rdoc_options: []
|
43
|
+
require_paths:
|
44
|
+
- lib
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 2.3.0
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubygems_version: 3.2.15
|
57
|
+
signing_key:
|
58
|
+
specification_version: 4
|
59
|
+
summary: A gem containing schemas and encoding/decoding Avro classes
|
60
|
+
test_files: []
|