cd .\deploy\
make up_build
curl --location 'http://localhost:8080/api/v1/reg' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "test@test.com",
"password": "password"
}'
- 201 | Created,
- 409 | Conflict,
- 400 | Bad Request,
- 500 | Internal Server Error,
- 503 | Service Unavailable
{ "message": "user registered" }
{ "code": 409, "developer_message": "user with such data is already registered" }
curl --location --request POST 'http://localhost:8080/api/v1/auth' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjOWE5ZjY3MS1lMmI1LTRiMzQtYWQzOS0yYjBkZDY2MjZhY2IiLCJleHAiOjE2ODE3NTU5OTcsImlhdCI6MTY4MTc1MjM5NywiaXNzIjoiYzlhOWY2NzEtZTJiNS00YjM0LWFkMzktMmIwZGQ2NjI2YWNiIiwic3ViIjoibG9nZ2VkX2luIiwiU2Vzc2lvbklEIjoiNzlmZmIwMzAtMGViMC00ZTM1LWFmM2ItOWI2NjBhNThlYTg3IiwiVXNlcklEIjoiYzlhOWY2NzEtZTJiNS00YjM0LWFkMzktMmIwZGQ2NjI2YWNiIn0.p96FzRNCZH9m8Vezb3aLdmyfK69aWHxmcv7DWexu22E' \
--data ''
- 200 | Status OK,
- 401 | Unauthorized,
- 400 | Bad Request,
- 500 | Internal Server Error,
- 503 | Service Unavailable
{ "message": "token is valid" }
{ "code": 400, "developer_message": "user not authorized" }
curl --location 'http://localhost:8080/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "test@test.com",
"password": "password"
}'
- 200 | Status OK,
- 401 | Unauthorized,
- 400 | Bad Request,
- 500 | Internal Server Error,
- 503 | Service Unavailable
{ "message": "user authorized", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJmMTVhYTc1OC03NjJjLTQzYWYtYThlZC02ZTU3ZWQ4OWM5ZWMiLCJleHAiOjE2ODE3NTY4ODMsImlhdCI6MTY4MTc1MzI4MywiaXNzIjoiZjE1YWE3NTgtNzYyYy00M2FmLWE4ZWQtNmU1N2VkODljOWVjIiwic3ViIjoibG9nZ2VkX2luIiwiU2Vzc2lvbklEIjoiOTMyNGYzNmItZGJlYi00MTYwLThhNjUtMWYyZjNlMDEyMzg5IiwiVXNlcklEIjoiZjE1YWE3NTgtNzYyYy00M2FmLWE4ZWQtNmU1N2VkODljOWVjIn0.G6InRQU1--pebGjcLLxZavJvykMlvse7E_jz1oWHVu4" }
{ "code": 400, "developer_message": "user not authorized" }
.
├── deploy
├── pkg
│ ├── store
│ │ └── postgres
│ ├── tool
│ │ └── transaction
│ └── type
│
└── service
└── auth
├── cmd
│ └── app
├── configs
├── internal
│ ├── delivery
│ │ └── http
│ │ ├── cookie
│ │ ├── middleware
│ │ ├── response
│ │ └── validator
│ ├── domain
│ │ └── user
│ ├── repository
│ │ └── storage
│ │ └── postgres
│ │ ├── dao
│ │ ├── migrations
│ │ └── worker
│ └── usecase
│ ├── adapters
│ │ └── storage
│ └── user
├── proto
└── utils
└── jwt