From e85463c4a144a1bbcc0a88a1ef4f00b8e326edb1 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Tue, 20 Sep 2022 23:31:28 +0800 Subject: [PATCH] update proto --- go.mod | 1 - go.sum | 2 -- pkg/proto/admin_cms/admin_cms.proto | 2 +- pkg/proto/auth/auth.proto | 2 +- pkg/proto/auto_proto.sh | 6 +++--- pkg/proto/cache/cache.proto | 2 +- pkg/proto/friend/friend.proto | 2 +- pkg/proto/group/group.proto | 4 ++-- pkg/proto/msg/msg.proto | 2 +- pkg/proto/office/office.proto | 2 +- pkg/proto/organization/organization.proto | 2 +- pkg/proto/proto_dir.cfg | 6 +++++- pkg/proto/push/push.proto | 2 +- pkg/proto/relay/relay.proto | 2 +- pkg/proto/sdk_ws/ws.proto | 2 +- pkg/proto/user/user.proto | 4 ++-- 16 files changed, 22 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 6a51cfc08..200c0dcf3 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,6 @@ require ( github.com/go-playground/validator/v10 v10.11.0 github.com/go-redis/redis/v8 v8.11.5 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.1.0 github.com/golang/protobuf v1.5.2 github.com/gorilla/websocket v1.4.2 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 diff --git a/go.sum b/go.sum index e1f5a8e7f..59f0cdfb4 100644 --- a/go.sum +++ b/go.sum @@ -249,8 +249,6 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0= -github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= diff --git a/pkg/proto/admin_cms/admin_cms.proto b/pkg/proto/admin_cms/admin_cms.proto index 4f11aab01..bf1de9f53 100644 --- a/pkg/proto/admin_cms/admin_cms.proto +++ b/pkg/proto/admin_cms/admin_cms.proto @@ -1,6 +1,6 @@ syntax = "proto3"; option go_package = "./admin_cms;admin_cms"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; package admin_cms; diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto index 675aa1a02..bc4eaecf9 100644 --- a/pkg/proto/auth/auth.proto +++ b/pkg/proto/auth/auth.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; package pbAuth; option go_package = "./auth;pbAuth"; diff --git a/pkg/proto/auto_proto.sh b/pkg/proto/auto_proto.sh index 7ecece08e..3f0d03061 100644 --- a/pkg/proto/auto_proto.sh +++ b/pkg/proto/auto_proto.sh @@ -6,12 +6,12 @@ for ((i = 0; i < ${#all_proto[*]}; i++)); do proto=${all_proto[$i]} protoc -I ../../../ -I ./ --go_out=plugins=grpc:. $proto - s=`echo $proto | sed 's/ //g'` - v=${s//proto/pb.go} - protoc-go-inject-tag -input=./$v echo "protoc --go_out=plugins=grpc:." $proto done echo "proto file generate success..." find ./ -type f -path "*.pb.go"|xargs sed -i 's/\".\/sdk_ws\"/\"Open_IM\/pkg\/proto\/sdk_ws\"/g' + + + diff --git a/pkg/proto/cache/cache.proto b/pkg/proto/cache/cache.proto index 7e1eeabdf..f8bf74524 100644 --- a/pkg/proto/cache/cache.proto +++ b/pkg/proto/cache/cache.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./cache;cache"; package cache; diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 8f7827edc..10314d92a 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./friend;friend"; package friend; diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 852dbba5b..93a96eaff 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; -import "Open_IM/pkg/proto/sdk_ws/wrappers.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto"; option go_package = "./group;group"; package group; diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index a15a4f3c8..837df4754 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./msg;msg"; package msg; diff --git a/pkg/proto/office/office.proto b/pkg/proto/office/office.proto index 78e1e3517..65e9a7847 100644 --- a/pkg/proto/office/office.proto +++ b/pkg/proto/office/office.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./office;office"; package office; diff --git a/pkg/proto/organization/organization.proto b/pkg/proto/organization/organization.proto index ef7aedbf7..8de98c820 100644 --- a/pkg/proto/organization/organization.proto +++ b/pkg/proto/organization/organization.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./organization;organization"; package organization; diff --git a/pkg/proto/proto_dir.cfg b/pkg/proto/proto_dir.cfg index 99b94de97..854938208 100644 --- a/pkg/proto/proto_dir.cfg +++ b/pkg/proto/proto_dir.cfg @@ -8,9 +8,13 @@ all_proto=( group/group.proto user/user.proto rtc/rtc.proto - chat/chat.proto + msg/msg.proto push/push.proto relay/relay.proto sdk_ws/ws.proto conversation/conversation.proto + office/office.proto + cache/cache.proto + organization/organization.proto + ) diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index 5d91083b3..0954e8bc5 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./push;pbPush"; package push; diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index 556cd9686..7d7dd932d 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; option go_package = "./relay;pbRelay"; package relay; diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 5ade79c60..6c0500c09 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/wrappers.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto"; option go_package = "./sdk_ws;server_api_params"; package server_api_params; diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 39fff9f27..a32b6a594 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; -import "Open_IM/pkg/proto/conversation/conversation.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/conversation/conversation.proto"; option go_package = "./user;user"; package user;