diff --git a/package.json b/package.json index 99be113..c06a06d 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "types": "./lib/file_storage.d.ts", "devDependencies": { "@vality/thrift-codegen": "0.1.1-c81b4b7.0", - "damsel": "github:valitydev/damsel#d384c125d16c0204e23b0d96a6ef791244a72315" + "msgpack-proto": "github:valitydev/msgpack-proto#ce882a7f1c23248cab840fd672f247567679c9a4" } } diff --git a/pom.xml b/pom.xml index fcf5e2f..cd00656 100644 --- a/pom.xml +++ b/pom.xml @@ -59,8 +59,8 @@ dev.vality - damsel - 1.563-d384c12 + msgpack-proto + 1.14-7e44749 provided @@ -124,4 +124,4 @@ - \ No newline at end of file + diff --git a/proto/base.thrift b/proto/base.thrift new file mode 100644 index 0000000..efd2567 --- /dev/null +++ b/proto/base.thrift @@ -0,0 +1,13 @@ +namespace java dev.vality.file.storage.base +namespace erlang filestore.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 59bd5d9..9ff0740 100644 --- a/proto/file_storage.thrift +++ b/proto/file_storage.thrift @@ -1,8 +1,8 @@ -include "proto/base.thrift" +include "base.thrift" include "proto/msgpack.thrift" namespace java dev.vality.file.storage -namespace erlang file_storage +namespace erlang filestore.storage // время typedef base.Timestamp Timestamp diff --git a/rebar.config b/rebar.config index fd88d85..dce3260 100644 --- a/rebar.config +++ b/rebar.config @@ -1,6 +1,5 @@ %% Common project erlang options. {erl_opts, [ - % mandatory debug_info, warnings_as_errors, @@ -26,10 +25,7 @@ ]}. {deps, [ - {damsel, - {git, "https://github.com/valitydev/damsel.git", - {branch, "master"}} - } + {msgpack_proto, {git, "https://github.com/valitydev/msgpack-proto.git", {branch, "master"}}} ]}. %% XRef checks @@ -57,18 +53,17 @@ {plugins, [ {rebar3_thrift_compiler, - {git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {branch, "master"}}} + {git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {branch, "0.4"}}} ]}. {provider_hooks, [ {pre, [ {compile, {thrift, compile}}, - {clean , {thrift, clean }} + {clean, {thrift, clean}} ]} ]}. {thrift_compiler_opts, [ {in_dir, "proto"}, - {in_files, all}, - {gen, "erlang:scoped_typenames"} + {gen, "erlang:app_namespaces"} ]}. diff --git a/rebar.lock b/rebar.lock index ca0a432..e79fee0 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,4 +1,4 @@ -[{<<"damsel">>, - {git,"https://github.com/valitydev/damsel", - {ref,"d384c125d16c0204e23b0d96a6ef791244a72315"}}, +[{<<"msgpack_proto">>, + {git,"https://github.com/valitydev/msgpack-proto.git", + {ref,"7e447496aa5df4a5f1ace7ef2e3c31248b2a3ed0"}}, 0}]. diff --git a/src/file_storage_proto.app.src b/src/file_storage_proto.app.src index 085b02a..694e6ee 100644 --- a/src/file_storage_proto.app.src +++ b/src/file_storage_proto.app.src @@ -3,6 +3,7 @@ {vsn, "0.1.0"}, {applications, [ kernel, - stdlib + stdlib, + msgpack_proto ]} ]}.