mirror of
https://github.com/valitydev/file-storage-proto.git
synced 2024-11-06 01:15:19 +00:00
parent
cc585392df
commit
89c2d94ce9
30
.github/workflows/erlang-pr.yml
vendored
30
.github/workflows/erlang-pr.yml
vendored
@ -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
|
||||
|
29
package-lock.json
generated
29
package-lock.json
generated
@ -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",
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
44
pom.xml
44
pom.xml
@ -17,6 +17,28 @@
|
||||
<name>file-storage-proto</name>
|
||||
<description>Generates jar artifact containing compiled thrift classes based on generated thrift IDL files
|
||||
</description>
|
||||
<url>https://github.com/valitydev/file-storage-proto</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<email>devs@vality.dev</email>
|
||||
<organization>Vality</organization>
|
||||
<organizationUrl>https://vality.dev</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/valitydev/file-storage-proto</connection>
|
||||
<developerConnection>scm:git:ssh://github.com/valitydev/file-storage-proto</developerConnection>
|
||||
<url>https://github.com/valitydev/file-storage-proto/tree/master</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@ -35,11 +57,26 @@
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>damsel</artifactId>
|
||||
<version>1.563-d384c12</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/proto</directory>
|
||||
<targetPath>${project.build.outputDirectory}/proto</targetPath>
|
||||
<includes>
|
||||
<include>*.thrift</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<!-- THRIFT -->
|
||||
<plugin>
|
||||
@ -61,7 +98,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
@ -75,8 +111,8 @@
|
||||
<configuration>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>dev.vality.damsel</pattern>
|
||||
<shadedPattern>dev.vality.damsel.v${commit.number}</shadedPattern>
|
||||
<pattern>dev.vality.file.storage</pattern>
|
||||
<shadedPattern>dev.vality.file.storage.v${commit.number}</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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<Value> Array
|
||||
typedef map<Value, Value> Object
|
15
rebar.config
15
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"}
|
||||
]}.
|
||||
|
@ -1 +1,4 @@
|
||||
[].
|
||||
[{<<"damsel">>,
|
||||
{git,"https://github.com/valitydev/damsel",
|
||||
{ref,"d384c125d16c0204e23b0d96a6ef791244a72315"}},
|
||||
0}].
|
||||
|
@ -3,7 +3,6 @@
|
||||
{vsn, "0.1.0"},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
fistful_proto
|
||||
stdlib
|
||||
]}
|
||||
]}.
|
||||
|
Loading…
Reference in New Issue
Block a user