diff --git a/.github/workflows/erlang-pr.yml b/.github/workflows/erlang-pr.yml
index d827c74..de5ae83 100644
--- a/.github/workflows/erlang-pr.yml
+++ b/.github/workflows/erlang-pr.yml
@@ -7,9 +7,27 @@ on:
jobs:
build:
- uses: valitydev/erlang-workflows/.github/workflows/erlang-parallel-build.yml@v1
- with:
- otp-version: 24
- rebar-version: 3
- use-thrift: true
- thrift-version: 0.14.2.2
+ name: Build and verify
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: valitydev/action-setup-thrift@v1
+
+ - uses: erlef/setup-beam@v1
+ id: beam
+ with:
+ otp-version: "24"
+ rebar3-version: "3.18"
+
+ - name: Restore PLT cache
+ uses: actions/cache@v2
+ id: plt-cache
+ with:
+ key: |
+ ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-plt
+ path: |
+ _build/default/rebar3_*_plt
+ - run: rebar3 compile
+ - run: rebar3 xref
+ - run: rebar3 dialyzer
diff --git a/README.md b/README.md
index 5647c40..665d74d 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1 @@
# file-storage-proto
-Описание протокола file-storage сервиса
diff --git a/package-lock.json b/package-lock.json
index cf25473..12a1da6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,8 @@
"version": "1.0.0",
"license": "Apache-2.0",
"devDependencies": {
- "@vality/thrift-codegen": "0.1.1-c81b4b7.0"
+ "@vality/thrift-codegen": "0.1.1-c81b4b7.0",
+ "damsel": "github:valitydev/damsel#d384c125d16c0204e23b0d96a6ef791244a72315"
}
},
"node_modules/@vality/thrift-codegen": {
@@ -44,9 +45,9 @@
}
},
"node_modules/@vality/thrift-ts/node_modules/ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz",
+ "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
"dev": true,
"engines": {
"node": ">=4"
@@ -352,6 +353,14 @@
"node": ">=4.8"
}
},
+ "node_modules/damsel": {
+ "name": "@vality/domain-proto",
+ "version": "1.0.0",
+ "resolved": "git+ssh://git@github.com/valitydev/damsel.git#d384c125d16c0204e23b0d96a6ef791244a72315",
+ "integrity": "sha512-nKveIqCrVhw3Pybb1MwiMpdDFcBXOE7PFNoG07g0VosPSPrLI6vOFtluXCtCNF7cUKu6U9/2aWJQnAY+orz/6w==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
"node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
@@ -987,9 +996,9 @@
},
"dependencies": {
"ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz",
+ "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
"dev": true
},
"cliui": {
@@ -1223,6 +1232,12 @@
"which": "^1.2.9"
}
},
+ "damsel": {
+ "version": "git+ssh://git@github.com/valitydev/damsel.git#d384c125d16c0204e23b0d96a6ef791244a72315",
+ "integrity": "sha512-nKveIqCrVhw3Pybb1MwiMpdDFcBXOE7PFNoG07g0VosPSPrLI6vOFtluXCtCNF7cUKu6U9/2aWJQnAY+orz/6w==",
+ "dev": true,
+ "from": "damsel@github:valitydev/damsel#d384c125d16c0204e23b0d96a6ef791244a72315"
+ },
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
diff --git a/package.json b/package.json
index c394e53..99be113 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"main": "./lib/file_storage.js",
"types": "./lib/file_storage.d.ts",
"devDependencies": {
- "@vality/thrift-codegen": "0.1.1-c81b4b7.0"
+ "@vality/thrift-codegen": "0.1.1-c81b4b7.0",
+ "damsel": "github:valitydev/damsel#d384c125d16c0204e23b0d96a6ef791244a72315"
}
}
diff --git a/pom.xml b/pom.xml
index 8918239..fcf5e2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,6 +17,28 @@
file-storage-proto
Generates jar artifact containing compiled thrift classes based on generated thrift IDL files
+ https://github.com/valitydev/file-storage-proto
+
+
+
+ The Apache Software License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+
+ devs@vality.dev
+ Vality
+ https://vality.dev
+
+
+
+
+ scm:git:git://github.com/valitydev/file-storage-proto
+ scm:git:ssh://github.com/valitydev/file-storage-proto
+ https://github.com/valitydev/file-storage-proto/tree/master
+
UTF-8
@@ -35,11 +57,26 @@
javax.annotation-api
1.3.2
+
+ dev.vality
+ damsel
+ 1.563-d384c12
+ provided
+
${project.artifactId}
-
+
+
+ ${project.basedir}/proto
+ ${project.build.outputDirectory}/proto
+
+ *.thrift
+
+ false
+
+
@@ -61,7 +98,6 @@
-
org.apache.maven.plugins
maven-shade-plugin
@@ -75,8 +111,8 @@
- dev.vality.damsel
- dev.vality.damsel.v${commit.number}
+ dev.vality.file.storage
+ dev.vality.file.storage.v${commit.number}
true
diff --git a/proto/base.thrift b/proto/base.thrift
deleted file mode 100644
index 7516828..0000000
--- a/proto/base.thrift
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace java dev.vality.file.storage.base
-namespace erlang file_storage_base
-
-/**
- * Отметка во времени согласно RFC 3339.
- *
- * Строка должна содержать дату и время в UTC в следующем формате:
- * `2016-03-22T06:12:27Z`.
- */
-typedef string Timestamp
-
-/** Идентификатор объекта */
-typedef string ID
-
diff --git a/proto/file_storage.thrift b/proto/file_storage.thrift
index 1900a2c..59bd5d9 100644
--- a/proto/file_storage.thrift
+++ b/proto/file_storage.thrift
@@ -1,5 +1,5 @@
-include "base.thrift"
-include "msgpack.thrift"
+include "proto/base.thrift"
+include "proto/msgpack.thrift"
namespace java dev.vality.file.storage
namespace erlang file_storage
diff --git a/proto/msgpack.thrift b/proto/msgpack.thrift
deleted file mode 100644
index a6983f3..0000000
--- a/proto/msgpack.thrift
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace java dev.vality.file.storage.msgpack
-namespace erlang file_storage_msgp
-
-/**
- * Значение в msgpack, согласно [спецификации](https://github.com/msgpack/msgpack/blob/master/spec.md).
- */
-union Value {
- 1: Nil nl
- 2: bool b
- 3: i64 i
- 4: double flt // Кроме ±Inf и NaN
- 5: string str
- 6: binary bin
- 7: Object obj
- 8: Array arr
-}
-
-struct Nil {}
-typedef list Array
-typedef map Object
diff --git a/rebar.config b/rebar.config
index a61e78b..fd88d85 100644
--- a/rebar.config
+++ b/rebar.config
@@ -25,6 +25,13 @@
warn_missing_spec_all
]}.
+{deps, [
+ {damsel,
+ {git, "https://github.com/valitydev/damsel.git",
+ {branch, "master"}}
+ }
+]}.
+
%% XRef checks
{xref_checks, [
undefined_function_calls,
@@ -50,7 +57,7 @@
{plugins, [
{rebar3_thrift_compiler,
- {git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.2"}}}
+ {git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {branch, "master"}}}
]}.
{provider_hooks, [
@@ -62,8 +69,6 @@
{thrift_compiler_opts, [
{in_dir, "proto"},
- {in_files, [
- "file_storage.thrift"
- ]},
- {gen, "erlang:app_prefix=fs,scoped_typenames"}
+ {in_files, all},
+ {gen, "erlang:scoped_typenames"}
]}.
diff --git a/rebar.lock b/rebar.lock
index 57afcca..ca0a432 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -1 +1,4 @@
-[].
+[{<<"damsel">>,
+ {git,"https://github.com/valitydev/damsel",
+ {ref,"d384c125d16c0204e23b0d96a6ef791244a72315"}},
+ 0}].
diff --git a/src/file_storage_proto.app.src b/src/file_storage_proto.app.src
index 45b5287..085b02a 100644
--- a/src/file_storage_proto.app.src
+++ b/src/file_storage_proto.app.src
@@ -3,7 +3,6 @@
{vsn, "0.1.0"},
{applications, [
kernel,
- stdlib,
- fistful_proto
+ stdlib
]}
]}.