-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (23 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
run:
go run main.go
proto:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
pb/*.proto
clean:
rm pb/*.pb.go
# grpcurl execution
create:
grpcurl --plaintext -d '{"product": {"product_id": "16672232323", "name": "Trial 30 days", "price": 10, "duration": 30, "description": "This is the description"}}' localhost:5011 OrderService.Create
changeStatus:
grpcurl --plaintext -d '{"order_id": "1671193878472", "status": "settlement"}' localhost:5011 OrderService.ChangeStatus
findOne:
grpcurl --plaintext -d '{"order_id": "1677757496694752039"}' localhost:5011 OrderService.FindOne
findAll:
grpcurl --plaintext -d '' localhost:5011 OrderService.FindAll
findAllByCustomer:
grpcurl --plaintext -d '{"user_id": "1667292823233", "status": "pending"}' localhost:5011 OrderService.FindAll
sum:
grpcurl --plaintext -d '{"status": "settlement"}' localhost:5011 OrderService.SumIncome
cancel:
grpcurl --plaintext -d '{"order_id": "1677483554496580841", "user_id": "1667292823233"}' localhost:5011 OrderService.Cancel