Pr/avatar (#319)

* feat: add avatar api
close #310

* chore: add description line

* fix: typo

* chore: reformat the json string to make it more readable and fix few bad indents

* fix: minimum go version

* feat: upload to Micro's CDN

* chore: delete redundant blank line

* chore: update README.md
This commit is contained in:
zhaoyang
2021-12-11 16:20:48 +08:00
committed by GitHub
parent f68c1cb08a
commit bba608b405
16 changed files with 664 additions and 64 deletions

28
avatar/Makefile Normal file
View File

@@ -0,0 +1,28 @@
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
go get github.com/micro/micro/v3/cmd/protoc-gen-openapi
.PHONY: api
api:
protoc --openapi_out=. --proto_path=. proto/avatar.proto
.PHONY: proto
proto:
protoc --proto_path=. --micro_out=. --go_out=:. proto/avatar.proto
.PHONY: build
build:
go build -o avatar *.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t avatar:latest