mirror of
https://github.com/valitydev/limiter-proto.git
synced 2024-11-06 00:35:18 +00:00
c5dfe39a00
Also use valitydev/thrift compiler v0.14.2.3 w/ `app_namespaces`. * Reuse Erlang CI workflow * Specify `damsel` as dependency
51 lines
1.1 KiB
Thrift
51 lines
1.1 KiB
Thrift
/**
|
|
* Машина хранящая временные интервалы
|
|
*/
|
|
|
|
namespace java dev.vality.limiter.range
|
|
namespace erlang limproto.range
|
|
|
|
include "proto/base.thrift"
|
|
include "proto/domain.thrift"
|
|
include "time_range.thrift"
|
|
|
|
/// Domain
|
|
|
|
typedef string LimitRangeID
|
|
typedef base.Timestamp Timestamp
|
|
|
|
struct LimitRange {
|
|
1: required LimitRangeID id
|
|
2: required time_range.TimeRangeType type
|
|
3: required Timestamp created_at
|
|
4: optional domain.CurrencySymbolicCode currency
|
|
}
|
|
|
|
struct LimitRangeState {
|
|
1: required LimitRangeID id
|
|
2: required time_range.TimeRangeType type
|
|
3: required Timestamp created_at
|
|
4: optional list<time_range.TimeRange> ranges
|
|
5: optional domain.CurrencySymbolicCode currency
|
|
}
|
|
|
|
/// LimitRange events
|
|
|
|
struct TimestampedChange {
|
|
1: required base.Timestamp occured_at
|
|
2: required Change change
|
|
}
|
|
|
|
union Change {
|
|
1: CreatedChange created
|
|
2: TimeRangeCreatedChange time_range_created
|
|
}
|
|
|
|
struct CreatedChange {
|
|
1: required LimitRange limit_range
|
|
}
|
|
|
|
struct TimeRangeCreatedChange {
|
|
1: required time_range.TimeRange time_range
|
|
}
|