add otp service (#88)

This commit is contained in:
Asim Aslam
2021-04-28 10:09:17 +01:00
committed by GitHub
parent 2c8708ad65
commit b96bb863e2
14 changed files with 720 additions and 0 deletions

26
otp/Makefile Normal file
View File

@@ -0,0 +1,26 @@
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: proto
proto:
protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=. proto/otp.proto
docs:
protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=. proto/otp.proto
@redoc-cli bundle api-otp.json
.PHONY: build
build:
go build -o otp *.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t otp:latest