初步完成用户电子邮箱绑定(激活)

This commit is contained in:
GoEdgeLab
2022-12-08 20:26:20 +08:00
parent af2592b531
commit 4d5d85cced
15 changed files with 2208 additions and 733 deletions

View File

@@ -36,6 +36,7 @@ type User struct {
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"`
Tel string `protobuf:"bytes,5,opt,name=tel,proto3" json:"tel,omitempty"`
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
VerifiedEmail string `protobuf:"bytes,20,opt,name=verifiedEmail,proto3" json:"verifiedEmail,omitempty"`
Remark string `protobuf:"bytes,7,opt,name=remark,proto3" json:"remark,omitempty"`
IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"`
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
@@ -125,6 +126,13 @@ func (x *User) GetEmail() string {
return ""
}
func (x *User) GetVerifiedEmail() string {
if x != nil {
return x.VerifiedEmail
}
return ""
}
func (x *User) GetRemark() string {
if x != nil {
return x.Remark
@@ -226,7 +234,7 @@ var file_models_model_user_proto_rawDesc = []byte{
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x04, 0x0a, 0x04, 0x55, 0x73,
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x05, 0x0a, 0x04, 0x55, 0x73,
0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
@@ -235,39 +243,41 @@ var file_models_model_user_proto_rawDesc = []byte{
0x62, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69,
0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x74, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61,
0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08,
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
0x65, 0x64, 0x49, 0x50, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69,
0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65,
0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73,
0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65,
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73,
0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x6a, 0x65,
0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73,
0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x66, 0x69, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x49, 0x6e,
0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69,
0x73, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01,
0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65,
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x08, 0x6f, 0x74,
0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69,
0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75,
0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65,
0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e,
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65,
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x12, 0x1e,
0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e,
0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22,
0x0a, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0f,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73,
0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18,
0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c,
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08,
0x52, 0x16, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x45, 0x6e,
0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65,
0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64,
0x12, 0x25, 0x0a, 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x13, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x08, 0x6f,
0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e,
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65,
0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66,
0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -0,0 +1,216 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.19.4
// source: models/model_user_email_verification.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 电子邮箱认证
type UserEmailVerification struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Email
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` // 代号
CreatedAt int64 `protobuf:"varint,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间
IsSent bool `protobuf:"varint,6,opt,name=isSent,proto3" json:"isSent,omitempty"` // 已发送
IsVerified bool `protobuf:"varint,7,opt,name=isVerified,proto3" json:"isVerified,omitempty"` // 已激活
ExpiresAt int64 `protobuf:"varint,8,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // 过期时间,动态计算而来
}
func (x *UserEmailVerification) Reset() {
*x = UserEmailVerification{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_user_email_verification_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserEmailVerification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserEmailVerification) ProtoMessage() {}
func (x *UserEmailVerification) ProtoReflect() protoreflect.Message {
mi := &file_models_model_user_email_verification_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserEmailVerification.ProtoReflect.Descriptor instead.
func (*UserEmailVerification) Descriptor() ([]byte, []int) {
return file_models_model_user_email_verification_proto_rawDescGZIP(), []int{0}
}
func (x *UserEmailVerification) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserEmailVerification) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *UserEmailVerification) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *UserEmailVerification) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *UserEmailVerification) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *UserEmailVerification) GetIsSent() bool {
if x != nil {
return x.IsSent
}
return false
}
func (x *UserEmailVerification) GetIsVerified() bool {
if x != nil {
return x.IsVerified
}
return false
}
func (x *UserEmailVerification) GetExpiresAt() int64 {
if x != nil {
return x.ExpiresAt
}
return 0
}
var File_models_model_user_email_verification_proto protoreflect.FileDescriptor
var file_models_model_user_email_verification_proto_rawDesc = []byte{
0x0a, 0x2a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
0x22, 0xdd, 0x01, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65,
0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73,
0x53, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x65,
0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64,
0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x18,
0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_models_model_user_email_verification_proto_rawDescOnce sync.Once
file_models_model_user_email_verification_proto_rawDescData = file_models_model_user_email_verification_proto_rawDesc
)
func file_models_model_user_email_verification_proto_rawDescGZIP() []byte {
file_models_model_user_email_verification_proto_rawDescOnce.Do(func() {
file_models_model_user_email_verification_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_email_verification_proto_rawDescData)
})
return file_models_model_user_email_verification_proto_rawDescData
}
var file_models_model_user_email_verification_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_user_email_verification_proto_goTypes = []interface{}{
(*UserEmailVerification)(nil), // 0: pb.UserEmailVerification
}
var file_models_model_user_email_verification_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] 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 extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_models_model_user_email_verification_proto_init() }
func file_models_model_user_email_verification_proto_init() {
if File_models_model_user_email_verification_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_models_model_user_email_verification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserEmailVerification); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_user_email_verification_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_user_email_verification_proto_goTypes,
DependencyIndexes: file_models_model_user_email_verification_proto_depIdxs,
MessageInfos: file_models_model_user_email_verification_proto_msgTypes,
}.Build()
File_models_model_user_email_verification_proto = out.File
file_models_model_user_email_verification_proto_rawDesc = nil
file_models_model_user_email_verification_proto_goTypes = nil
file_models_model_user_email_verification_proto_depIdxs = nil
}

View File

@@ -163,6 +163,86 @@ func (x *UpdateMessageMediasRequest) GetMessageMedias() []*MessageMedia {
return nil
}
// 发送媒介信息
type SendMediaMessageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MediaType string `protobuf:"bytes,1,opt,name=mediaType,proto3" json:"mediaType,omitempty"` // 媒介类型
OptionsJSON []byte `protobuf:"bytes,2,opt,name=optionsJSON,proto3" json:"optionsJSON,omitempty"` // 媒介参数
User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // 接收用户
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // 标题
Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` // 内容
}
func (x *SendMediaMessageRequest) Reset() {
*x = SendMediaMessageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_message_media_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendMediaMessageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendMediaMessageRequest) ProtoMessage() {}
func (x *SendMediaMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_message_media_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendMediaMessageRequest.ProtoReflect.Descriptor instead.
func (*SendMediaMessageRequest) Descriptor() ([]byte, []int) {
return file_service_message_media_proto_rawDescGZIP(), []int{3}
}
func (x *SendMediaMessageRequest) GetMediaType() string {
if x != nil {
return x.MediaType
}
return ""
}
func (x *SendMediaMessageRequest) GetOptionsJSON() []byte {
if x != nil {
return x.OptionsJSON
}
return nil
}
func (x *SendMediaMessageRequest) GetUser() string {
if x != nil {
return x.User
}
return ""
}
func (x *SendMediaMessageRequest) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *SendMediaMessageRequest) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
var File_service_message_media_proto protoreflect.FileDescriptor
var file_service_message_media_proto_rawDesc = []byte{
@@ -184,20 +264,34 @@ var file_service_message_media_proto_rawDesc = []byte{
0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65,
0x64, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x0d, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x32, 0xb7, 0x01, 0x0a, 0x13,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d,
0x65, 0x64, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45,
0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d,
0x65, 0x64, 0x69, 0x61, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x17,
0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61,
0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69,
0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0xf8, 0x01, 0x0a, 0x13, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x59, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64,
0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65,
0x64, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x13,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64,
0x69, 0x61, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e,
0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -212,23 +306,26 @@ func file_service_message_media_proto_rawDescGZIP() []byte {
return file_service_message_media_proto_rawDescData
}
var file_service_message_media_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_service_message_media_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_service_message_media_proto_goTypes = []interface{}{
(*FindAllMessageMediasRequest)(nil), // 0: pb.FindAllMessageMediasRequest
(*FindAllMessageMediasResponse)(nil), // 1: pb.FindAllMessageMediasResponse
(*UpdateMessageMediasRequest)(nil), // 2: pb.UpdateMessageMediasRequest
(*MessageMedia)(nil), // 3: pb.MessageMedia
(*RPCSuccess)(nil), // 4: pb.RPCSuccess
(*SendMediaMessageRequest)(nil), // 3: pb.SendMediaMessageRequest
(*MessageMedia)(nil), // 4: pb.MessageMedia
(*RPCSuccess)(nil), // 5: pb.RPCSuccess
}
var file_service_message_media_proto_depIdxs = []int32{
3, // 0: pb.FindAllMessageMediasResponse.messageMedias:type_name -> pb.MessageMedia
3, // 1: pb.UpdateMessageMediasRequest.messageMedias:type_name -> pb.MessageMedia
4, // 0: pb.FindAllMessageMediasResponse.messageMedias:type_name -> pb.MessageMedia
4, // 1: pb.UpdateMessageMediasRequest.messageMedias:type_name -> pb.MessageMedia
0, // 2: pb.MessageMediaService.findAllMessageMedias:input_type -> pb.FindAllMessageMediasRequest
2, // 3: pb.MessageMediaService.updateMessageMedias:input_type -> pb.UpdateMessageMediasRequest
1, // 4: pb.MessageMediaService.findAllMessageMedias:output_type -> pb.FindAllMessageMediasResponse
4, // 5: pb.MessageMediaService.updateMessageMedias:output_type -> pb.RPCSuccess
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
3, // 4: pb.MessageMediaService.sendMediaMessage:input_type -> pb.SendMediaMessageRequest
1, // 5: pb.MessageMediaService.findAllMessageMedias:output_type -> pb.FindAllMessageMediasResponse
5, // 6: pb.MessageMediaService.updateMessageMedias:output_type -> pb.RPCSuccess
5, // 7: pb.MessageMediaService.sendMediaMessage:output_type -> pb.RPCSuccess
5, // [5:8] is the sub-list for method output_type
2, // [2:5] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
@@ -278,6 +375,18 @@ func file_service_message_media_proto_init() {
return nil
}
}
file_service_message_media_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendMediaMessageRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -285,7 +394,7 @@ func file_service_message_media_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_message_media_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
@@ -315,6 +424,8 @@ type MessageMediaServiceClient interface {
FindAllMessageMedias(ctx context.Context, in *FindAllMessageMediasRequest, opts ...grpc.CallOption) (*FindAllMessageMediasResponse, error)
// 设置所有支持的媒介
UpdateMessageMedias(ctx context.Context, in *UpdateMessageMediasRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 发送媒介信息
SendMediaMessage(ctx context.Context, in *SendMediaMessageRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type messageMediaServiceClient struct {
@@ -343,12 +454,23 @@ func (c *messageMediaServiceClient) UpdateMessageMedias(ctx context.Context, in
return out, nil
}
func (c *messageMediaServiceClient) SendMediaMessage(ctx context.Context, in *SendMediaMessageRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.MessageMediaService/sendMediaMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MessageMediaServiceServer is the server API for MessageMediaService service.
type MessageMediaServiceServer interface {
// 获取所有支持的媒介
FindAllMessageMedias(context.Context, *FindAllMessageMediasRequest) (*FindAllMessageMediasResponse, error)
// 设置所有支持的媒介
UpdateMessageMedias(context.Context, *UpdateMessageMediasRequest) (*RPCSuccess, error)
// 发送媒介信息
SendMediaMessage(context.Context, *SendMediaMessageRequest) (*RPCSuccess, error)
}
// UnimplementedMessageMediaServiceServer can be embedded to have forward compatible implementations.
@@ -361,6 +483,9 @@ func (*UnimplementedMessageMediaServiceServer) FindAllMessageMedias(context.Cont
func (*UnimplementedMessageMediaServiceServer) UpdateMessageMedias(context.Context, *UpdateMessageMediasRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateMessageMedias not implemented")
}
func (*UnimplementedMessageMediaServiceServer) SendMediaMessage(context.Context, *SendMediaMessageRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendMediaMessage not implemented")
}
func RegisterMessageMediaServiceServer(s *grpc.Server, srv MessageMediaServiceServer) {
s.RegisterService(&_MessageMediaService_serviceDesc, srv)
@@ -402,6 +527,24 @@ func _MessageMediaService_UpdateMessageMedias_Handler(srv interface{}, ctx conte
return interceptor(ctx, in, info, handler)
}
func _MessageMediaService_SendMediaMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendMediaMessageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageMediaServiceServer).SendMediaMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.MessageMediaService/SendMediaMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageMediaServiceServer).SendMediaMessage(ctx, req.(*SendMediaMessageRequest))
}
return interceptor(ctx, in, info, handler)
}
var _MessageMediaService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.MessageMediaService",
HandlerType: (*MessageMediaServiceServer)(nil),
@@ -414,6 +557,10 @@ var _MessageMediaService_serviceDesc = grpc.ServiceDesc{
MethodName: "updateMessageMedias",
Handler: _MessageMediaService_UpdateMessageMedias_Handler,
},
{
MethodName: "sendMediaMessage",
Handler: _MessageMediaService_SendMediaMessage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_message_media.proto",

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,626 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.19.4
// source: service_user_email_verification.proto
package pb
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 认证邮箱
type VerifyUserEmailRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 激活码
}
func (x *VerifyUserEmailRequest) Reset() {
*x = VerifyUserEmailRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_email_verification_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyUserEmailRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyUserEmailRequest) ProtoMessage() {}
func (x *VerifyUserEmailRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_email_verification_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyUserEmailRequest.ProtoReflect.Descriptor instead.
func (*VerifyUserEmailRequest) Descriptor() ([]byte, []int) {
return file_service_user_email_verification_proto_rawDescGZIP(), []int{0}
}
func (x *VerifyUserEmailRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
type VerifyUserEmailResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 邮箱对应的用户ID
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // 邮箱地址
ErrorCode string `protobuf:"bytes,3,opt,name=errorCode,proto3" json:"errorCode,omitempty"` // 错误代号,如果为空,说明没有错误
ErrorMessage string `protobuf:"bytes,4,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` // 错误信息
}
func (x *VerifyUserEmailResponse) Reset() {
*x = VerifyUserEmailResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_email_verification_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyUserEmailResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyUserEmailResponse) ProtoMessage() {}
func (x *VerifyUserEmailResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_user_email_verification_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyUserEmailResponse.ProtoReflect.Descriptor instead.
func (*VerifyUserEmailResponse) Descriptor() ([]byte, []int) {
return file_service_user_email_verification_proto_rawDescGZIP(), []int{1}
}
func (x *VerifyUserEmailResponse) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *VerifyUserEmailResponse) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *VerifyUserEmailResponse) GetErrorCode() string {
if x != nil {
return x.ErrorCode
}
return ""
}
func (x *VerifyUserEmailResponse) GetErrorMessage() string {
if x != nil {
return x.ErrorMessage
}
return ""
}
// 发送邮箱认证
type SendUserEmailVerificationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // 待验证邮箱
}
func (x *SendUserEmailVerificationRequest) Reset() {
*x = SendUserEmailVerificationRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_email_verification_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendUserEmailVerificationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendUserEmailVerificationRequest) ProtoMessage() {}
func (x *SendUserEmailVerificationRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_email_verification_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendUserEmailVerificationRequest.ProtoReflect.Descriptor instead.
func (*SendUserEmailVerificationRequest) Descriptor() ([]byte, []int) {
return file_service_user_email_verification_proto_rawDescGZIP(), []int{2}
}
func (x *SendUserEmailVerificationRequest) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
// 查找用户正在等待激活的认证
type FindLatestUserEmailVerificationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FindLatestUserEmailVerificationRequest) Reset() {
*x = FindLatestUserEmailVerificationRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_email_verification_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindLatestUserEmailVerificationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindLatestUserEmailVerificationRequest) ProtoMessage() {}
func (x *FindLatestUserEmailVerificationRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_email_verification_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindLatestUserEmailVerificationRequest.ProtoReflect.Descriptor instead.
func (*FindLatestUserEmailVerificationRequest) Descriptor() ([]byte, []int) {
return file_service_user_email_verification_proto_rawDescGZIP(), []int{3}
}
type FindLatestUserEmailVerificationResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserEmailVerification *UserEmailVerification `protobuf:"bytes,1,opt,name=userEmailVerification,proto3" json:"userEmailVerification,omitempty"`
}
func (x *FindLatestUserEmailVerificationResponse) Reset() {
*x = FindLatestUserEmailVerificationResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_email_verification_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindLatestUserEmailVerificationResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindLatestUserEmailVerificationResponse) ProtoMessage() {}
func (x *FindLatestUserEmailVerificationResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_user_email_verification_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindLatestUserEmailVerificationResponse.ProtoReflect.Descriptor instead.
func (*FindLatestUserEmailVerificationResponse) Descriptor() ([]byte, []int) {
return file_service_user_email_verification_proto_rawDescGZIP(), []int{4}
}
func (x *FindLatestUserEmailVerificationResponse) GetUserEmailVerification() *UserEmailVerification {
if x != nil {
return x.UserEmailVerification
}
return nil
}
var File_service_user_email_verification_proto protoreflect.FileDescriptor
var file_service_user_email_verification_proto_rawDesc = []byte{
0x0a, 0x25, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65,
0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x19, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f,
0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x16, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72,
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x22, 0x89, 0x01, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x45,
0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x38, 0x0a, 0x20,
0x53, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x28, 0x0a, 0x26, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61,
0x74, 0x65, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x22, 0x7a, 0x0a, 0x27, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x55, 0x73,
0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x75,
0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xb9, 0x02, 0x0a,
0x1c, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a,
0x0f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72,
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70,
0x62, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69,
0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x19, 0x73, 0x65, 0x6e,
0x64, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64,
0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x7a, 0x0a, 0x1f,
0x66, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d,
0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x55,
0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x45,
0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_user_email_verification_proto_rawDescOnce sync.Once
file_service_user_email_verification_proto_rawDescData = file_service_user_email_verification_proto_rawDesc
)
func file_service_user_email_verification_proto_rawDescGZIP() []byte {
file_service_user_email_verification_proto_rawDescOnce.Do(func() {
file_service_user_email_verification_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_user_email_verification_proto_rawDescData)
})
return file_service_user_email_verification_proto_rawDescData
}
var file_service_user_email_verification_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_service_user_email_verification_proto_goTypes = []interface{}{
(*VerifyUserEmailRequest)(nil), // 0: pb.VerifyUserEmailRequest
(*VerifyUserEmailResponse)(nil), // 1: pb.VerifyUserEmailResponse
(*SendUserEmailVerificationRequest)(nil), // 2: pb.SendUserEmailVerificationRequest
(*FindLatestUserEmailVerificationRequest)(nil), // 3: pb.FindLatestUserEmailVerificationRequest
(*FindLatestUserEmailVerificationResponse)(nil), // 4: pb.FindLatestUserEmailVerificationResponse
(*UserEmailVerification)(nil), // 5: pb.UserEmailVerification
(*RPCSuccess)(nil), // 6: pb.RPCSuccess
}
var file_service_user_email_verification_proto_depIdxs = []int32{
5, // 0: pb.FindLatestUserEmailVerificationResponse.userEmailVerification:type_name -> pb.UserEmailVerification
0, // 1: pb.UserEmailVerificationService.verifyUserEmail:input_type -> pb.VerifyUserEmailRequest
2, // 2: pb.UserEmailVerificationService.sendUserEmailVerification:input_type -> pb.SendUserEmailVerificationRequest
3, // 3: pb.UserEmailVerificationService.findLatestUserEmailVerification:input_type -> pb.FindLatestUserEmailVerificationRequest
1, // 4: pb.UserEmailVerificationService.verifyUserEmail:output_type -> pb.VerifyUserEmailResponse
6, // 5: pb.UserEmailVerificationService.sendUserEmailVerification:output_type -> pb.RPCSuccess
4, // 6: pb.UserEmailVerificationService.findLatestUserEmailVerification:output_type -> pb.FindLatestUserEmailVerificationResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_service_user_email_verification_proto_init() }
func file_service_user_email_verification_proto_init() {
if File_service_user_email_verification_proto != nil {
return
}
file_models_rpc_messages_proto_init()
file_models_model_user_email_verification_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_user_email_verification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyUserEmailRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_email_verification_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VerifyUserEmailResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_email_verification_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendUserEmailVerificationRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_email_verification_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindLatestUserEmailVerificationRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_email_verification_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindLatestUserEmailVerificationResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_user_email_verification_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_user_email_verification_proto_goTypes,
DependencyIndexes: file_service_user_email_verification_proto_depIdxs,
MessageInfos: file_service_user_email_verification_proto_msgTypes,
}.Build()
File_service_user_email_verification_proto = out.File
file_service_user_email_verification_proto_rawDesc = nil
file_service_user_email_verification_proto_goTypes = nil
file_service_user_email_verification_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// UserEmailVerificationServiceClient is the client API for UserEmailVerificationService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type UserEmailVerificationServiceClient interface {
// 认证邮箱
VerifyUserEmail(ctx context.Context, in *VerifyUserEmailRequest, opts ...grpc.CallOption) (*VerifyUserEmailResponse, error)
// 发送邮箱认证
SendUserEmailVerification(ctx context.Context, in *SendUserEmailVerificationRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找用户正在等待激活的认证
FindLatestUserEmailVerification(ctx context.Context, in *FindLatestUserEmailVerificationRequest, opts ...grpc.CallOption) (*FindLatestUserEmailVerificationResponse, error)
}
type userEmailVerificationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserEmailVerificationServiceClient(cc grpc.ClientConnInterface) UserEmailVerificationServiceClient {
return &userEmailVerificationServiceClient{cc}
}
func (c *userEmailVerificationServiceClient) VerifyUserEmail(ctx context.Context, in *VerifyUserEmailRequest, opts ...grpc.CallOption) (*VerifyUserEmailResponse, error) {
out := new(VerifyUserEmailResponse)
err := c.cc.Invoke(ctx, "/pb.UserEmailVerificationService/verifyUserEmail", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userEmailVerificationServiceClient) SendUserEmailVerification(ctx context.Context, in *SendUserEmailVerificationRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.UserEmailVerificationService/sendUserEmailVerification", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userEmailVerificationServiceClient) FindLatestUserEmailVerification(ctx context.Context, in *FindLatestUserEmailVerificationRequest, opts ...grpc.CallOption) (*FindLatestUserEmailVerificationResponse, error) {
out := new(FindLatestUserEmailVerificationResponse)
err := c.cc.Invoke(ctx, "/pb.UserEmailVerificationService/findLatestUserEmailVerification", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserEmailVerificationServiceServer is the server API for UserEmailVerificationService service.
type UserEmailVerificationServiceServer interface {
// 认证邮箱
VerifyUserEmail(context.Context, *VerifyUserEmailRequest) (*VerifyUserEmailResponse, error)
// 发送邮箱认证
SendUserEmailVerification(context.Context, *SendUserEmailVerificationRequest) (*RPCSuccess, error)
// 查找用户正在等待激活的认证
FindLatestUserEmailVerification(context.Context, *FindLatestUserEmailVerificationRequest) (*FindLatestUserEmailVerificationResponse, error)
}
// UnimplementedUserEmailVerificationServiceServer can be embedded to have forward compatible implementations.
type UnimplementedUserEmailVerificationServiceServer struct {
}
func (*UnimplementedUserEmailVerificationServiceServer) VerifyUserEmail(context.Context, *VerifyUserEmailRequest) (*VerifyUserEmailResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VerifyUserEmail not implemented")
}
func (*UnimplementedUserEmailVerificationServiceServer) SendUserEmailVerification(context.Context, *SendUserEmailVerificationRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendUserEmailVerification not implemented")
}
func (*UnimplementedUserEmailVerificationServiceServer) FindLatestUserEmailVerification(context.Context, *FindLatestUserEmailVerificationRequest) (*FindLatestUserEmailVerificationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindLatestUserEmailVerification not implemented")
}
func RegisterUserEmailVerificationServiceServer(s *grpc.Server, srv UserEmailVerificationServiceServer) {
s.RegisterService(&_UserEmailVerificationService_serviceDesc, srv)
}
func _UserEmailVerificationService_VerifyUserEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VerifyUserEmailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserEmailVerificationServiceServer).VerifyUserEmail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserEmailVerificationService/VerifyUserEmail",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserEmailVerificationServiceServer).VerifyUserEmail(ctx, req.(*VerifyUserEmailRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserEmailVerificationService_SendUserEmailVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendUserEmailVerificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserEmailVerificationServiceServer).SendUserEmailVerification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserEmailVerificationService/SendUserEmailVerification",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserEmailVerificationServiceServer).SendUserEmailVerification(ctx, req.(*SendUserEmailVerificationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserEmailVerificationService_FindLatestUserEmailVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindLatestUserEmailVerificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserEmailVerificationServiceServer).FindLatestUserEmailVerification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserEmailVerificationService/FindLatestUserEmailVerification",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserEmailVerificationServiceServer).FindLatestUserEmailVerification(ctx, req.(*FindLatestUserEmailVerificationRequest))
}
return interceptor(ctx, in, info, handler)
}
var _UserEmailVerificationService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.UserEmailVerificationService",
HandlerType: (*UserEmailVerificationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "verifyUserEmail",
Handler: _UserEmailVerificationService_VerifyUserEmail_Handler,
},
{
MethodName: "sendUserEmailVerification",
Handler: _UserEmailVerificationService_SendUserEmailVerification_Handler,
},
{
MethodName: "findLatestUserEmailVerification",
Handler: _UserEmailVerificationService_FindLatestUserEmailVerification_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_user_email_verification.proto",
}