mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 12:20:27 +08:00
初步完成用户电子邮箱绑定(激活)
This commit is contained in:
@@ -14,6 +14,7 @@ pkg/
|
||||
userconfigs - 用户相关配置
|
||||
|
||||
configutils/ - 配置公共函数等
|
||||
iplibrary/ - IP库
|
||||
errors/ - 错误处理
|
||||
rpc/ - RPC通讯
|
||||
protos/ RPC数据和接口定义
|
||||
|
||||
114
build/rpc.json
114
build/rpc.json
@@ -3720,6 +3720,17 @@
|
||||
"monitor"
|
||||
],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
"name": "sendMediaMessage",
|
||||
"requestMessageName": "SendMediaMessageRequest",
|
||||
"responseMessageName": "RPCSuccess",
|
||||
"code": "rpc sendMediaMessage(SendMediaMessageRequest) returns (RPCSuccess);",
|
||||
"doc": "发送媒介信息",
|
||||
"roles": [
|
||||
"admin"
|
||||
],
|
||||
"isDeprecated": false
|
||||
}
|
||||
],
|
||||
"filename": "service_message_media.proto",
|
||||
@@ -10954,10 +10965,12 @@
|
||||
{
|
||||
"name": "registerUser",
|
||||
"requestMessageName": "RegisterUserRequest",
|
||||
"responseMessageName": "RPCSuccess",
|
||||
"code": "rpc registerUser(RegisterUserRequest) returns (RPCSuccess);",
|
||||
"responseMessageName": "RegisterUserResponse",
|
||||
"code": "rpc registerUser(RegisterUserRequest) returns (RegisterUserResponse);",
|
||||
"doc": "注册用户",
|
||||
"roles": [],
|
||||
"roles": [
|
||||
"user"
|
||||
],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
@@ -11212,6 +11225,15 @@
|
||||
"admin"
|
||||
],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
"name": "checkUserEmailIsUsing",
|
||||
"requestMessageName": "CheckUserEmailIsUsingRequest",
|
||||
"responseMessageName": "CheckUserEmailIsUsingResponse",
|
||||
"code": "rpc checkUserEmailIsUsing(CheckUserEmailIsUsingRequest) returns (CheckUserEmailIsUsingResponse);",
|
||||
"doc": "检查邮箱是否已被使用",
|
||||
"roles": [],
|
||||
"isDeprecated": false
|
||||
}
|
||||
],
|
||||
"filename": "service_user.proto",
|
||||
@@ -11486,6 +11508,40 @@
|
||||
"filename": "service_user_bill.proto",
|
||||
"doc": "账单相关服务"
|
||||
},
|
||||
{
|
||||
"name": "UserEmailVerificationService",
|
||||
"methods": [
|
||||
{
|
||||
"name": "verifyUserEmail",
|
||||
"requestMessageName": "VerifyUserEmailRequest",
|
||||
"responseMessageName": "VerifyUserEmailResponse",
|
||||
"code": "rpc verifyUserEmail(VerifyUserEmailRequest) returns (VerifyUserEmailResponse);",
|
||||
"doc": "认证邮箱",
|
||||
"roles": [],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
"name": "sendUserEmailVerification",
|
||||
"requestMessageName": "SendUserEmailVerificationRequest",
|
||||
"responseMessageName": "RPCSuccess",
|
||||
"code": "rpc sendUserEmailVerification(SendUserEmailVerificationRequest) returns (RPCSuccess);",
|
||||
"doc": "发送邮箱认证",
|
||||
"roles": [],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
"name": "findLatestUserEmailVerification",
|
||||
"requestMessageName": "FindLatestUserEmailVerificationRequest",
|
||||
"responseMessageName": "FindLatestUserEmailVerificationResponse",
|
||||
"code": "rpc findLatestUserEmailVerification(FindLatestUserEmailVerificationRequest) returns (FindLatestUserEmailVerificationResponse);",
|
||||
"doc": "查找用户正在等待激活的认证",
|
||||
"roles": [],
|
||||
"isDeprecated": false
|
||||
}
|
||||
],
|
||||
"filename": "service_user_email_verification.proto",
|
||||
"doc": "用户电子邮箱认证服务"
|
||||
},
|
||||
{
|
||||
"name": "UserIdentityService",
|
||||
"methods": [
|
||||
@@ -12509,6 +12565,16 @@
|
||||
"code": "message CheckTownsWithIPLibraryFileIdResponse {\n\trepeated MissingTown missingTowns = 1;\n\n\n\tmessage MissingTown {\n\t\tstring countryName = 1;\n\t\tstring provinceName = 2;\n\t\tstring cityName = 3;\n\t\tstring townName = 4;\n\t\trepeated RegionTown similarTowns = 5;\n\t}\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "CheckUserEmailIsUsingRequest",
|
||||
"code": "message CheckUserEmailIsUsingRequest {\n\tstring email = 1;\n}",
|
||||
"doc": "检查邮箱是否已被验证"
|
||||
},
|
||||
{
|
||||
"name": "CheckUserEmailIsUsingResponse",
|
||||
"code": "message CheckUserEmailIsUsingResponse {\n\tbool isUsing = 1; // 是否已被使用\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "CheckUserIdentityIsSubmittedRequest",
|
||||
"code": "message CheckUserIdentityIsSubmittedRequest {\n\tint64 userId = 1;\n}",
|
||||
@@ -17029,6 +17095,16 @@
|
||||
"code": "message FindLatestServersResponse {\n\trepeated Server servers = 1;\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "FindLatestUserEmailVerificationRequest",
|
||||
"code": "message FindLatestUserEmailVerificationRequest {\n\n}",
|
||||
"doc": "查找用户正在等待激活的认证"
|
||||
},
|
||||
{
|
||||
"name": "FindLatestUserEmailVerificationResponse",
|
||||
"code": "message FindLatestUserEmailVerificationResponse {\n\tUserEmailVerification userEmailVerification = 1;\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "FindNSAccessLogRequest",
|
||||
"code": "message FindNSAccessLogRequest {\n\tstring requestId = 1;\n}",
|
||||
@@ -19159,6 +19235,11 @@
|
||||
"code": "message RegisterUserRequest {\n\tstring username = 1;\n\tstring password = 2;\n\tstring mobile = 3;\n\tstring email = 4;\n\tstring fullname = 5;\n\tstring ip = 6;\n\tstring source = 7;\n}",
|
||||
"doc": "注册用户"
|
||||
},
|
||||
{
|
||||
"name": "RegisterUserResponse",
|
||||
"code": "message RegisterUserResponse {\n\tint64 userId = 1;\n\tbool requireEmailVerification = 2; // 是否需要激活邮件\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "RejectUserIdentityRequest",
|
||||
"code": "message RejectUserIdentityRequest {\n\tint64 userIdentityId = 1;\n\tstring reason = 2;\n}",
|
||||
@@ -19254,6 +19335,16 @@
|
||||
"code": "message Script {\n\tint64 id = 1;\n\tint64 userId = 2;\n\tbool isOn = 3;\n\tstring name = 4;\n\tstring filename = 5;\n\tstring code = 6;\n\tint64 updatedAt = 7;\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "SendMediaMessageRequest",
|
||||
"code": "message SendMediaMessageRequest {\n\tstring mediaType = 1; // 媒介类型\n\tbytes optionsJSON = 2; // 媒介参数\n\tstring user = 3; // 接收用户\n\tstring subject = 4; // 标题\n\tstring body = 5; // 内容\n}",
|
||||
"doc": "发送媒介信息"
|
||||
},
|
||||
{
|
||||
"name": "SendUserEmailVerificationRequest",
|
||||
"code": "message SendUserEmailVerificationRequest {\n\tstring email = 1; // 待验证邮箱\n}",
|
||||
"doc": "发送邮箱认证"
|
||||
},
|
||||
{
|
||||
"name": "Server",
|
||||
"code": "message Server {\n\tint64 id = 1;\n\tbool isOn = 18;\n\tstring type = 2;\n\tstring name = 3;\n\tstring description = 4;\n\tbytes includeNodes = 5;\n\tbytes excludeNodes = 6;\n\tint64 createdAt = 7;\n\tstring dnsName = 19;\n\tbool supportCNAME = 23;\n\tint64 userPlanId = 24;\n\n\t// 配置相关\n\tbytes config = 17;\n\tbytes serverNamesJSON = 8;\n\tstring firstServerName = 33;\n\tint32 countServerNames = 28;\n\tbool isAuditing = 20;\n\tint64 auditingAt = 25;\n\tbytes auditingServerNamesJSON = 21;\n\tServerNameAuditingResult auditingResult = 22;\n\n\tbytes httpJSON = 9;\n\tbytes httpsJSON = 10;\n\tbytes tcpJSON = 11;\n\tbytes tlsJSON = 12;\n\tbytes unixJSON = 13;\n\tbytes udpJSON = 14;\n\tint64 webId = 15;\n\tbytes reverseProxyJSON = 16;\n\n\tstring bandwidthTime = 26;\n\tint64 bandwidthBytes = 27;\n\n\tNodeCluster nodeCluster = 30;\n\trepeated ServerGroup serverGroups = 31;\n\tUser user = 32;\n}",
|
||||
@@ -20631,7 +20722,7 @@
|
||||
},
|
||||
{
|
||||
"name": "User",
|
||||
"code": "message User {\n\tint64 id = 1;\n\tstring username = 2;\n\tstring fullname = 3;\n\tstring mobile = 4;\n\tstring tel = 5;\n\tstring email = 6;\n\tstring remark = 7;\n\tbool isOn = 8;\n\tint64 createdAt = 9;\n\tstring registeredIP = 12;\n\tbool isVerified = 13;\n\tbool isRejected = 14;\n\tstring rejectReason = 15;\n\tbool isDeleted = 16;\n\tbool isIndividualIdentified = 17;\n\tbool isEnterpriseIdentified = 18;\n\n\tLogin otpLogin = 19; // OTP认证\n\n\tNodeCluster nodeCluster = 10;\n\trepeated UserFeature features = 11;\n}",
|
||||
"code": "message User {\n\tint64 id = 1;\n\tstring username = 2;\n\tstring fullname = 3;\n\tstring mobile = 4;\n\tstring tel = 5;\n\tstring email = 6;\n\tstring verifiedEmail = 20;\n\tstring remark = 7;\n\tbool isOn = 8;\n\tint64 createdAt = 9;\n\tstring registeredIP = 12;\n\tbool isVerified = 13;\n\tbool isRejected = 14;\n\tstring rejectReason = 15;\n\tbool isDeleted = 16;\n\tbool isIndividualIdentified = 17;\n\tbool isEnterpriseIdentified = 18;\n\n\tLogin otpLogin = 19; // OTP认证\n\n\tNodeCluster nodeCluster = 10;\n\trepeated UserFeature features = 11;\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
@@ -20664,6 +20755,11 @@
|
||||
"code": "message UserBill {\n\tint64 id = 1;\n\tUser user = 2;\n\tstring type = 3;\n\tstring typeName = 4;\n\tstring description = 5;\n\tdouble amount = 6;\n\tstring month = 7;\n\tbool isPaid = 8;\n\tint64 paidAt = 9;\n\tstring code = 10;\n\tbool canPay = 11;\n\tstring dayFrom = 12;\n\tstring dayTo = 13;\n\tstring pricePeriod = 14;\n\tbool isOverdue = 15; // 是否已逾期\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "UserEmailVerification",
|
||||
"code": "message UserEmailVerification {\n\tint64 id = 1;\n\tstring email = 2; // Email\n\tint64 userId = 3; // 用户ID\n\tstring code = 4; // 代号\n\tint64 createdAt = 5; // 创建时间\n\tbool isSent = 6; // 已发送\n\tbool isVerified = 7; // 已激活\n\tint64 expiresAt = 8; // 过期时间,动态计算而来\n}",
|
||||
"doc": "电子邮箱认证"
|
||||
},
|
||||
{
|
||||
"name": "UserFeature",
|
||||
"code": "message UserFeature {\n\tstring code = 1;\n\tstring name = 2;\n\tstring description = 3;\n}",
|
||||
@@ -20734,6 +20830,16 @@
|
||||
"code": "message VerifyNSDomainResponse {\n\tbool isOk = 1; // 是否成功\n\tstring errorCode = 2; // 错误代码\n\tstring errorMessage = 3; // 错误消息\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "VerifyUserEmailRequest",
|
||||
"code": "message VerifyUserEmailRequest {\n\tstring code = 1; // 激活码\n}",
|
||||
"doc": "认证邮箱"
|
||||
},
|
||||
{
|
||||
"name": "VerifyUserEmailResponse",
|
||||
"code": "message VerifyUserEmailResponse {\n\tint64 userId = 1; // 邮箱对应的用户ID\n\tstring email = 2; // 邮箱地址\n\tstring errorCode = 3; // 错误代号,如果为空,说明没有错误\n\tstring errorMessage = 4; // 错误信息\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "VerifyUserIdentityRequest",
|
||||
"code": "message VerifyUserIdentityRequest {\n\tint64 userIdentityId = 1;\n}",
|
||||
|
||||
6
go.mod
6
go.mod
@@ -5,14 +5,14 @@ go 1.18
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/iwind/TeaGo v0.0.0-20220304043459-0dd944a5b475
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
|
||||
golang.org/x/net v0.2.0
|
||||
google.golang.org/grpc v1.45.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
|
||||
)
|
||||
|
||||
require (
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/sys v0.2.0 // indirect
|
||||
golang.org/x/text v0.4.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect
|
||||
)
|
||||
|
||||
12
go.sum
12
go.sum
@@ -113,8 +113,8 @@ golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -136,15 +136,15 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
|
||||
@@ -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 (
|
||||
|
||||
216
pkg/rpc/pb/model_user_email_verification.pb.go
Normal file
216
pkg/rpc/pb/model_user_email_verification.pb.go
Normal 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
|
||||
}
|
||||
@@ -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
626
pkg/rpc/pb/service_user_email_verification.pb.go
Normal file
626
pkg/rpc/pb/service_user_email_verification.pb.go
Normal 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",
|
||||
}
|
||||
@@ -14,6 +14,7 @@ message User {
|
||||
string mobile = 4;
|
||||
string tel = 5;
|
||||
string email = 6;
|
||||
string verifiedEmail = 20;
|
||||
string remark = 7;
|
||||
bool isOn = 8;
|
||||
int64 createdAt = 9;
|
||||
|
||||
16
pkg/rpc/protos/models/model_user_email_verification.proto
Normal file
16
pkg/rpc/protos/models/model_user_email_verification.proto
Normal file
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// 电子邮箱认证
|
||||
message UserEmailVerification {
|
||||
int64 id = 1;
|
||||
string email = 2; // Email
|
||||
int64 userId = 3; // 用户ID
|
||||
string code = 4; // 代号
|
||||
int64 createdAt = 5; // 创建时间
|
||||
bool isSent = 6; // 已发送
|
||||
bool isVerified = 7; // 已激活
|
||||
int64 expiresAt = 8; // 过期时间,动态计算而来
|
||||
}
|
||||
@@ -13,6 +13,9 @@ service MessageMediaService {
|
||||
|
||||
// 设置所有支持的媒介
|
||||
rpc updateMessageMedias (UpdateMessageMediasRequest) returns (RPCSuccess);
|
||||
|
||||
// 发送媒介信息
|
||||
rpc sendMediaMessage(SendMediaMessageRequest) returns (RPCSuccess);
|
||||
}
|
||||
|
||||
// 获取所有支持的媒介
|
||||
@@ -27,4 +30,13 @@ message FindAllMessageMediasResponse {
|
||||
// 设置所有支持的媒介
|
||||
message UpdateMessageMediasRequest {
|
||||
repeated MessageMedia messageMedias = 2;
|
||||
}
|
||||
|
||||
// 发送媒介信息
|
||||
message SendMediaMessageRequest {
|
||||
string mediaType = 1; // 媒介类型
|
||||
bytes optionsJSON = 2; // 媒介参数
|
||||
string user = 3; // 接收用户
|
||||
string subject = 4; // 标题
|
||||
string body = 5; // 内容
|
||||
}
|
||||
@@ -14,7 +14,7 @@ service UserService {
|
||||
rpc createUser (CreateUserRequest) returns (CreateUserResponse);
|
||||
|
||||
// 注册用户
|
||||
rpc registerUser(RegisterUserRequest) returns (RPCSuccess);
|
||||
rpc registerUser(RegisterUserRequest) returns (RegisterUserResponse);
|
||||
|
||||
// 审核用户
|
||||
rpc verifyUser(VerifyUserRequest) returns (RPCSuccess);
|
||||
@@ -84,6 +84,9 @@ service UserService {
|
||||
|
||||
// 更新用户服务可用状态
|
||||
rpc renewUserServersState(RenewUserServersStateRequest) returns (RenewUserServersStateResponse);
|
||||
|
||||
// 检查邮箱是否已被使用
|
||||
rpc checkUserEmailIsUsing(CheckUserEmailIsUsingRequest) returns (CheckUserEmailIsUsingResponse);
|
||||
}
|
||||
|
||||
// 创建用户
|
||||
@@ -114,6 +117,11 @@ message RegisterUserRequest {
|
||||
string source = 7;
|
||||
}
|
||||
|
||||
message RegisterUserResponse {
|
||||
int64 userId = 1;
|
||||
bool requireEmailVerification = 2; // 是否需要激活邮件
|
||||
}
|
||||
|
||||
// 审核用户
|
||||
message VerifyUserRequest {
|
||||
int64 userId = 1;
|
||||
@@ -350,4 +358,13 @@ message RenewUserServersStateRequest {
|
||||
|
||||
message RenewUserServersStateResponse {
|
||||
bool isEnabled = 1;
|
||||
}
|
||||
|
||||
// 检查邮箱是否已被验证
|
||||
message CheckUserEmailIsUsingRequest {
|
||||
string email = 1;
|
||||
}
|
||||
|
||||
message CheckUserEmailIsUsingResponse {
|
||||
bool isUsing = 1; // 是否已被使用
|
||||
}
|
||||
45
pkg/rpc/protos/service_user_email_verification.proto
Normal file
45
pkg/rpc/protos/service_user_email_verification.proto
Normal file
@@ -0,0 +1,45 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/rpc_messages.proto";
|
||||
import "models/model_user_email_verification.proto";
|
||||
|
||||
// 用户电子邮箱认证服务
|
||||
service UserEmailVerificationService {
|
||||
// 认证邮箱
|
||||
rpc verifyUserEmail(VerifyUserEmailRequest) returns (VerifyUserEmailResponse);
|
||||
|
||||
// 发送邮箱认证
|
||||
rpc sendUserEmailVerification(SendUserEmailVerificationRequest) returns (RPCSuccess);
|
||||
|
||||
// 查找用户正在等待激活的认证
|
||||
rpc findLatestUserEmailVerification(FindLatestUserEmailVerificationRequest) returns (FindLatestUserEmailVerificationResponse);
|
||||
}
|
||||
|
||||
// 认证邮箱
|
||||
message VerifyUserEmailRequest {
|
||||
string code = 1; // 激活码
|
||||
}
|
||||
|
||||
message VerifyUserEmailResponse {
|
||||
int64 userId = 1; // 邮箱对应的用户ID
|
||||
string email = 2; // 邮箱地址
|
||||
string errorCode = 3; // 错误代号,如果为空,说明没有错误
|
||||
string errorMessage = 4; // 错误信息
|
||||
}
|
||||
|
||||
// 发送邮箱认证
|
||||
message SendUserEmailVerificationRequest {
|
||||
string email = 1; // 待验证邮箱
|
||||
}
|
||||
|
||||
// 查找用户正在等待激活的认证
|
||||
message FindLatestUserEmailVerificationRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindLatestUserEmailVerificationResponse {
|
||||
UserEmailVerification userEmailVerification = 1;
|
||||
}
|
||||
@@ -2,23 +2,37 @@
|
||||
|
||||
package userconfigs
|
||||
|
||||
const (
|
||||
EmailVerificationDefaultLife = 86400 * 2 // 2 days
|
||||
)
|
||||
|
||||
type UserRegisterConfig struct {
|
||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用用户注册
|
||||
ComplexPassword bool `yaml:"complexPassword" json:"complexPassword"` // 必须使用复杂密码
|
||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用用户注册
|
||||
ComplexPassword bool `yaml:"complexPassword" json:"complexPassword"` // 必须使用复杂密码
|
||||
RequireVerification bool `yaml:"requireVerification" json:"requireVerification"` // 是否需要审核
|
||||
RequireIdentity bool `yaml:"requireIdentity" json:"requireIdentity"` // 是否需要实名认证
|
||||
|
||||
// 电子邮箱激活设置
|
||||
EmailVerification struct {
|
||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
|
||||
ShowNotice bool `yaml:"showNotice" json:"showNotice"` // 提示用户未绑定
|
||||
Subject string `yaml:"subject" json:"subject"` // 标题
|
||||
Body string `yaml:"body" json:"body"` // 内容
|
||||
CanLogin bool `yaml:"canLogin" json:"canLogin"` // 是否可以使用激活的邮箱登录
|
||||
Life int32 `yaml:"life" json:"life"` // 有效期
|
||||
} `yaml:"emailVerification" json:"emailVerification"`
|
||||
|
||||
// CDN
|
||||
CDNIsOn bool `json:"cdnIsOn"` // 是否开启CDN服务
|
||||
ClusterId int64 `yaml:"clusterId" json:"clusterId"` // 用户创建服务集群
|
||||
Features []string `yaml:"features" json:"features"` // 默认启用的功能
|
||||
RequireVerification bool `yaml:"requireVerification" json:"requireVerification"` // 是否需要审核
|
||||
RequireIdentity bool `yaml:"requireIdentity" json:"requireIdentity"` // 是否需要实名认证
|
||||
CDNIsOn bool `json:"cdnIsOn"` // 是否开启CDN服务
|
||||
ClusterId int64 `yaml:"clusterId" json:"clusterId"` // 用户创建服务集群
|
||||
Features []string `yaml:"features" json:"features"` // 默认启用的功能
|
||||
|
||||
// 开通DNS
|
||||
NSIsOn bool `json:"nsIsOn"` // 是否开启智能DNS服务
|
||||
}
|
||||
|
||||
func DefaultUserRegisterConfig() *UserRegisterConfig {
|
||||
return &UserRegisterConfig{
|
||||
var config = &UserRegisterConfig{
|
||||
IsOn: false,
|
||||
ComplexPassword: true,
|
||||
CDNIsOn: true,
|
||||
@@ -31,4 +45,19 @@ func DefaultUserRegisterConfig() *UserRegisterConfig {
|
||||
},
|
||||
RequireVerification: false,
|
||||
}
|
||||
|
||||
// 激活相关
|
||||
config.EmailVerification.CanLogin = true
|
||||
config.EmailVerification.ShowNotice = true
|
||||
config.EmailVerification.Subject = "【${product.name}】Email地址激活"
|
||||
config.EmailVerification.Body = `<p>欢迎你使用 ${product.name} 提供的服务,你需要点击以下链接激活你的Email邮箱:</p>
|
||||
<p><a href="${url.verify}" target="_blank">${url.verify}</a></p>
|
||||
<p>如果上面内容不是链接形式,请将该地址手工粘贴到浏览器地址栏再访问。</p>
|
||||
<p></p>
|
||||
<p>此致</p>
|
||||
<p>${product.name} 管理团队</p>
|
||||
<p><a href="${url.home}" target="_blank">${url.home}</a></p>
|
||||
`
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user