An authorization service that works through a grpc connection.
First you need to create a protofile.
If you use standard queries, you can skip this step.
After the change, you need to rebuild the go files. To do this, use the command:
make proto
.
If you have changed the protofile and/or are launching the service for the first time, you must first build it.
in the future, a step-by-step assembly will be written and this will be handled by the docker himself
For building only service:
make buildServer
The config is located in the configs directory.
It should specify the:
- logging level;
- the port on which the service will run;
- validation parameters;
- params for mongodb.
If u will use docker-compose u shoulde change th .env file.
If you are not launching the service from docker-compose, you must specify the path to the config at startup (when using it):
./serverMain -config=./configs/example.yaml
or make a clean launch (then environment variables will be used):
./serverMain
If you are want launch service by docker-compose you can use Makefile command:
make
or make runservice
or run docker-compose by yourself.
Request for registration:
{
"email": "",
"password": ""
}
Response for registration:
{
"user_id": "",
}
Request for Loginning:
{
"email": "",
"password": "",
"app_id": ""
}
Response for Loginning:
{
"token": "",
}
Request for Loginning:
{
"user_id": "",
}
Response for Loginning:
{
"is_admin": false,
}