Commit 3527607f by 李洪

代码冲突

parents c6b8d157 30bcf9bb
...@@ -14,19 +14,19 @@ require ( ...@@ -14,19 +14,19 @@ require (
github.com/go-playground/universal-translator v0.17.0 // indirect github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-redis/redis/v8 v8.0.0-beta.5 github.com/go-redis/redis/v8 v8.0.0-beta.5
github.com/go-sql-driver/mysql v1.5.0 github.com/go-sql-driver/mysql v1.5.0
github.com/gogo/protobuf v1.3.1 // indirect github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.4.2 github.com/golang/protobuf v1.4.2
github.com/google/pprof v0.0.0-20200630070148-6609db78bf68 // indirect github.com/google/pprof v0.0.0-20200630070148-6609db78bf68 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
github.com/grpc-ecosystem/grpc-health-probe v0.3.2 // indirect github.com/grpc-ecosystem/grpc-health-probe v0.3.2 // indirect
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 // indirect github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20200703042025-6ce5b4c20f33 // indirect github.com/ianlancetaylor/demangle v0.0.0-20200705045648-b855e248e31b // indirect
github.com/kisielk/errcheck v1.3.0 // indirect github.com/kisielk/errcheck v1.3.0 // indirect
github.com/kr/pretty v0.2.0 // indirect github.com/kr/pretty v0.2.0 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/leodido/go-urn v1.2.0 // indirect github.com/leodido/go-urn v1.2.0 // indirect
github.com/lyft/protoc-gen-star v0.4.15 // indirect github.com/lyft/protoc-gen-star v0.4.15 // indirect
github.com/mwitkow/go-proto-validators v0.3.0 // indirect github.com/mwitkow/go-proto-validators v0.3.0
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.11.0 // indirect github.com/pkg/sftp v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect
......
...@@ -173,6 +173,7 @@ github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73t ...@@ -173,6 +173,7 @@ github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73t
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200703042025-6ce5b4c20f33/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200703042025-6ce5b4c20f33/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200705045648-b855e248e31b/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
......
...@@ -15,6 +15,10 @@ import ( ...@@ -15,6 +15,10 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
<<<<<<< HEAD
=======
grpc_validator "github.com/grpc-ecosystem/go-grpc-middleware/validator"
>>>>>>> 30bcf9bbb4a2d61c1a5a2ac567bba32654394af7
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/keepalive" "google.golang.org/grpc/keepalive"
"google.golang.org/grpc/reflection" "google.golang.org/grpc/reflection"
...@@ -40,8 +44,14 @@ func init() { ...@@ -40,8 +44,14 @@ func init() {
rpc_server := grpc.NewServer(grpc.KeepaliveEnforcementPolicy(kaep), grpc.KeepaliveParams(kasp), rpc_server := grpc.NewServer(grpc.KeepaliveEnforcementPolicy(kaep), grpc.KeepaliveParams(kasp),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer( grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
<<<<<<< HEAD
middleware.Interceptor, middleware.Interceptor,
//middleware.Auth, //middleware.Auth,
=======
grpc_validator.UnaryServerInterceptor(),
middleware.Interceptor,
middleware.Auth,
>>>>>>> 30bcf9bbb4a2d61c1a5a2ac567bba32654394af7
grpc_recovery.UnaryServerInterceptor(middleware.RecoveryInterceptor()), grpc_recovery.UnaryServerInterceptor(middleware.RecoveryInterceptor()),
grpc_zap.UnaryServerInterceptor(middleware.ZapInterceptor()), grpc_zap.UnaryServerInterceptor(middleware.ZapInterceptor()),
))) )))
......
{"level":"info","ts":"2020-07-03T14:56:45.414+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-03T14:56:45+08:00","grpc.request.deadline":"2020-07-03T14:56:48+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":35.28300094604492}
{"level":"info","ts":"2020-07-03T14:56:59.366+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-03T14:56:59+08:00","grpc.request.deadline":"2020-07-03T14:57:02+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":11.597999572753906}
{"level":"info","ts":"2020-07-06T11:19:34.115+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:19:34+08:00","grpc.request.deadline":"2020-07-06T11:19:37+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.039000000804662704}
{"level":"error","ts":"2020-07-06T11:19:34.118+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:20:36.556+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:20:36+08:00","grpc.request.deadline":"2020-07-06T11:20:39+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.07500000298023224}
{"level":"error","ts":"2020-07-06T11:20:36.556+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:22:08.743+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:22:08+08:00","grpc.request.deadline":"2020-07-06T11:22:11+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.032999999821186066}
{"level":"error","ts":"2020-07-06T11:22:08.743+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:23:10.498+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:23:10+08:00","grpc.request.deadline":"2020-07-06T11:23:13+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.04800000041723251}
{"level":"error","ts":"2020-07-06T11:23:10.499+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:24:08.161+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:24:08+08:00","grpc.request.deadline":"2020-07-06T11:24:11+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.04899999871850014}
{"level":"error","ts":"2020-07-06T11:24:08.161+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:25:42.985+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:25:42+08:00","grpc.request.deadline":"2020-07-06T11:25:45+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.04600000008940697}
{"level":"error","ts":"2020-07-06T11:25:42.985+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:26:47.197+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:26:47+08:00","grpc.request.deadline":"2020-07-06T11:26:50+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.039000000804662704}
{"level":"error","ts":"2020-07-06T11:26:47.197+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:27:08.533+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:27:08+08:00","grpc.request.deadline":"2020-07-06T11:27:11+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.04800000041723251}
{"level":"error","ts":"2020-07-06T11:27:08.534+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:27:33.158+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:27:33+08:00","grpc.request.deadline":"2020-07-06T11:27:36+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.0430000014603138}
{"level":"error","ts":"2020-07-06T11:27:33.158+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T11:28:57.627+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T11:28:57+08:00","grpc.request.deadline":"2020-07-06T11:29:00+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":0.04399999976158142}
{"level":"error","ts":"2020-07-06T11:28:57.628+0800","caller":"grpclog/grpclog.go:51","msg":"grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-06T13:42:58.519+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T13:42:58+08:00","grpc.request.deadline":"2020-07-06T13:43:01+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":33.638999938964844}
{"level":"info","ts":"2020-07-06T13:43:16.098+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-06T13:43:16+08:00","grpc.request.deadline":"2020-07-06T13:43:19+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.UserRelationshipService","grpc.method":"ListBlackAndMuteList","grpc.code":"OK","grpc.time_ms":17.27400016784668}
...@@ -68,18 +68,18 @@ func Auth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...@@ -68,18 +68,18 @@ func Auth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo,
curtime := c_r.FindAllStringSubmatch(s, -1) curtime := c_r.FindAllStringSubmatch(s, -1)
check_sum := cs_r.FindAllStringSubmatch(s, -1) check_sum := cs_r.FindAllStringSubmatch(s, -1)
if len(appkey) < 1 { //if len(appkey) < 1 {
return nil, permissionError("缺少appkey") // return nil, permissionError("缺少appkey")
} //}
if len(nonce) < 1 { //if len(nonce) < 1 {
return nil, permissionError("缺少nonce") // return nil, permissionError("缺少nonce")
} //}
if len(curtime) < 1 { //if len(curtime) < 1 {
return nil, permissionError("缺少curtime") // return nil, permissionError("缺少curtime")
} //}
if len(check_sum) < 1 { //if len(check_sum) < 1 {
return nil, permissionError("缺少checksum") // return nil, permissionError("缺少checksum")
} //}
request_map["Appkey"] = appkey[0][1] request_map["Appkey"] = appkey[0][1]
request_map["Nonce"] = nonce[0][1] request_map["Nonce"] = nonce[0][1]
request_map["Curtime"] = curtime[0][1] request_map["Curtime"] = curtime[0][1]
......
...@@ -9,6 +9,6 @@ import ( ...@@ -9,6 +9,6 @@ import (
// RecoveryInterceptor panic时返回Unknown错误吗 // RecoveryInterceptor panic时返回Unknown错误吗
func RecoveryInterceptor() grpc_recovery.Option { func RecoveryInterceptor() grpc_recovery.Option {
return grpc_recovery.WithRecoveryHandler(func(p interface{}) (err error) { return grpc_recovery.WithRecoveryHandler(func(p interface{}) (err error) {
return status.Error(codes.Unknown, "panic triggered: " + err.Error()) return status.Error(codes.Unknown, "panic triggered: "+err.Error())
}) })
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"go.uber.org/zap" "go.uber.org/zap"
"go.uber.org/zap/zapcore" "go.uber.org/zap/zapcore"
"gopkg.in/natefinch/lumberjack.v2" "gopkg.in/natefinch/lumberjack.v2"
) )
func ZapInterceptor() *zap.Logger { func ZapInterceptor() *zap.Logger {
w := zapcore.AddSync(&lumberjack.Logger{ w := zapcore.AddSync(&lumberjack.Logger{
...@@ -25,4 +25,4 @@ func ZapInterceptor() *zap.Logger { ...@@ -25,4 +25,4 @@ func ZapInterceptor() *zap.Logger {
logger := zap.New(core, zap.AddCaller(), zap.AddCallerSkip(1)) logger := zap.New(core, zap.AddCaller(), zap.AddCallerSkip(1))
grpc_zap.ReplaceGrpcLoggerV2(logger) grpc_zap.ReplaceGrpcLoggerV2(logger)
return logger return logger
} }
\ No newline at end of file
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
package pb package pb
import ( import (
reflect "reflect" _ "github.com/gogo/protobuf/gogoproto"
sync "sync"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (
...@@ -172,22 +173,31 @@ var File_u_proto_common_proto protoreflect.FileDescriptor ...@@ -172,22 +173,31 @@ var File_u_proto_common_proto protoreflect.FileDescriptor
var file_u_proto_common_proto_rawDesc = []byte{ var file_u_proto_common_proto_rawDesc = []byte{
0x0a, 0x14, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x0a, 0x14, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x6c, 0x0a, 0x06, 0x43, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2d, 0x67, 0x69, 0x74, 0x68,
0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, 0x70, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x70, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4e, 0x6f, 0x6e, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75,
0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x75, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f,
0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x75, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, 0x7a, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x06,
0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x41, 0x70, 0x70, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf,
0x03, 0x52, 0x07, 0x50, 0x61, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x06, 0x41, 0x70, 0x70, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05,
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x50, 0x61, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f,
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x02, 0x58, 0x01, 0x52, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x07, 0x43, 0x75,
0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f,
0x50, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x02, 0x58, 0x01, 0x52, 0x07, 0x43, 0x75, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x08,
0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
0x22, 0x7a, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x67, 0x65,
0x74, 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x50, 0x61, 0x67, 0x65, 0x74,
0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c,
0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x03, 0x52, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: u-proto/common.proto
package pb
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *Common) Validate() error {
if this.Appkey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Appkey", fmt.Errorf(`value '%v' must not be an empty string`, this.Appkey))
}
if this.Nonce == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Nonce", fmt.Errorf(`value '%v' must not be an empty string`, this.Nonce))
}
if this.Curtime == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Curtime", fmt.Errorf(`value '%v' must not be an empty string`, this.Curtime))
}
if this.Checksum == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Checksum", fmt.Errorf(`value '%v' must not be an empty string`, this.Checksum))
}
return nil
}
func (this *Page) Validate() error {
return nil
}
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.24.0 // protoc-gen-go v1.25.0
// protoc v3.12.3 // protoc v3.12.3
// source: u-proto/im_base.proto // source: u-proto/im_base.proto
...@@ -9,6 +9,7 @@ package pb ...@@ -9,6 +9,7 @@ package pb
import ( import (
context "context" context "context"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
...@@ -442,24 +443,28 @@ var file_u_proto_im_base_proto_rawDesc = []byte{ ...@@ -442,24 +443,28 @@ var file_u_proto_im_base_proto_rawDesc = []byte{
0x0a, 0x15, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x5f, 0x62, 0x61, 0x73, 0x0a, 0x15, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x5f, 0x62, 0x61, 0x73,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x14, 0x75, 0x2d, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x14, 0x75, 0x2d, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x78, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x77,
0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76,
0x28, 0x03, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x64, 0x12, 0x28, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x06, 0x50, 0x75, 0x62,
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x6c, 0x69, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73,
0x69, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70,
0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x4d, 0x75, 0x6c,
0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x22, 0x5a, 0x0a, 0x10, 0x43, 0x74, 0x69, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x03, 0x52, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72,
0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b,
0x6d, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, 0x55, 0x72, 0x6c, 0x22, 0x5a, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65,
0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d,
0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x5f, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x50,
0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62,
0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x67, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x44, 0x65,
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70,
0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42,
0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x33, 0x0a, 0x0d, 0x47, 0x65, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x33, 0x0a, 0x0d, 0x47, 0x65,
......
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: u-proto/im_base.proto
package pb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *Public) Validate() error {
return nil
}
func (this *ConfigureRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Public != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Public); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Public", err)
}
}
return nil
}
func (this *ConfigureReply) Validate() error {
return nil
}
func (this *ConfigureDelRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
return nil
}
func (this *GetAllRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
return nil
}
func (this *GetAllOneReply) Validate() error {
if this.Reply != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Reply); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Reply", err)
}
}
return nil
}
func (this *GetAllReply) Validate() error {
for _, item := range this.GetAll {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("GetAll", err)
}
}
}
return nil
}
func (this *UpdateRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Public != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Public); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Public", err)
}
}
return nil
}
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.24.0 // protoc-gen-go v1.25.0
// protoc v3.12.3 // protoc v3.12.3
// source: u-proto/im_chat_room.proto // source: u-proto/im_chat_room.proto
...@@ -9,6 +9,7 @@ package pb ...@@ -9,6 +9,7 @@ package pb
import ( import (
context "context" context "context"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
...@@ -683,98 +684,104 @@ var file_u_proto_im_chat_room_proto_rawDesc = []byte{ ...@@ -683,98 +684,104 @@ var file_u_proto_im_chat_room_proto_rawDesc = []byte{
0x0a, 0x1a, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x0a, 0x1a, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x5f, 0x63, 0x68, 0x61,
0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
0x1a, 0x14, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x14, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x74, 0x52, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x6f, 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72,
0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2,
0x6e, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65,
0x28, 0x09, 0x52, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x22, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x07, 0x43, 0x72, 0x65,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02,
0x58, 0x01, 0x52, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x04, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58,
0x01, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75,
0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2,
0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d,
0x65, 0x6e, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x65, 0x6e, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41,
0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x74, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x22, 0xab, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x74,
0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x06, 0x52,
0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61,
0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75,
0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e,
0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x15, 0x0a, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63,
0x13, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x50, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x58, 0x0a, 0x12,
0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x16, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06,
0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x06,
0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f,
0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x51, 0x0a, 0x13, 0x43, 0x68, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x59, 0x0a, 0x13, 0x43, 0x68,
0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0xe8, 0x01, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x06, 0x52,
0x0a, 0x11, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f,
0x70, 0x6c, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x52, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x52,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x52, 0x6f,
0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18,
0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x6e, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61,
0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65,
0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e,
0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x78, 0x74, 0x18, 0x06, 0x20, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10,
0x01, 0x28, 0x09, 0x52, 0x03, 0x45, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x0a, 0x03, 0x45, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x45, 0x78, 0x74,
0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07,
0x65, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x55, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08,
0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6c, 0x6c,
0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x50,
0x03, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12,
0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x18, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x52, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d,
0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a,
0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20,
0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28,
0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43,
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x72, 0x65, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x64,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x55,
0x65, 0x22, 0x64, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x11, 0x47, 0x65, 0x74,
0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70,
0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x74, 0x12, 0x24, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x70, 0x6c, 0x79, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x50, 0x61, 0x67,
0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x08, 0x50, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62,
0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x32, 0xb4, 0x02, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x08, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x32,
0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x03, 0x41, 0xb4, 0x02, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76,
0x64, 0x64, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e,
0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d,
0x22, 0x00, 0x12, 0x3e, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x06, 0x55, 0x70,
0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6f, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x70, 0x64,
0x22, 0x00, 0x12, 0x38, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x06, 0x44, 0x65,
0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70,
0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x04, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x70,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x70,
0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x12, 0x16, 0x2e, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x36,
0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x6f, 0x6f, 0x6d, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: u-proto/im_chat_room.proto
package pb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *ChatRoomAddRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Creator == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Creator", fmt.Errorf(`value '%v' must not be an empty string`, this.Creator))
}
if this.Name == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Name", fmt.Errorf(`value '%v' must not be an empty string`, this.Name))
}
if this.Announcement == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Announcement", fmt.Errorf(`value '%v' must not be an empty string`, this.Announcement))
}
return nil
}
func (this *ChatRoomAddReply) Validate() error {
return nil
}
func (this *ChatRoomUpdateRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
return nil
}
func (this *ChatRoomUpdateReply) Validate() error {
return nil
}
func (this *ChatRoomDelRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
return nil
}
func (this *ChatRoomDelReply) Validate() error {
return nil
}
func (this *ChatRoomInfoRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
return nil
}
func (this *ChatRoomInfoReply) Validate() error {
return nil
}
func (this *ChatRoomAllRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
return nil
}
func (this *GetChatRoomsReply) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
if this.Paginate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Paginate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Paginate", err)
}
}
return nil
}
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.24.0 // protoc-gen-go v1.25.0
// protoc v3.12.3 // protoc v3.12.3
// source: u-proto/im_user_relationship.proto // source: u-proto/im_user_relationship.proto
...@@ -9,6 +9,7 @@ package pb ...@@ -9,6 +9,7 @@ package pb
import ( import (
context "context" context "context"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
...@@ -573,94 +574,103 @@ var file_u_proto_im_user_relationship_proto_rawDesc = []byte{ ...@@ -573,94 +574,103 @@ var file_u_proto_im_user_relationship_proto_rawDesc = []byte{
0x0a, 0x22, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x0a, 0x22, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6d, 0x5f, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x14, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x14, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36,
0x01, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b,
0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69,
0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x52,
0x6e, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65,
0x52, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x12, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x54, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x63, 0x63,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01,
0x52, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52,
0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x04, 0x54,
0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x6e, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x79, 0x22, 0x7e, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x6d, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x05, 0x41, 0x63, 0x63, 0x69,
0x63, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x64, 0x22, 0x77, 0x0a, 0x1b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69,
0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x1b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x05, 0x41, 0x63,
0x63, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52,
0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x14, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x19, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xc9, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x53, 0x70,
0x65, 0x63, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x12, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x05, 0x41, 0x63, 0x63,
0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x09, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x18,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x14, 0x55, 0x73, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x09, 0x54,
0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x12, 0x2a, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61,
0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06,
0x28, 0x09, 0x52, 0x06, 0x46, 0x61, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x19, 0x55, 0x73, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x05, 0x56, 0x61, 0x6c,
0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x75, 0x65, 0x22, 0x5b, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41,
0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x53, 0x70, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x63, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x22,
0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x89, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e, 0x64,
0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x34, 0x0a,
0x6d, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x08, 0x4d, 0x75, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x28, 0x09, 0x52, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x61, 0x72, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f,
0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x54, 0x61, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x4d, 0x75, 0x74, 0x65, 0x6c,
0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74,
0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x52, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x22, 0x53, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e,
0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x06,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x12, 0x14, 0x0a, 0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x41, 0x63, 0x63, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x42,
0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x12, 0x34, 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x08, 0x4d, 0x75, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x42, 0x6c, 0x52, 0x09, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x32, 0x9a, 0x03, 0x0a, 0x17,
0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70,
0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x1e,
0x68, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x74, 0x32, 0x9a, 0x03, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48,
0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65,
0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64,
0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x12,
0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f,
0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69,
0x47, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x00, 0x12, 0x4f, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x52,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74,
0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x53, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61,
0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e,
0x73, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x41, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65,
0x64, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73,
0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x41, 0x6e, 0x64, 0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d,
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6e, 0x64,
0x4d, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: u-proto/im_user_relationship.proto
package pb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *UserRelationshipAddRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
if this.Faccid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Faccid", fmt.Errorf(`value '%v' must not be an empty string`, this.Faccid))
}
return nil
}
func (this *UserRelationshipAddReply) Validate() error {
return nil
}
func (this *UserRelationshipDelRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
if this.Faccid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Faccid", fmt.Errorf(`value '%v' must not be an empty string`, this.Faccid))
}
return nil
}
func (this *UserRelationshipListRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
if this.Updatetime == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Updatetime", fmt.Errorf(`value '%v' must not be an empty string`, this.Updatetime))
}
return nil
}
func (this *UserRelationshipInfo) Validate() error {
return nil
}
func (this *UserRelationshipListReply) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *SetSpecialRelationReq) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
if this.TargetAcc == "" {
return github_com_mwitkow_go_proto_validators.FieldError("TargetAcc", fmt.Errorf(`value '%v' must not be an empty string`, this.TargetAcc))
}
return nil
}
func (this *ListBlackAndMuteListReq) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
return nil
}
func (this *ListBlackAndMuteListReply) Validate() error {
for _, item := range this.Mutelist {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Mutelist", err)
}
}
}
for _, item := range this.Blacklist {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Blacklist", err)
}
}
}
return nil
}
...@@ -4,12 +4,10 @@ import ( ...@@ -4,12 +4,10 @@ import (
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
"github.com/astaxie/beego/orm"
"im-microservice/db" "im-microservice/db"
"im-microservice/helper" "im-microservice/helper"
"im-microservice/pb" "im-microservice/pb"
"im-microservice/validator_struct"
"github.com/astaxie/beego/orm"
) )
const ( const (
...@@ -22,7 +20,7 @@ const ( ...@@ -22,7 +20,7 @@ const (
chat_create_time = "createtime" chat_create_time = "createtime"
) )
func AddChatRoom(addStruct *validator_struct.ChatRoomAddStruct) (int64, error) { func AddChatRoom(addStruct *pb.ChatRoomAddRequest) (int64, error) {
var chat db.ImChatRoom var chat db.ImChatRoom
now := helper.GetNowTime() now := helper.GetNowTime()
chat.Name = addStruct.Name chat.Name = addStruct.Name
...@@ -35,7 +33,7 @@ func AddChatRoom(addStruct *validator_struct.ChatRoomAddStruct) (int64, error) { ...@@ -35,7 +33,7 @@ func AddChatRoom(addStruct *validator_struct.ChatRoomAddStruct) (int64, error) {
return room_id, status.Error(codes.Internal, err.Error()) return room_id, status.Error(codes.Internal, err.Error())
} }
func UpdateChatRoom(update *validator_struct.ChatRoomUpdate) error { func UpdateChatRoom(update *pb.ChatRoomUpdateRequest) error {
orm_params := make(orm.Params) orm_params := make(orm.Params)
if update.Status != 0 { if update.Status != 0 {
orm_params[chat_status] = update.Status orm_params[chat_status] = update.Status
...@@ -67,7 +65,7 @@ func DeleteChatRoom(room_id int64) error { ...@@ -67,7 +65,7 @@ func DeleteChatRoom(room_id int64) error {
} }
func ChatRoomInfo(info *validator_struct.ChatRoomInfo) (res db.ImChatRoom, err error) { func ChatRoomInfo(info *pb.ChatRoomInfoRequest) (res db.ImChatRoom, err error) {
err = db.MysqlClient.QueryTable(chat_table_name).Filter(chat_room_id, info.RoomId).One(&res) err = db.MysqlClient.QueryTable(chat_table_name).Filter(chat_room_id, info.RoomId).One(&res)
if err != nil { if err != nil {
err = status.Error(codes.Internal, err.Error()) err = status.Error(codes.Internal, err.Error())
......
...@@ -3,13 +3,10 @@ package im_chat_room ...@@ -3,13 +3,10 @@ package im_chat_room
import ( import (
"context" "context"
"im-microservice/db"
"im-microservice/helper"
"im-microservice/pb"
vs "im-microservice/validator_struct"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
"im-microservice/db"
"im-microservice/pb"
) )
type ImChatRoomService struct { type ImChatRoomService struct {
...@@ -19,11 +16,7 @@ type ImChatRoomService struct { ...@@ -19,11 +16,7 @@ type ImChatRoomService struct {
func (cr *ImChatRoomService) Add(ctx context.Context, func (cr *ImChatRoomService) Add(ctx context.Context,
in *pb.ChatRoomAddRequest) (reply *pb.ChatRoomAddReply, err error) { in *pb.ChatRoomAddRequest) (reply *pb.ChatRoomAddReply, err error) {
chat_room_struct := vs.NewAddChatRoom(in) room_id, err := AddChatRoom(in)
if err = helper.Valiator(chat_room_struct); err != nil {
return
}
room_id, err := AddChatRoom(chat_room_struct)
if err != nil { if err != nil {
return return
} }
...@@ -34,11 +27,8 @@ func (cr *ImChatRoomService) Add(ctx context.Context, ...@@ -34,11 +27,8 @@ func (cr *ImChatRoomService) Add(ctx context.Context,
func (cr *ImChatRoomService) Update(ctx context.Context, func (cr *ImChatRoomService) Update(ctx context.Context,
in *pb.ChatRoomUpdateRequest) (reply *pb.ChatRoomUpdateReply, err error) { in *pb.ChatRoomUpdateRequest) (reply *pb.ChatRoomUpdateReply, err error) {
chat_room_struct := vs.NewChatRoomUpdate(in)
if err = helper.Valiator(chat_room_struct); err != nil { if err = UpdateChatRoom(in); err != nil {
return
}
if err = UpdateChatRoom(chat_room_struct); err != nil {
return return
} }
reply = &pb.ChatRoomUpdateReply{} reply = &pb.ChatRoomUpdateReply{}
...@@ -48,12 +38,7 @@ func (cr *ImChatRoomService) Update(ctx context.Context, ...@@ -48,12 +38,7 @@ func (cr *ImChatRoomService) Update(ctx context.Context,
func (cr *ImChatRoomService) Delete(ctx context.Context, func (cr *ImChatRoomService) Delete(ctx context.Context,
in *pb.ChatRoomDelRequest) (reply *pb.ChatRoomDelReply, err error) { in *pb.ChatRoomDelRequest) (reply *pb.ChatRoomDelReply, err error) {
chat_room_struct := vs.NewChatRoomDel(in) if err = DeleteChatRoom(in.RoomId); err != nil {
if err = helper.Valiator(chat_room_struct); err != nil {
return
}
if err = DeleteChatRoom(chat_room_struct.RoomId); err != nil {
return return
} }
reply = &pb.ChatRoomDelReply{} reply = &pb.ChatRoomDelReply{}
...@@ -63,11 +48,7 @@ func (cr *ImChatRoomService) Delete(ctx context.Context, ...@@ -63,11 +48,7 @@ func (cr *ImChatRoomService) Delete(ctx context.Context,
func (cr *ImChatRoomService) Info(ctx context.Context, func (cr *ImChatRoomService) Info(ctx context.Context,
in *pb.ChatRoomInfoRequest) (reply *pb.ChatRoomInfoReply, err error) { in *pb.ChatRoomInfoRequest) (reply *pb.ChatRoomInfoReply, err error) {
chat_room_struct := vs.NewChatRoomInfo(in) db_chat_room, err := ChatRoomInfo(in)
if err = helper.Valiator(chat_room_struct); err != nil {
return
}
db_chat_room, err := ChatRoomInfo(chat_room_struct)
if err != nil { if err != nil {
return return
} }
......
...@@ -38,12 +38,8 @@ func (cs *ConfigureSevice) Add(ctx context.Context, ...@@ -38,12 +38,8 @@ func (cs *ConfigureSevice) Add(ctx context.Context,
func (cs *ConfigureSevice) Delete(ctx context.Context, func (cs *ConfigureSevice) Delete(ctx context.Context,
in *pb.ConfigureDelRequest) (reply *pb.ConfigureReply, err error) { in *pb.ConfigureDelRequest) (reply *pb.ConfigureReply, err error) {
cds := vs.NewConfigureDelStruct(in)
if err = helper.Valiator(cds); err != nil {
return
}
// 执行删除操作 // 执行删除操作
if err = DelConfigure(cds.CompanyUserId); err != nil { if err = DelConfigure(in.CompanyUserId); err != nil {
return return
} }
reply = &pb.ConfigureReply{} reply = &pb.ConfigureReply{}
......
...@@ -2,14 +2,13 @@ package im_user_relationship ...@@ -2,14 +2,13 @@ package im_user_relationship
import ( import (
"errors" "errors"
"im-microservice/pb"
"im-microservice/db"
"im-microservice/helper"
"im-microservice/validator_struct"
"github.com/astaxie/beego/orm" "github.com/astaxie/beego/orm"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
"im-microservice/db"
"im-microservice/helper"
) )
var ( var (
...@@ -33,7 +32,7 @@ func IsUserRelationship(accid, faccid string) bool { ...@@ -33,7 +32,7 @@ func IsUserRelationship(accid, faccid string) bool {
Filter(db_field_faccid, faccid).Exist() Filter(db_field_faccid, faccid).Exist()
} }
func AddUserRelationship(in *validator_struct.UserRelationshipAdd) error { func AddUserRelationship(in *pb.UserRelationshipAddRequest) error {
var us db.ImUserRelationship var us db.ImUserRelationship
now := helper.GetNowTime() now := helper.GetNowTime()
us.Accid = in.Accid us.Accid = in.Accid
...@@ -51,7 +50,7 @@ func AddUserRelationship(in *validator_struct.UserRelationshipAdd) error { ...@@ -51,7 +50,7 @@ func AddUserRelationship(in *validator_struct.UserRelationshipAdd) error {
return err return err
} }
func DBDelete(in *validator_struct.UserRelationshipDel) error { func DBDelete(in *pb.UserRelationshipDelRequest) error {
_, err := db.MysqlClient.QueryTable(db_tabel).Filter(db_field_accid, in.Accid). _, err := db.MysqlClient.QueryTable(db_tabel).Filter(db_field_accid, in.Accid).
Filter(db_field_faccid, in.Faccid).Delete() Filter(db_field_faccid, in.Faccid).Delete()
if err != nil { if err != nil {
...@@ -60,7 +59,7 @@ func DBDelete(in *validator_struct.UserRelationshipDel) error { ...@@ -60,7 +59,7 @@ func DBDelete(in *validator_struct.UserRelationshipDel) error {
return err return err
} }
func DBAll(in *validator_struct.UserRelationshipAll) ([]db.ImUserRelationship, error) { func DBAll(in *pb.UserRelationshipListRequest) ([]db.ImUserRelationship, error) {
var friends []db.ImUserRelationship var friends []db.ImUserRelationship
num, err := db.MysqlClient.QueryTable(db_tabel).Filter(db_field_accid, in.Accid). num, err := db.MysqlClient.QueryTable(db_tabel).Filter(db_field_accid, in.Accid).
...@@ -76,7 +75,7 @@ func DBAll(in *validator_struct.UserRelationshipAll) ([]db.ImUserRelationship, e ...@@ -76,7 +75,7 @@ func DBAll(in *validator_struct.UserRelationshipAll) ([]db.ImUserRelationship, e
return friends, nil return friends, nil
} }
func SetSpecialRelationDb(in *validator_struct.SetSpecialRelation) error { func SetSpecialRelationDb(in *pb.SetSpecialRelationReq) error {
if ok := IsUserRelationship(in.Accid, in.TargetAcc); !ok { if ok := IsUserRelationship(in.Accid, in.TargetAcc); !ok {
return errors.New("被操作用户不是该用户好友") return errors.New("被操作用户不是该用户好友")
...@@ -108,7 +107,7 @@ func SetSpecialRelationDb(in *validator_struct.SetSpecialRelation) error { ...@@ -108,7 +107,7 @@ func SetSpecialRelationDb(in *validator_struct.SetSpecialRelation) error {
return err return err
} }
func ListBlackAndMuteListDB(in *validator_struct.ListBlackAndMuteList) (blacklist []db.ImUserRelationship, func ListBlackAndMuteListDB(in *pb.ListBlackAndMuteListReq) (blacklist []db.ImUserRelationship,
mutelist []db.ImUserRelationship, err error) { mutelist []db.ImUserRelationship, err error) {
query_db := db.MysqlClient.QueryTable(db_tabel).Filter(db_field_accid, in.Accid) query_db := db.MysqlClient.QueryTable(db_tabel).Filter(db_field_accid, in.Accid)
......
...@@ -9,7 +9,6 @@ import ( ...@@ -9,7 +9,6 @@ import (
"im-microservice/helper" "im-microservice/helper"
"im-microservice/pb" "im-microservice/pb"
vs "im-microservice/validator_struct"
) )
type UserRelationshipService struct { type UserRelationshipService struct {
...@@ -19,28 +18,18 @@ type UserRelationshipService struct { ...@@ -19,28 +18,18 @@ type UserRelationshipService struct {
func (us *UserRelationshipService) Add(ctx context.Context, func (us *UserRelationshipService) Add(ctx context.Context,
in *pb.UserRelationshipAddRequest) (reply *pb.UserRelationshipAddReply, err error) { in *pb.UserRelationshipAddRequest) (reply *pb.UserRelationshipAddReply, err error) {
m := map[string]interface{}{ if ok := IsUserRelationship(in.Accid, in.Faccid); ok {
"accid": in.GetAccid(),
"faccid": in.GetFaccid(),
"type": in.GetType(),
"msg": in.GetMsg(),
}
request := vs.NewUserRelationshipAdd(m)
if err = helper.Valiator(request); err != nil {
return
}
if ok := IsUserRelationship(request.Accid, request.Faccid); ok {
err = status.Error(codes.AlreadyExists, "已经添加过该好友") err = status.Error(codes.AlreadyExists, "已经添加过该好友")
return return
} }
//添加好友 //添加好友
if err = AddUserRelationship(request); err != nil { if err = AddUserRelationship(in); err != nil {
return return
} }
// 更改用户版本信息 // 更改用户版本信息
u_map := make(map[string]interface{}) u_map := make(map[string]interface{})
u_map["edition"] = helper.GetNowTime() u_map["edition"] = helper.GetNowTime()
_, _ = im_user.UpdateImUser(request.Accid, u_map) _, _ = im_user.UpdateImUser(in.Accid, u_map)
reply = &pb.UserRelationshipAddReply{} reply = &pb.UserRelationshipAddReply{}
return return
...@@ -49,22 +38,14 @@ func (us *UserRelationshipService) Add(ctx context.Context, ...@@ -49,22 +38,14 @@ func (us *UserRelationshipService) Add(ctx context.Context,
func (us *UserRelationshipService) Delete(ctx context.Context, func (us *UserRelationshipService) Delete(ctx context.Context,
in *pb.UserRelationshipDelRequest) (reply *pb.UserRelationshipAddReply, err error) { in *pb.UserRelationshipDelRequest) (reply *pb.UserRelationshipAddReply, err error) {
m := map[string]interface{}{
"accid": in.GetAccid(),
"faccid": in.GetFaccid(),
}
request := vs.NewUserRelationshipDel(m)
if err = helper.Valiator(request); err != nil {
return
}
// 删除好友 // 删除好友
if err = DBDelete(request); err != nil { if err = DBDelete(in); err != nil {
return return
} }
// 更改用户版本信息 // 更改用户版本信息
u_map := make(map[string]interface{}) u_map := make(map[string]interface{})
u_map["edition"] = helper.GetNowTime() u_map["edition"] = helper.GetNowTime()
_, _ = im_user.UpdateImUser(request.Accid, u_map) _, _ = im_user.UpdateImUser(in.Accid, u_map)
reply = &pb.UserRelationshipAddReply{} reply = &pb.UserRelationshipAddReply{}
return return
...@@ -73,16 +54,7 @@ func (us *UserRelationshipService) Delete(ctx context.Context, ...@@ -73,16 +54,7 @@ func (us *UserRelationshipService) Delete(ctx context.Context,
func (us *UserRelationshipService) All(ctx context.Context, func (us *UserRelationshipService) All(ctx context.Context,
in *pb.UserRelationshipListRequest) (reply *pb.UserRelationshipListReply, err error) { in *pb.UserRelationshipListRequest) (reply *pb.UserRelationshipListReply, err error) {
m := map[string]interface{}{ results, err := DBAll(in)
"accid": in.GetAccid(),
"updatetime": in.GetUpdatetime(),
}
request := vs.NewUserRelationshipAll(m)
if err = helper.Valiator(request); err != nil {
return
}
results, err := DBAll(request)
if err != nil { if err != nil {
err = status.Error(codes.Internal, err.Error()) err = status.Error(codes.Internal, err.Error())
return return
...@@ -100,17 +72,7 @@ func (us *UserRelationshipService) All(ctx context.Context, ...@@ -100,17 +72,7 @@ func (us *UserRelationshipService) All(ctx context.Context,
func (us *UserRelationshipService) SetSpecialRelation(ctx context.Context, func (us *UserRelationshipService) SetSpecialRelation(ctx context.Context,
in *pb.SetSpecialRelationReq) (reply *pb.UserRelationshipAddReply, err error) { in *pb.SetSpecialRelationReq) (reply *pb.UserRelationshipAddReply, err error) {
m := map[string]interface{}{ if err = SetSpecialRelationDb(in); err != nil {
"accid": in.GetAccid(),
"faccid": in.GetTargetAcc(),
"relation_type": in.GetRelationType(),
"value": in.GetValue(),
}
request := vs.NewSetSpecialRelation(m)
if err = helper.Valiator(request); err != nil {
return
}
if err = SetSpecialRelationDb(request); err != nil {
err = status.Error(codes.Internal, err.Error()) err = status.Error(codes.Internal, err.Error())
return return
} }
...@@ -121,15 +83,7 @@ func (us *UserRelationshipService) SetSpecialRelation(ctx context.Context, ...@@ -121,15 +83,7 @@ func (us *UserRelationshipService) SetSpecialRelation(ctx context.Context,
func (us *UserRelationshipService) ListBlackAndMuteList(ctx context.Context, func (us *UserRelationshipService) ListBlackAndMuteList(ctx context.Context,
in *pb.ListBlackAndMuteListReq) (reply *pb.ListBlackAndMuteListReply, err error) { in *pb.ListBlackAndMuteListReq) (reply *pb.ListBlackAndMuteListReply, err error) {
m := map[string]interface{}{ blacklist, mutelist, err := ListBlackAndMuteListDB(in)
"accid": in.GetAccid(),
}
request := vs.NewListBlackAndMuteList(m)
if err = helper.Valiator(request); err != nil {
return
}
blacklist, mutelist, err := ListBlackAndMuteListDB(request)
if err != nil { if err != nil {
err = status.Error(codes.Internal, err.Error()) err = status.Error(codes.Internal, err.Error())
return return
......
...@@ -2,11 +2,14 @@ syntax = "proto3"; ...@@ -2,11 +2,14 @@ syntax = "proto3";
package pb; package pb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/mwitkow/go-proto-validators/validator.proto";
message Common { message Common {
string Appkey = 1; string Appkey = 1 [(validator.field) = {string_not_empty: true}];
string Nonce = 2; string Nonce = 2 [(validator.field) = {string_not_empty: true}];
string Curtime = 3; string Curtime = 3 [(validator.field) = {string_not_empty: true}];
string Checksum = 4; string Checksum = 4 [(validator.field) = {string_not_empty: true}];
} }
message Page { message Page {
......
...@@ -3,6 +3,7 @@ syntax = "proto3"; ...@@ -3,6 +3,7 @@ syntax = "proto3";
package pb; package pb;
import "u-proto/common.proto"; import "u-proto/common.proto";
import "github.com/mwitkow/go-proto-validators/validator.proto";
message Public { message Public {
int64 CompanyUserId = 1; int64 CompanyUserId = 1;
...@@ -18,7 +19,7 @@ message ConfigureRequest { ...@@ -18,7 +19,7 @@ message ConfigureRequest {
message ConfigureReply {} message ConfigureReply {}
message ConfigureDelRequest { message ConfigureDelRequest {
int64 CompanyUserId = 1; int64 CompanyUserId = 1 [(validator.field) = {string_not_empty: true}];
Common Common = 2; Common Common = 2;
} }
...@@ -42,5 +43,5 @@ service ConfigureSevice{ ...@@ -42,5 +43,5 @@ service ConfigureSevice{
rpc Select(GetAllRequest) returns(GetAllReply) {} rpc Select(GetAllRequest) returns(GetAllReply) {}
rpc Add (ConfigureRequest) returns(ConfigureReply) {} rpc Add (ConfigureRequest) returns(ConfigureReply) {}
rpc Delete(ConfigureDelRequest) returns(ConfigureReply) {} rpc Delete(ConfigureDelRequest) returns(ConfigureReply) {}
rpc Update(UpdateRequest) returns(GetAllReply) {} rpc Update(UpdateRequest) returns(ConfigureReply) {}
} }
...@@ -3,13 +3,14 @@ syntax = "proto3"; ...@@ -3,13 +3,14 @@ syntax = "proto3";
package pb; package pb;
import "u-proto/common.proto"; import "u-proto/common.proto";
import "github.com/mwitkow/go-proto-validators/validator.proto";
// 添加聊天室 // 添加聊天室
message ChatRoomAddRequest { message ChatRoomAddRequest {
Common Common = 1; Common Common = 1;
string Creator = 2; string Creator = 2 [(validator.field) = {string_not_empty: true}];
string Name = 3; string Name = 3 [(validator.field) = {string_not_empty: true}];
string Announcement = 4; string Announcement = 4 [(validator.field) = {string_not_empty: true}];
} }
message ChatRoomAddReply{ message ChatRoomAddReply{
...@@ -19,7 +20,7 @@ message ChatRoomAddReply{ ...@@ -19,7 +20,7 @@ message ChatRoomAddReply{
// 更新聊天室 // 更新聊天室
message ChatRoomUpdateRequest { message ChatRoomUpdateRequest {
Common Common = 1; Common Common = 1;
int64 RoomId = 2; int64 RoomId = 2 [(validator.field) = {string_not_empty: true}];
string Name = 3; string Name = 3;
int64 Status = 4; int64 Status = 4;
string Announcement = 5; string Announcement = 5;
...@@ -30,7 +31,7 @@ message ChatRoomUpdateReply {} ...@@ -30,7 +31,7 @@ message ChatRoomUpdateReply {}
// 删除聊天室 // 删除聊天室
message ChatRoomDelRequest { message ChatRoomDelRequest {
Common Common = 1; Common Common = 1;
int64 RoomId = 2; int64 RoomId = 2 [(validator.field) = {string_not_empty: true}];
} }
message ChatRoomDelReply {} message ChatRoomDelReply {}
...@@ -38,7 +39,7 @@ message ChatRoomDelReply {} ...@@ -38,7 +39,7 @@ message ChatRoomDelReply {}
// 获取单个聊天室信息 // 获取单个聊天室信息
message ChatRoomInfoRequest { message ChatRoomInfoRequest {
Common Common = 1; Common Common = 1;
int64 RoomId = 2; int64 RoomId = 2 [(validator.field) = {string_not_empty: true}];
} }
message ChatRoomInfoReply { message ChatRoomInfoReply {
......
...@@ -3,13 +3,14 @@ syntax = "proto3"; ...@@ -3,13 +3,14 @@ syntax = "proto3";
package pb; package pb;
import "u-proto/common.proto"; import "u-proto/common.proto";
import "github.com/mwitkow/go-proto-validators/validator.proto";
//添加好友 //添加好友
message UserRelationshipAddRequest { message UserRelationshipAddRequest {
Common Common = 1; Common Common = 1;
string Accid = 2; string Accid = 2 [(validator.field) = {string_not_empty: true}];
string Faccid = 3; string Faccid = 3 [(validator.field) = {string_not_empty: true}];
int64 Type = 4; int64 Type = 4 [(validator.field) = {string_not_empty: true}];
string Msg = 5; string Msg = 5;
} }
...@@ -19,15 +20,15 @@ message UserRelationshipAddReply {} ...@@ -19,15 +20,15 @@ message UserRelationshipAddReply {}
//删除好友 //删除好友
message UserRelationshipDelRequest { message UserRelationshipDelRequest {
Common Common = 1; Common Common = 1;
string Accid = 2; string Accid = 2 [(validator.field) = {string_not_empty: true}];
string Faccid = 3; string Faccid = 3 [(validator.field) = {string_not_empty: true}];
} }
// 获取好友关系 // 获取好友关系
message UserRelationshipListRequest { message UserRelationshipListRequest {
Common Common = 1; Common Common = 1;
string Accid = 2; string Accid = 2 [(validator.field) = {string_not_empty: true}];
string Updatetime = 3; string Updatetime = 3 [(validator.field) = {string_not_empty: true}];
} }
message UserRelationshipInfo { message UserRelationshipInfo {
...@@ -42,17 +43,17 @@ message UserRelationshipListReply { ...@@ -42,17 +43,17 @@ message UserRelationshipListReply {
//设置黑名单/静音 //设置黑名单/静音
message SetSpecialRelationReq { message SetSpecialRelationReq {
Common Common = 1; Common Common = 1;
string Accid = 2; string Accid = 2 [(validator.field) = {string_not_empty: true}];
string TargetAcc = 3; string TargetAcc = 3 [(validator.field) = {string_not_empty: true}];
int64 RelationType = 4; int64 RelationType = 4 [(validator.field) = {string_not_empty: true}];
int64 Value = 5; int64 Value = 5 [(validator.field) = {string_not_empty: true}];
} }
//查看指定用户的黑名单和静音列表 //查看指定用户的黑名单和静音列表
message ListBlackAndMuteListReq { message ListBlackAndMuteListReq {
Common Common = 1; Common Common = 1;
string Accid = 2; string Accid = 2 [(validator.field) = {string_not_empty: true}];
} }
message ListBlackAndMuteListReply { message ListBlackAndMuteListReply {
......
...@@ -113,7 +113,7 @@ func NewChatRoomUpdate(in *pb.ChatRoomUpdateRequest) *ChatRoomUpdate { ...@@ -113,7 +113,7 @@ func NewChatRoomUpdate(in *pb.ChatRoomUpdateRequest) *ChatRoomUpdate {
RoomId: in.GetRoomId(), RoomId: in.GetRoomId(),
Name: in.GetName(), Name: in.GetName(),
Announcement: in.GetAnnouncement(), Announcement: in.GetAnnouncement(),
Status: in.GetStatus(), Status: int64(in.GetStatus()),
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment