update readme and proto
This commit is contained in:
parent
4ba1e91cee
commit
993ffe56f1
40
README.md
40
README.md
|
@ -2,6 +2,8 @@
|
|||
|
||||
Configuration items management. Used to configure all services using a broker to disseminate the configuration items.
|
||||
|
||||
This service handles the persistence of the configuration items of all services in a database, and sends values _via_ the broker.
|
||||
|
||||
Each item consists in :
|
||||
|
||||
- a **uuid** : a unique identifier for the configuration item
|
||||
|
@ -15,7 +17,9 @@ Practically, it's the other way round as it's easier to use this configuration s
|
|||
|
||||
## Available domains
|
||||
|
||||
- **USER** : user related configuration item
|
||||
- **AD** : ad related configuration items
|
||||
- **MATCHER** : matching algotithm related configuration items
|
||||
- **USER** : user related configuration items
|
||||
|
||||
## Requirements
|
||||
|
||||
|
@ -63,24 +67,16 @@ npm run migrate
|
|||
|
||||
The app exposes the following [gRPC](https://grpc.io/) services :
|
||||
|
||||
- **FindByUuid** : find a configuration item by its uuid
|
||||
- **Get** : get a configuration item by its domain and key
|
||||
|
||||
```json
|
||||
{
|
||||
"uuid": "80126a61-d128-4f96-afdb-92e33c75a3e1"
|
||||
"domain": "AD",
|
||||
"key": "seatsProposed"
|
||||
}
|
||||
```
|
||||
|
||||
- **FindAll** : find all configuration items; you can use pagination with `page` (default:_1_) and `perPage` (default:_10_)
|
||||
|
||||
```json
|
||||
{
|
||||
"page": 1,
|
||||
"perPage": 10
|
||||
}
|
||||
```
|
||||
|
||||
- **Create** : create a configuration item (note that uuid is optional, a uuid will be automatically attributed if it is not provided)
|
||||
- **Set** : create or update a configuration item
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -90,20 +86,12 @@ The app exposes the following [gRPC](https://grpc.io/) services :
|
|||
}
|
||||
```
|
||||
|
||||
- **Update** : update a configuration item value
|
||||
- **Delete** : delete a configuration item by its domain and key
|
||||
|
||||
```json
|
||||
{
|
||||
"value": "value2",
|
||||
"uuid": "30f49838-3f24-42bb-a489-8ffb480173ae"
|
||||
}
|
||||
```
|
||||
|
||||
- **Delete** : delete a configuration item by its uuid
|
||||
|
||||
```json
|
||||
{
|
||||
"uuid": "80126a61-d128-4f96-afdb-92e33c75a3e1"
|
||||
"domain": "AD",
|
||||
"key": "seatsProposed"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -117,9 +105,7 @@ The app exposes the following [gRPC](https://grpc.io/) services :
|
|||
|
||||
As mentionned earlier, RabbitMQ messages are sent after these events :
|
||||
|
||||
- **Create** (message : the created configuration item informations)
|
||||
|
||||
- **Update** (message : the updated configuration item informations)
|
||||
- **Set** (message : the created / updated configuration item informations)
|
||||
|
||||
- **Delete** (message : the uuid of the deleted configuration item)
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ package configuration;
|
|||
|
||||
service ConfigurationService {
|
||||
rpc Get(ConfigurationByDomainKey) returns (Configuration);
|
||||
rpc GetAll(ConfigurationFilter) returns (Configurations);
|
||||
rpc Set(Configuration) returns (ConfigurationId);
|
||||
rpc Delete(ConfigurationByDomainKey) returns (Empty);
|
||||
rpc Propagate(Empty) returns (Empty);
|
||||
|
@ -24,14 +23,4 @@ message Configuration {
|
|||
string value = 4;
|
||||
}
|
||||
|
||||
message ConfigurationFilter {
|
||||
optional int32 page = 1;
|
||||
optional int32 perPage = 2;
|
||||
}
|
||||
|
||||
message Configurations {
|
||||
repeated Configuration data = 1;
|
||||
int32 total = 2;
|
||||
}
|
||||
|
||||
message Empty {}
|
||||
|
|
Loading…
Reference in New Issue