فهرست منبع

更新总后台grpc

jyq 4 سال پیش
والد
کامیت
2d70ea5879
5فایلهای تغییر یافته به همراه288 افزوده شده و 99 حذف شده
  1. 2 2
      api/grpc/base/base.pb.go
  2. 6 2
      api/grpc/base/base_grpc.pb.go
  3. 2 1
      go.mod
  4. 211 67
      repository/grpc/bsw/im/im/im.pb.go
  5. 67 27
      repository/grpc/bsw/im/im/im_grpc.pb.go

+ 2 - 2
api/grpc/base/base.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
 // versions:
-// 	protoc-gen-go v1.23.0
-// 	protoc        v3.11.3
+// 	protoc-gen-go v1.25.0
+// 	protoc        v3.14.0
 // source: base.proto
 // source: base.proto
 
 
 package base
 package base

+ 6 - 2
api/grpc/base/base_grpc.pb.go

@@ -11,6 +11,7 @@ import (
 
 
 // This is a compile-time assertion to ensure that this generated file
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
 // is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 const _ = grpc.SupportPackageIsVersion7
 
 
 // ApiClient is the client API for Api service.
 // ApiClient is the client API for Api service.
@@ -90,7 +91,7 @@ type UnsafeApiServer interface {
 }
 }
 
 
 func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer) {
 func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer) {
-	s.RegisterService(&_Api_serviceDesc, srv)
+	s.RegisterService(&Api_ServiceDesc, srv)
 }
 }
 
 
 func _Api_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 func _Api_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -147,7 +148,10 @@ func _Api_SignOut_Handler(srv interface{}, ctx context.Context, dec func(interfa
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-var _Api_serviceDesc = grpc.ServiceDesc{
+// Api_ServiceDesc is the grpc.ServiceDesc for Api service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Api_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "base.Api",
 	ServiceName: "base.Api",
 	HandlerType: (*ApiServer)(nil),
 	HandlerType: (*ApiServer)(nil),
 	Methods: []grpc.MethodDesc{
 	Methods: []grpc.MethodDesc{

+ 2 - 1
go.mod

@@ -3,7 +3,7 @@ module sportfitness/base
 go 1.16
 go 1.16
 
 
 require (
 require (
-	git.beswell.com/gframe/application v0.3.4
+	git.beswell.com/gframe/application v0.3.5
 	github.com/ZR233/glog/v2 v2.0.1
 	github.com/ZR233/glog/v2 v2.0.1
 	github.com/armon/go-metrics v0.3.6 // indirect
 	github.com/armon/go-metrics v0.3.6 // indirect
 	github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
 	github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
@@ -27,4 +27,5 @@ require (
 	google.golang.org/genproto v0.0.0-20210323160006-e668133fea6a // indirect
 	google.golang.org/genproto v0.0.0-20210323160006-e668133fea6a // indirect
 	google.golang.org/grpc v1.36.0
 	google.golang.org/grpc v1.36.0
 	google.golang.org/protobuf v1.26.0
 	google.golang.org/protobuf v1.26.0
+	gorm.io/gorm v1.21.5 // indirect
 )
 )

+ 211 - 67
repository/grpc/bsw/im/im/im.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
 // versions:
-// 	protoc-gen-go v1.23.0
-// 	protoc        v3.11.3
+// 	protoc-gen-go v1.25.0
+// 	protoc        v3.14.0
 // source: im.proto
 // source: im.proto
 
 
 package im
 package im
@@ -28,16 +28,22 @@ const _ = proto.ProtoPackageIsVersion4
 type ErrorCode int32
 type ErrorCode int32
 
 
 const (
 const (
-	ErrorCode_OK ErrorCode = 0
+	ErrorCode_OK    ErrorCode = 0
+	ErrorCode_PARAM ErrorCode = 4001
+	ErrorCode_Exist ErrorCode = 4002
 )
 )
 
 
 // Enum value maps for ErrorCode.
 // Enum value maps for ErrorCode.
 var (
 var (
 	ErrorCode_name = map[int32]string{
 	ErrorCode_name = map[int32]string{
-		0: "OK",
+		0:    "OK",
+		4001: "PARAM",
+		4002: "Exist",
 	}
 	}
 	ErrorCode_value = map[string]int32{
 	ErrorCode_value = map[string]int32{
-		"OK": 0,
+		"OK":    0,
+		"PARAM": 4001,
+		"Exist": 4002,
 	}
 	}
 )
 )
 
 
@@ -68,6 +74,55 @@ func (ErrorCode) EnumDescriptor() ([]byte, []int) {
 	return file_im_proto_rawDescGZIP(), []int{0}
 	return file_im_proto_rawDescGZIP(), []int{0}
 }
 }
 
 
+type Status int32
+
+const (
+	Status_Ban    Status = 0
+	Status_On     Status = 1
+	Status_Delete Status = 9
+)
+
+// Enum value maps for Status.
+var (
+	Status_name = map[int32]string{
+		0: "Ban",
+		1: "On",
+		9: "Delete",
+	}
+	Status_value = map[string]int32{
+		"Ban":    0,
+		"On":     1,
+		"Delete": 9,
+	}
+)
+
+func (x Status) Enum() *Status {
+	p := new(Status)
+	*p = x
+	return p
+}
+
+func (x Status) String() string {
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Status) Descriptor() protoreflect.EnumDescriptor {
+	return file_im_proto_enumTypes[1].Descriptor()
+}
+
+func (Status) Type() protoreflect.EnumType {
+	return &file_im_proto_enumTypes[1]
+}
+
+func (x Status) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Status.Descriptor instead.
+func (Status) EnumDescriptor() ([]byte, []int) {
+	return file_im_proto_rawDescGZIP(), []int{1}
+}
+
 type DefaultRequest struct {
 type DefaultRequest struct {
 	state         protoimpl.MessageState
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	sizeCache     protoimpl.SizeCache
@@ -144,7 +199,7 @@ func (*DefaultReply) Descriptor() ([]byte, []int) {
 	return file_im_proto_rawDescGZIP(), []int{1}
 	return file_im_proto_rawDescGZIP(), []int{1}
 }
 }
 
 
-type SignUpRequest struct {
+type SignInUserCodeRequest struct {
 	state         protoimpl.MessageState
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 	unknownFields protoimpl.UnknownFields
@@ -153,8 +208,8 @@ type SignUpRequest struct {
 	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
 	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
 }
 }
 
 
-func (x *SignUpRequest) Reset() {
-	*x = SignUpRequest{}
+func (x *SignInUserCodeRequest) Reset() {
+	*x = SignInUserCodeRequest{}
 	if protoimpl.UnsafeEnabled {
 	if protoimpl.UnsafeEnabled {
 		mi := &file_im_proto_msgTypes[2]
 		mi := &file_im_proto_msgTypes[2]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -162,13 +217,13 @@ func (x *SignUpRequest) Reset() {
 	}
 	}
 }
 }
 
 
-func (x *SignUpRequest) String() string {
+func (x *SignInUserCodeRequest) String() string {
 	return protoimpl.X.MessageStringOf(x)
 	return protoimpl.X.MessageStringOf(x)
 }
 }
 
 
-func (*SignUpRequest) ProtoMessage() {}
+func (*SignInUserCodeRequest) ProtoMessage() {}
 
 
-func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
+func (x *SignInUserCodeRequest) ProtoReflect() protoreflect.Message {
 	mi := &file_im_proto_msgTypes[2]
 	mi := &file_im_proto_msgTypes[2]
 	if protoimpl.UnsafeEnabled && x != nil {
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -180,19 +235,19 @@ func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 	return mi.MessageOf(x)
 }
 }
 
 
-// Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
-func (*SignUpRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use SignInUserCodeRequest.ProtoReflect.Descriptor instead.
+func (*SignInUserCodeRequest) Descriptor() ([]byte, []int) {
 	return file_im_proto_rawDescGZIP(), []int{2}
 	return file_im_proto_rawDescGZIP(), []int{2}
 }
 }
 
 
-func (x *SignUpRequest) GetName() string {
+func (x *SignInUserCodeRequest) GetName() string {
 	if x != nil {
 	if x != nil {
 		return x.Name
 		return x.Name
 	}
 	}
 	return ""
 	return ""
 }
 }
 
 
-func (x *SignUpRequest) GetPassword() string {
+func (x *SignInUserCodeRequest) GetPassword() string {
 	if x != nil {
 	if x != nil {
 		return x.Password
 		return x.Password
 	}
 	}
@@ -246,17 +301,25 @@ func (x *SignInReply) GetToken() string {
 	return ""
 	return ""
 }
 }
 
 
-type SignInRequest struct {
+type SignUpRequest struct {
 	state         protoimpl.MessageState
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 	unknownFields protoimpl.UnknownFields
 
 
-	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
-	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
+	UserCode string `protobuf:"bytes,1,opt,name=UserCode,proto3" json:"UserCode,omitempty"`
+	Name     string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
+	Email    string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"`
+	Phone    string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"`
+	WxOpenId string `protobuf:"bytes,5,opt,name=WxOpenId,proto3" json:"WxOpenId,omitempty"`
+	Qq       string `protobuf:"bytes,6,opt,name=Qq,proto3" json:"Qq,omitempty"`
+	Password string `protobuf:"bytes,7,opt,name=Password,proto3" json:"Password,omitempty"`
+	Question string `protobuf:"bytes,8,opt,name=Question,proto3" json:"Question,omitempty"`
+	Answer   string `protobuf:"bytes,9,opt,name=Answer,proto3" json:"Answer,omitempty"`
+	Memo     string `protobuf:"bytes,10,opt,name=Memo,proto3" json:"Memo,omitempty"`
 }
 }
 
 
-func (x *SignInRequest) Reset() {
-	*x = SignInRequest{}
+func (x *SignUpRequest) Reset() {
+	*x = SignUpRequest{}
 	if protoimpl.UnsafeEnabled {
 	if protoimpl.UnsafeEnabled {
 		mi := &file_im_proto_msgTypes[4]
 		mi := &file_im_proto_msgTypes[4]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -264,13 +327,13 @@ func (x *SignInRequest) Reset() {
 	}
 	}
 }
 }
 
 
-func (x *SignInRequest) String() string {
+func (x *SignUpRequest) String() string {
 	return protoimpl.X.MessageStringOf(x)
 	return protoimpl.X.MessageStringOf(x)
 }
 }
 
 
-func (*SignInRequest) ProtoMessage() {}
+func (*SignUpRequest) ProtoMessage() {}
 
 
-func (x *SignInRequest) ProtoReflect() protoreflect.Message {
+func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
 	mi := &file_im_proto_msgTypes[4]
 	mi := &file_im_proto_msgTypes[4]
 	if protoimpl.UnsafeEnabled && x != nil {
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -282,53 +345,131 @@ func (x *SignInRequest) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 	return mi.MessageOf(x)
 }
 }
 
 
-// Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
-func (*SignInRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
+func (*SignUpRequest) Descriptor() ([]byte, []int) {
 	return file_im_proto_rawDescGZIP(), []int{4}
 	return file_im_proto_rawDescGZIP(), []int{4}
 }
 }
 
 
-func (x *SignInRequest) GetName() string {
+func (x *SignUpRequest) GetUserCode() string {
+	if x != nil {
+		return x.UserCode
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetName() string {
 	if x != nil {
 	if x != nil {
 		return x.Name
 		return x.Name
 	}
 	}
 	return ""
 	return ""
 }
 }
 
 
-func (x *SignInRequest) GetPassword() string {
+func (x *SignUpRequest) GetEmail() string {
+	if x != nil {
+		return x.Email
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetPhone() string {
+	if x != nil {
+		return x.Phone
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetWxOpenId() string {
+	if x != nil {
+		return x.WxOpenId
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetQq() string {
+	if x != nil {
+		return x.Qq
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetPassword() string {
 	if x != nil {
 	if x != nil {
 		return x.Password
 		return x.Password
 	}
 	}
 	return ""
 	return ""
 }
 }
 
 
+func (x *SignUpRequest) GetQuestion() string {
+	if x != nil {
+		return x.Question
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetAnswer() string {
+	if x != nil {
+		return x.Answer
+	}
+	return ""
+}
+
+func (x *SignUpRequest) GetMemo() string {
+	if x != nil {
+		return x.Memo
+	}
+	return ""
+}
+
 var File_im_proto protoreflect.FileDescriptor
 var File_im_proto protoreflect.FileDescriptor
 
 
 var file_im_proto_rawDesc = []byte{
 var file_im_proto_rawDesc = []byte{
 	0x0a, 0x08, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x69, 0x6d, 0x22, 0x10,
 	0x0a, 0x08, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x69, 0x6d, 0x22, 0x10,
 	0x0a, 0x0e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
 	0x0a, 0x0e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
 	0x22, 0x0e, 0x0a, 0x0c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
 	0x22, 0x0e, 0x0a, 0x0c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x22, 0x3f, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
-	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
-	0x64, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3f, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
-	0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
-	0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2a, 0x13, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72,
-	0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x32, 0x99, 0x01, 0x0a,
-	0x03, 0x41, 0x70, 0x69, 0x12, 0x2f, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x12, 0x11,
-	0x2e, 0x69, 0x6d, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x1a, 0x10, 0x2e, 0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x12,
-	0x11, 0x2e, 0x69, 0x6d, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x69, 0x6d, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74,
-	0x12, 0x12, 0x2e, 0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c,
-	0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x22, 0x47, 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f,
+	0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
+	0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x69, 0x67,
+	0x6e, 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
+	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xfb,
+	0x01, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04,
+	0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65,
+	0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08,
+	0x57, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x57, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x51, 0x71, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x51, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73,
+	0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73, 0x73,
+	0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
+	0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
+	0x12, 0x16, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f,
+	0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x2a, 0x2b, 0x0a, 0x09,
+	0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10,
+	0x00, 0x12, 0x0a, 0x0a, 0x05, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x10, 0xa1, 0x1f, 0x12, 0x0a, 0x0a,
+	0x05, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xa2, 0x1f, 0x2a, 0x25, 0x0a, 0x06, 0x53, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02,
+	0x4f, 0x6e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x09,
+	0x32, 0xe7, 0x01, 0x0a, 0x03, 0x41, 0x70, 0x69, 0x12, 0x37, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e,
+	0x55, 0x70, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x11, 0x2e, 0x69, 0x6d, 0x2e,
+	0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e,
+	0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
+	0x00, 0x12, 0x34, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x50, 0x68, 0x6f, 0x6e, 0x65,
+	0x12, 0x11, 0x2e, 0x69, 0x6d, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x49,
+	0x6e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6d, 0x2e, 0x53,
+	0x69, 0x67, 0x6e, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x69, 0x6d, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4f,
+	0x75, 0x74, 0x12, 0x12, 0x2e, 0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x69, 0x6d, 0x2e, 0x44, 0x65, 0x66, 0x61,
+	0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 }
 
 
 var (
 var (
@@ -343,25 +484,28 @@ func file_im_proto_rawDescGZIP() []byte {
 	return file_im_proto_rawDescData
 	return file_im_proto_rawDescData
 }
 }
 
 
-var file_im_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_im_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
 var file_im_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 var file_im_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 var file_im_proto_goTypes = []interface{}{
 var file_im_proto_goTypes = []interface{}{
-	(ErrorCode)(0),         // 0: im.ErrorCode
-	(*DefaultRequest)(nil), // 1: im.DefaultRequest
-	(*DefaultReply)(nil),   // 2: im.DefaultReply
-	(*SignUpRequest)(nil),  // 3: im.SignUpRequest
-	(*SignInReply)(nil),    // 4: im.SignInReply
-	(*SignInRequest)(nil),  // 5: im.SignInRequest
+	(ErrorCode)(0),                // 0: im.ErrorCode
+	(Status)(0),                   // 1: im.Status
+	(*DefaultRequest)(nil),        // 2: im.DefaultRequest
+	(*DefaultReply)(nil),          // 3: im.DefaultReply
+	(*SignInUserCodeRequest)(nil), // 4: im.SignInUserCodeRequest
+	(*SignInReply)(nil),           // 5: im.SignInReply
+	(*SignUpRequest)(nil),         // 6: im.SignUpRequest
 }
 }
 var file_im_proto_depIdxs = []int32{
 var file_im_proto_depIdxs = []int32{
-	3, // 0: im.Api.SignUp:input_type -> im.SignUpRequest
-	5, // 1: im.Api.SignIn:input_type -> im.SignInRequest
-	1, // 2: im.Api.SignOut:input_type -> im.DefaultRequest
-	2, // 3: im.Api.SignUp:output_type -> im.DefaultReply
-	4, // 4: im.Api.SignIn:output_type -> im.SignInReply
-	2, // 5: im.Api.SignOut:output_type -> im.DefaultReply
-	3, // [3:6] is the sub-list for method output_type
-	0, // [0:3] is the sub-list for method input_type
+	6, // 0: im.Api.SignUpUserCode:input_type -> im.SignUpRequest
+	6, // 1: im.Api.SignUpPhone:input_type -> im.SignUpRequest
+	4, // 2: im.Api.SignInUserCode:input_type -> im.SignInUserCodeRequest
+	2, // 3: im.Api.SignOut:input_type -> im.DefaultRequest
+	3, // 4: im.Api.SignUpUserCode:output_type -> im.DefaultReply
+	3, // 5: im.Api.SignUpPhone:output_type -> im.DefaultReply
+	5, // 6: im.Api.SignInUserCode:output_type -> im.SignInReply
+	3, // 7: im.Api.SignOut:output_type -> im.DefaultReply
+	4, // [4:8] is the sub-list for method output_type
+	0, // [0:4] is the sub-list for method input_type
 	0, // [0:0] is the sub-list for extension type_name
 	0, // [0:0] is the sub-list for extension type_name
 	0, // [0:0] is the sub-list for extension extendee
 	0, // [0:0] is the sub-list for extension extendee
 	0, // [0:0] is the sub-list for field type_name
 	0, // [0:0] is the sub-list for field type_name
@@ -398,7 +542,7 @@ func file_im_proto_init() {
 			}
 			}
 		}
 		}
 		file_im_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
 		file_im_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*SignUpRequest); i {
+			switch v := v.(*SignInUserCodeRequest); i {
 			case 0:
 			case 0:
 				return &v.state
 				return &v.state
 			case 1:
 			case 1:
@@ -422,7 +566,7 @@ func file_im_proto_init() {
 			}
 			}
 		}
 		}
 		file_im_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
 		file_im_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*SignInRequest); i {
+			switch v := v.(*SignUpRequest); i {
 			case 0:
 			case 0:
 				return &v.state
 				return &v.state
 			case 1:
 			case 1:
@@ -439,7 +583,7 @@ func file_im_proto_init() {
 		File: protoimpl.DescBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_im_proto_rawDesc,
 			RawDescriptor: file_im_proto_rawDesc,
-			NumEnums:      1,
+			NumEnums:      2,
 			NumMessages:   5,
 			NumMessages:   5,
 			NumExtensions: 0,
 			NumExtensions: 0,
 			NumServices:   1,
 			NumServices:   1,

+ 67 - 27
repository/grpc/bsw/im/im/im_grpc.pb.go

@@ -11,14 +11,16 @@ import (
 
 
 // This is a compile-time assertion to ensure that this generated file
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
 // is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 const _ = grpc.SupportPackageIsVersion7
 
 
 // ApiClient is the client API for Api service.
 // ApiClient is the client API for Api service.
 //
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type ApiClient interface {
 type ApiClient interface {
-	SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*DefaultReply, error)
-	SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInReply, error)
+	SignUpUserCode(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*DefaultReply, error)
+	SignUpPhone(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*DefaultReply, error)
+	SignInUserCode(ctx context.Context, in *SignInUserCodeRequest, opts ...grpc.CallOption) (*SignInReply, error)
 	SignOut(ctx context.Context, in *DefaultRequest, opts ...grpc.CallOption) (*DefaultReply, error)
 	SignOut(ctx context.Context, in *DefaultRequest, opts ...grpc.CallOption) (*DefaultReply, error)
 }
 }
 
 
@@ -30,18 +32,27 @@ func NewApiClient(cc grpc.ClientConnInterface) ApiClient {
 	return &apiClient{cc}
 	return &apiClient{cc}
 }
 }
 
 
-func (c *apiClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*DefaultReply, error) {
+func (c *apiClient) SignUpUserCode(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*DefaultReply, error) {
 	out := new(DefaultReply)
 	out := new(DefaultReply)
-	err := c.cc.Invoke(ctx, "/im.Api/SignUp", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/im.Api/SignUpUserCode", in, out, opts...)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	return out, nil
 	return out, nil
 }
 }
 
 
-func (c *apiClient) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInReply, error) {
+func (c *apiClient) SignUpPhone(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*DefaultReply, error) {
+	out := new(DefaultReply)
+	err := c.cc.Invoke(ctx, "/im.Api/SignUpPhone", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *apiClient) SignInUserCode(ctx context.Context, in *SignInUserCodeRequest, opts ...grpc.CallOption) (*SignInReply, error) {
 	out := new(SignInReply)
 	out := new(SignInReply)
-	err := c.cc.Invoke(ctx, "/im.Api/SignIn", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/im.Api/SignInUserCode", in, out, opts...)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
@@ -61,8 +72,9 @@ func (c *apiClient) SignOut(ctx context.Context, in *DefaultRequest, opts ...grp
 // All implementations must embed UnimplementedApiServer
 // All implementations must embed UnimplementedApiServer
 // for forward compatibility
 // for forward compatibility
 type ApiServer interface {
 type ApiServer interface {
-	SignUp(context.Context, *SignUpRequest) (*DefaultReply, error)
-	SignIn(context.Context, *SignInRequest) (*SignInReply, error)
+	SignUpUserCode(context.Context, *SignUpRequest) (*DefaultReply, error)
+	SignUpPhone(context.Context, *SignUpRequest) (*DefaultReply, error)
+	SignInUserCode(context.Context, *SignInUserCodeRequest) (*SignInReply, error)
 	SignOut(context.Context, *DefaultRequest) (*DefaultReply, error)
 	SignOut(context.Context, *DefaultRequest) (*DefaultReply, error)
 	mustEmbedUnimplementedApiServer()
 	mustEmbedUnimplementedApiServer()
 }
 }
@@ -71,11 +83,14 @@ type ApiServer interface {
 type UnimplementedApiServer struct {
 type UnimplementedApiServer struct {
 }
 }
 
 
-func (UnimplementedApiServer) SignUp(context.Context, *SignUpRequest) (*DefaultReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method SignUp not implemented")
+func (UnimplementedApiServer) SignUpUserCode(context.Context, *SignUpRequest) (*DefaultReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SignUpUserCode not implemented")
+}
+func (UnimplementedApiServer) SignUpPhone(context.Context, *SignUpRequest) (*DefaultReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SignUpPhone not implemented")
 }
 }
-func (UnimplementedApiServer) SignIn(context.Context, *SignInRequest) (*SignInReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method SignIn not implemented")
+func (UnimplementedApiServer) SignInUserCode(context.Context, *SignInUserCodeRequest) (*SignInReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SignInUserCode not implemented")
 }
 }
 func (UnimplementedApiServer) SignOut(context.Context, *DefaultRequest) (*DefaultReply, error) {
 func (UnimplementedApiServer) SignOut(context.Context, *DefaultRequest) (*DefaultReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SignOut not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method SignOut not implemented")
@@ -90,41 +105,59 @@ type UnsafeApiServer interface {
 }
 }
 
 
 func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer) {
 func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer) {
-	s.RegisterService(&_Api_serviceDesc, srv)
+	s.RegisterService(&Api_ServiceDesc, srv)
+}
+
+func _Api_SignUpUserCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SignUpRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ApiServer).SignUpUserCode(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/im.Api/SignUpUserCode",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ApiServer).SignUpUserCode(ctx, req.(*SignUpRequest))
+	}
+	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-func _Api_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _Api_SignUpPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(SignUpRequest)
 	in := new(SignUpRequest)
 	if err := dec(in); err != nil {
 	if err := dec(in); err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	if interceptor == nil {
 	if interceptor == nil {
-		return srv.(ApiServer).SignUp(ctx, in)
+		return srv.(ApiServer).SignUpPhone(ctx, in)
 	}
 	}
 	info := &grpc.UnaryServerInfo{
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
 		Server:     srv,
-		FullMethod: "/im.Api/SignUp",
+		FullMethod: "/im.Api/SignUpPhone",
 	}
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ApiServer).SignUp(ctx, req.(*SignUpRequest))
+		return srv.(ApiServer).SignUpPhone(ctx, req.(*SignUpRequest))
 	}
 	}
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-func _Api_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(SignInRequest)
+func _Api_SignInUserCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SignInUserCodeRequest)
 	if err := dec(in); err != nil {
 	if err := dec(in); err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	if interceptor == nil {
 	if interceptor == nil {
-		return srv.(ApiServer).SignIn(ctx, in)
+		return srv.(ApiServer).SignInUserCode(ctx, in)
 	}
 	}
 	info := &grpc.UnaryServerInfo{
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
 		Server:     srv,
-		FullMethod: "/im.Api/SignIn",
+		FullMethod: "/im.Api/SignInUserCode",
 	}
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ApiServer).SignIn(ctx, req.(*SignInRequest))
+		return srv.(ApiServer).SignInUserCode(ctx, req.(*SignInUserCodeRequest))
 	}
 	}
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
@@ -147,17 +180,24 @@ func _Api_SignOut_Handler(srv interface{}, ctx context.Context, dec func(interfa
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-var _Api_serviceDesc = grpc.ServiceDesc{
+// Api_ServiceDesc is the grpc.ServiceDesc for Api service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Api_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "im.Api",
 	ServiceName: "im.Api",
 	HandlerType: (*ApiServer)(nil),
 	HandlerType: (*ApiServer)(nil),
 	Methods: []grpc.MethodDesc{
 	Methods: []grpc.MethodDesc{
 		{
 		{
-			MethodName: "SignUp",
-			Handler:    _Api_SignUp_Handler,
+			MethodName: "SignUpUserCode",
+			Handler:    _Api_SignUpUserCode_Handler,
+		},
+		{
+			MethodName: "SignUpPhone",
+			Handler:    _Api_SignUpPhone_Handler,
 		},
 		},
 		{
 		{
-			MethodName: "SignIn",
-			Handler:    _Api_SignIn_Handler,
+			MethodName: "SignInUserCode",
+			Handler:    _Api_SignInUserCode_Handler,
 		},
 		},
 		{
 		{
 			MethodName: "SignOut",
 			MethodName: "SignOut",