sudo pacman -S protobuf
メモ:go toolにしたいがdockerの外なので悩ましい
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
npm install -g @grpc/proto-loader
dc up -d
- Backend:http://localhost:8080
- Frontend:http://localhost:5173
サービス一覧
grpc_cli ls localhost:8080
詳細
grpc_cli ls localhost:8080 diary.DiaryService -l
type表示
grpc_cli type localhost:8080 diary.CreateDiaryEntryRequest
remote call
grpc_cli call localhost:8080 DiaryService.CreateDiaryEntry 'title: "test",content:"test"'
日記検索
grpc_cli call localhost:8080 DiaryService.SearchDiaryEntries 'userID:"id" keyword:"%日記%"'