You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
jaydan 8f8902bc9d Merge remote-tracking branch 'origin/master' 17 hours ago
activity/v1 update 2 weeks ago
address/v1 adjust address 2 years ago
advert/v1 up 2 months ago
advert_activity/v1 up 5 months ago
advert_gateway/v1 up 6 months ago
app_gateway/v1 update 17 hours ago
auth/v1 update 2 months ago
background_management_gateway/v1 up 18 hours ago
background_management_user/v1 update 3 weeks ago
buff/v1 update 9 months ago
common up 2 months ago
conf update 2 months ago
configure/v1 update 2 months ago
container/v1 container 1 year ago
data_center/v1 update 2 weeks ago
document/v1 update 6 months ago
dress_up/v1 update 3 months ago
dynamic/v1 update 1 week ago
error update 2 months ago
feedback/v1 update 9 months ago
finance/v1 update 2 weeks ago
game_gateway/v1 appgateway 2 months ago
game_pod/v1 update 2 months ago
gateway/v1 清除房间公屏 2 days ago
gift/v1 update 3 days ago
guild/v1 up 3 weeks ago
im/v1 update 3 weeks ago
live/v1 up 18 hours ago
logger/v1 u 1 year ago
message/v1 up 11 months ago
mike/v1 up 3 days ago
pk/v1 update 2 months ago
proxy/v1 up 4 months ago
redis_task_queue/v1 update 7 months ago
room/v2 room 2 weeks ago
sensitive/v1 update 11 months ago
sms/v1 update 1 year ago
third_party save 2 years ago
timer_task/v1 update 9 months ago
user/v1 update 3 days ago
user_auth/v1 update 7 months ago
user_group/v1 update 1 year ago
user_profile/v1 update 10 months ago
wallet/v1 update 3 days ago
.gitignore 管理后台增加用户相关接口 1 year ago
Dockerfile up 1 month ago
Makefile app-gateway 1 month ago
README.md up 4 months ago
go.mod up 6 months ago
read.json update 7 months ago

README.md

jmproto

proto统一管理文件

初始化环境

## 在项目中初始化仓库变量
# 设置环境变量
export GIT_TERMINAL_PROMPT=1

# 绑定仓库SSH公钥
git config --global url."git.gz.internal.jumaiyx.cn:222".insteadof "https://git.gz.internal.jumaiyx.cn/"

#go env GOINSECURE="git.gz.internal.jumaiyx.cn"
 
# 指定仓库   
go env -w GOPRIVATE="git.gz.internal.jumaiyx.cn/"
go env -w GONOSUMDB="git.gz.internal.jumaiyx.cn/"
go env -w GONOPROXY="git.gz.internal.jumaiyx.cn/"

实操参考:Kratos API定义

例子

# 生成 proto 模板

kratos proto add api/helloworld/v1/helloword.proto

# 生成 client 源码
make api file_name=helloword

支持http

PS:如果服务需要接通网关对外支持,需要提供http支持,网关会代理到grpc

#导入
import "google/api/annotations.proto";
# service层下增加以下代码:
option (google.api.http) = {
  post: "/helloworld/{name}"
};

枚举类

# 常用枚举可以直接定义在error

go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest