mirror of
https://github.com/valitydev/damsel.git
synced 2024-11-06 01:35:19 +00:00
TD-312: Ensure damsel is well-behaved rebar3 dependency (#43)
Also switch to valitydev/rebar3-thrift-compiler 0.4 / valitydev/thrift 0.14.2.3
This commit is contained in:
parent
d384c125d1
commit
dac2cb5994
2
.github/workflows/erlang-pr.yml
vendored
2
.github/workflows/erlang-pr.yml
vendored
@ -13,6 +13,8 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: valitydev/action-setup-thrift@v1
|
||||
with:
|
||||
thrift-version: "0.14.2.3"
|
||||
|
||||
- uses: erlef/setup-beam@v1
|
||||
id: beam
|
||||
|
@ -2,7 +2,8 @@ include 'base.thrift'
|
||||
include 'domain.thrift'
|
||||
|
||||
namespace java dev.vality.damsel.accounter
|
||||
namespace erlang accounter
|
||||
namespace erlang dmsl.accounter
|
||||
|
||||
typedef base.ID PlanID
|
||||
typedef i64 BatchID
|
||||
typedef i64 AccountID
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
namespace java dev.vality.damsel.base
|
||||
namespace erlang dmsl.base
|
||||
|
||||
/** Идентификатор */
|
||||
typedef string ID
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.damsel.claim_management
|
||||
namespace erlang claim_management
|
||||
namespace erlang dmsl.claimmgmt
|
||||
|
||||
include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
@ -2,10 +2,10 @@
|
||||
* Сервис для манипуляции непрозрачным контекстом объектов.
|
||||
*/
|
||||
|
||||
include "msgpack.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.context
|
||||
namespace erlang ctx
|
||||
namespace erlang dmsl.context
|
||||
|
||||
include "msgpack.thrift"
|
||||
|
||||
// Types
|
||||
|
||||
|
@ -7,7 +7,7 @@ include "msgpack.thrift"
|
||||
include "json.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.domain
|
||||
namespace erlang domain
|
||||
namespace erlang dmsl.domain
|
||||
|
||||
typedef i64 DataRevision
|
||||
typedef i32 ObjectID
|
||||
@ -2641,16 +2641,6 @@ struct Terminal {
|
||||
17: optional MerchantCategoryCode mcc
|
||||
}
|
||||
|
||||
union TerminalSelector {
|
||||
1: list<TerminalDecision> decisions
|
||||
2: set<ProviderTerminalRef> value
|
||||
}
|
||||
|
||||
struct TerminalDecision {
|
||||
1: required Predicate if_
|
||||
2: required TerminalSelector then_
|
||||
}
|
||||
|
||||
struct ProviderTerminalRef {
|
||||
1: required ObjectID id
|
||||
2: optional i64 priority = 1000
|
||||
|
@ -6,7 +6,7 @@
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.domain_config
|
||||
namespace erl domain
|
||||
namespace erlang dmsl.domain_conf
|
||||
|
||||
/**
|
||||
* Маркер вершины истории.
|
||||
|
@ -4,7 +4,7 @@ include "domain.thrift"
|
||||
// moved to https://github.com/valitydev/columbus-proto
|
||||
|
||||
namespace java dev.vality.damsel.columbus
|
||||
namespace erlang columbus
|
||||
namespace erlang dmsl.columbus
|
||||
|
||||
/**
|
||||
* Идентификатор места по базе http://www.geonames.org/
|
||||
|
@ -1,7 +1,7 @@
|
||||
include "base.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.identity_document_storage
|
||||
namespace erlang ident_doc_store
|
||||
namespace erlang dmsl.identdoc_storage
|
||||
|
||||
/**
|
||||
* Интерфейс для безопасного хранения идентификационных данных
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace erlang json
|
||||
namespace erlang dmsl.json
|
||||
namespace java dev.vality.damsel.json
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@ include "domain.thrift"
|
||||
include "geo_ip.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.merch_stat
|
||||
namespace erlang merchstat
|
||||
namespace erlang dmsl.merchstat
|
||||
|
||||
/**
|
||||
* Информация о платеже.
|
||||
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.message_sender
|
||||
namespace erlang message_sender
|
||||
namespace erlang dmsl.message_sender
|
||||
|
||||
struct MessageAttachment{
|
||||
1: required string name
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace erlang msgpack
|
||||
namespace erlang dmsl.msgpack
|
||||
namespace java dev.vality.damsel.msgpack
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
include "domain_config.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.papidmt
|
||||
namespace erlang papidmt
|
||||
namespace erlang dmsl.papidmt
|
||||
|
||||
struct HistoryWrapper {
|
||||
1: required domain_config.History history
|
||||
|
@ -10,7 +10,7 @@ include "repairing.thrift"
|
||||
include "msgpack.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.payment_processing
|
||||
namespace erlang payproc
|
||||
namespace erlang dmsl.payproc
|
||||
|
||||
/* Events */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.damsel.payment_processing.errors
|
||||
namespace erlang payprocerr
|
||||
namespace erlang dmsl.payproc_error
|
||||
|
||||
/**
|
||||
* TODO
|
||||
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.payment_tool_provider
|
||||
namespace erlang paytoolprv
|
||||
namespace erlang dmsl.paytool_provider
|
||||
|
||||
/**
|
||||
Атрибуты магазина в системе упакованные в идентификатор передаваемый провайдеру.
|
||||
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.payment_tool_token
|
||||
namespace erlang ptt
|
||||
namespace erlang dmsl.paytool_token
|
||||
|
||||
/**
|
||||
Платежный токен, который передается плательщику. Платежный токен содержит
|
||||
|
@ -3,7 +3,7 @@ include "domain.thrift"
|
||||
include "msgpack.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.payout_processing
|
||||
namespace erlang payout_processing
|
||||
namespace erlang dmsl.payout_processing
|
||||
|
||||
typedef base.ID PayoutID
|
||||
typedef list<Event> Events
|
||||
|
@ -1,7 +1,7 @@
|
||||
include "base.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.preauth
|
||||
namespace erlang preauth
|
||||
namespace erlang dmsl.preauth
|
||||
|
||||
union Status {
|
||||
1: Granted granted
|
||||
|
@ -1,70 +0,0 @@
|
||||
include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.proto_limiter
|
||||
namespace erlang proto_limiter
|
||||
|
||||
/**
|
||||
* Описание сущностей лимитов является частью микросервиса proto-limiter
|
||||
*/
|
||||
|
||||
typedef base.ID LimitChangeID
|
||||
typedef domain.TurnoverLimitID LimitID
|
||||
|
||||
struct Limit {
|
||||
1: required LimitID id
|
||||
2: required domain.Cash cash
|
||||
3: optional base.Timestamp creation_time
|
||||
4: optional base.Timestamp reload_time
|
||||
5: optional string description
|
||||
}
|
||||
|
||||
struct LimitChange {
|
||||
1: required LimitID id
|
||||
2: required LimitChangeID change_id
|
||||
3: required domain.Cash cash
|
||||
4: required base.Timestamp operation_timestamp
|
||||
}
|
||||
|
||||
exception LimitNotFound {}
|
||||
exception LimitChangeNotFound {}
|
||||
exception RateCurrencyNotFound {
|
||||
1: required domain.CurrencySymbolicCode limit_currency
|
||||
2: required domain.CurrencySymbolicCode rate_currency
|
||||
}
|
||||
exception RateQuoteNotFound {}
|
||||
exception ForbiddenOperationAmount {
|
||||
1: required domain.Cash amount
|
||||
2: required domain.CashRange allowed_range
|
||||
}
|
||||
|
||||
service Limiter {
|
||||
Limit Get(1: LimitID id, 2: base.Timestamp timestamp) throws (
|
||||
1: LimitNotFound e1,
|
||||
2: base.InvalidRequest e3
|
||||
)
|
||||
void Hold(1: LimitChange change) throws (
|
||||
1: LimitNotFound e1,
|
||||
2: RateCurrencyNotFound e2,
|
||||
3: base.InvalidRequest e3,
|
||||
4: RateQuoteNotFound e4
|
||||
)
|
||||
void Commit(1: LimitChange change) throws (
|
||||
1: LimitNotFound e1,
|
||||
2: LimitChangeNotFound e2,
|
||||
3: base.InvalidRequest e3
|
||||
)
|
||||
void PartialCommit(1: LimitChange change) throws (
|
||||
1: LimitNotFound e1,
|
||||
2: LimitChangeNotFound e2,
|
||||
3: ForbiddenOperationAmount e3,
|
||||
4: base.InvalidRequest e4
|
||||
5: RateCurrencyNotFound e5,
|
||||
6: RateQuoteNotFound e6
|
||||
)
|
||||
void Rollback(1: LimitChange change) throws (
|
||||
1: LimitNotFound e1,
|
||||
2: LimitChangeNotFound e2,
|
||||
3: base.InvalidRequest e3
|
||||
)
|
||||
}
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.proxy_inspector
|
||||
namespace erlang proxy_inspector
|
||||
namespace erlang dmsl.proxy_inspector
|
||||
|
||||
/**
|
||||
* Набор данных для взаимодействия с инспекторским прокси.
|
||||
|
@ -4,7 +4,7 @@ include "user_interaction.thrift"
|
||||
include "timeout_behaviour.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.proxy_provider
|
||||
namespace erlang prxprv
|
||||
namespace erlang dmsl.proxy_provider
|
||||
|
||||
/**
|
||||
* Непрозрачное для процессинга состояние адаптера, связанное с определённой сессией взаимодействия
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
namespace java dev.vality.damsel.repairing
|
||||
namespace erlang repair
|
||||
namespace erlang dmsl.repair
|
||||
|
||||
include "base.thrift"
|
||||
|
||||
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.reports
|
||||
namespace erlang reports
|
||||
namespace erlang dmsl.reports
|
||||
|
||||
typedef base.Timestamp Timestamp
|
||||
typedef base.InvalidRequest InvalidRequest
|
||||
|
@ -5,6 +5,7 @@
|
||||
include "base.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.test
|
||||
namespace erlang dmsl.test
|
||||
|
||||
struct Shout {
|
||||
1: required string contents
|
||||
|
@ -1,5 +1,6 @@
|
||||
namespace erlang tmbhv
|
||||
namespace java dev.vality.damsel.timeout_behaviour
|
||||
namespace erlang dmsl.timeout_behaviour
|
||||
|
||||
include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
namespace java dev.vality.damsel.user_interaction
|
||||
include "base.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.user_interaction
|
||||
namespace erlang dmsl.user_interaction
|
||||
|
||||
/**
|
||||
* Строковый шаблон согласно [RFC6570](https://tools.ietf.org/html/rfc6570) Level 4.
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
include "payment_processing.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.walker
|
||||
namespace erlang walker
|
||||
namespace erlang dmsl.walker
|
||||
|
||||
typedef i64 ClaimID
|
||||
typedef domain.PartyID PartyID
|
||||
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.webhooker
|
||||
namespace erlang webhooker
|
||||
namespace erlang dmsl.webhooker
|
||||
|
||||
typedef string Url
|
||||
typedef string Key
|
||||
|
@ -2,7 +2,7 @@ include "base.thrift"
|
||||
include "domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.withdrawals.domain
|
||||
namespace erlang wthdm
|
||||
namespace erlang dmsl.wthd_domain
|
||||
|
||||
/// Domain
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.damsel.withdrawals.errors
|
||||
namespace erlang wtherr
|
||||
namespace erlang dmsl.wthd_error
|
||||
|
||||
union WithdrawalFailure {
|
||||
1: AuthorizationFailure authorization_failed
|
||||
|
@ -4,7 +4,7 @@ include "domain.thrift"
|
||||
include "withdrawals_domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.withdrawals.processing
|
||||
namespace erlang wthproc
|
||||
namespace erlang dmsl.wthdproc
|
||||
|
||||
/// Processing
|
||||
|
||||
|
@ -4,7 +4,7 @@ include "domain.thrift"
|
||||
include "withdrawals_domain.thrift"
|
||||
|
||||
namespace java dev.vality.damsel.withdrawals.provider_adapter
|
||||
namespace erlang wthadpt
|
||||
namespace erlang dmsl.wthd_provider
|
||||
|
||||
typedef domain.Failure Failure
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
%% Common project erlang options.
|
||||
{erl_opts, [
|
||||
|
||||
% mandatory
|
||||
debug_info,
|
||||
warnings_as_errors,
|
||||
@ -49,7 +48,7 @@
|
||||
|
||||
{plugins, [
|
||||
{rebar3_thrift_compiler,
|
||||
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.3.1"}}}
|
||||
{git, "https://github.com/valitydev/rebar3-thrift-compiler.git", {tag, "0.4"}}}
|
||||
]}.
|
||||
|
||||
{provider_hooks, [
|
||||
@ -61,5 +60,5 @@
|
||||
|
||||
{thrift_compiler_opts, [
|
||||
{in_dir, "proto"},
|
||||
{gen, "erlang:scoped_typenames,app_prefix=dmsl"}
|
||||
{gen, "erlang:app_namespaces"}
|
||||
]}.
|
||||
|
Loading…
Reference in New Issue
Block a user