add the chat service (#381)

This commit is contained in:
Asim Aslam
2022-02-17 16:33:10 +00:00
committed by GitHub
parent 718466a4a1
commit c49ee7e8b1
13 changed files with 2846 additions and 23 deletions

27
chat/Makefile Normal file
View File

@@ -0,0 +1,27 @@
GOPATH:=$(shell go env GOPATH)
.PHONY: init
init:
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go
go get github.com/micro/micro/v3/cmd/protoc-gen-micro
.PHONY: api
api:
protoc --openapi_out=. --proto_path=. proto/chat.proto
.PHONY: proto
proto:
protoc --proto_path=. --micro_out=. --go_out=:. proto/chat.proto
.PHONY: build
build:
go build -o chat *.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t chat:latest