feat: aliyun sms
This commit is contained in:
+93
-36
@@ -82,15 +82,14 @@ func (x *Response) GetData() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// 统一登录:grant_type = openid | password | sms
|
||||
type LoginReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ClientCode string `protobuf:"bytes,1,opt,name=client_code,json=clientCode,proto3" json:"client_code,omitempty"` // 端编码,如 user_skin / user_o2 / sale_beauty
|
||||
GrantType string `protobuf:"bytes,2,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"` // openid | password | sms
|
||||
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // grant_type=openid 时传微信 login code
|
||||
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"` // grant_type=password|sms
|
||||
Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` // grant_type=password
|
||||
SmsCode string `protobuf:"bytes,6,opt,name=sms_code,json=smsCode,proto3" json:"sms_code,omitempty"` // grant_type=sms
|
||||
ClientCode string `protobuf:"bytes,1,opt,name=client_code,json=clientCode,proto3" json:"client_code,omitempty"`
|
||||
GrantType string `protobuf:"bytes,2,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"`
|
||||
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
||||
Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
|
||||
SmsCode string `protobuf:"bytes,6,opt,name=sms_code,json=smsCode,proto3" json:"sms_code,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -167,7 +166,6 @@ func (x *LoginReq) GetSmsCode() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// 管理端用户列表
|
||||
type UserItemsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
||||
@@ -228,7 +226,6 @@ func (x *UserItemsReq) GetSize() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// 管理端修改用户状态
|
||||
type UserStatusReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
@@ -837,6 +834,58 @@ func (x *RevokeBizClientData) GetRevoked() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type SendSmsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
||||
Scene int32 `protobuf:"varint,2,opt,name=scene,proto3" json:"scene,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendSmsReq) Reset() {
|
||||
*x = SendSmsReq{}
|
||||
mi := &file_user_user_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendSmsReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendSmsReq) ProtoMessage() {}
|
||||
|
||||
func (x *SendSmsReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[13]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendSmsReq.ProtoReflect.Descriptor instead.
|
||||
func (*SendSmsReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *SendSmsReq) GetMobile() string {
|
||||
if x != nil {
|
||||
return x.Mobile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendSmsReq) GetScene() int32 {
|
||||
if x != nil {
|
||||
return x.Scene
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type InfoReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -845,7 +894,7 @@ type InfoReq struct {
|
||||
|
||||
func (x *InfoReq) Reset() {
|
||||
*x = InfoReq{}
|
||||
mi := &file_user_user_proto_msgTypes[13]
|
||||
mi := &file_user_user_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -857,7 +906,7 @@ func (x *InfoReq) String() string {
|
||||
func (*InfoReq) ProtoMessage() {}
|
||||
|
||||
func (x *InfoReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[13]
|
||||
mi := &file_user_user_proto_msgTypes[14]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -870,7 +919,7 @@ func (x *InfoReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use InfoReq.ProtoReflect.Descriptor instead.
|
||||
func (*InfoReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{13}
|
||||
return file_user_user_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
var File_user_user_proto protoreflect.FileDescriptor
|
||||
@@ -939,9 +988,14 @@ const file_user_user_proto_rawDesc = "" +
|
||||
"\vclient_code\x18\x02 \x01(\tR\n" +
|
||||
"clientCode\"/\n" +
|
||||
"\x13RevokeBizClientData\x12\x18\n" +
|
||||
"\arevoked\x18\x01 \x01(\bR\arevoked\"\t\n" +
|
||||
"\aInfoReq2\xc3\x04\n" +
|
||||
"\x04User\x12A\n" +
|
||||
"\arevoked\x18\x01 \x01(\bR\arevoked\":\n" +
|
||||
"\n" +
|
||||
"SendSmsReq\x12\x16\n" +
|
||||
"\x06mobile\x18\x01 \x01(\tR\x06mobile\x12\x14\n" +
|
||||
"\x05scene\x18\x02 \x01(\x05R\x05scene\"\t\n" +
|
||||
"\aInfoReq2\x8d\x05\n" +
|
||||
"\x04User\x12H\n" +
|
||||
"\aSendSms\x12\x10.user.SendSmsReq\x1a\x0e.user.Response\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/api/v3/sms/send\x12A\n" +
|
||||
"\x05Login\x12\x0e.user.LoginReq\x1a\x0e.user.Response\"\x18\x82\xd3\xe4\x93\x02\x12:\x01*\"\r/api/v3/login\x12C\n" +
|
||||
"\x04Info\x12\r.user.InfoReq\x1a\x0e.user.Response\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\x12\x11/api/v3/user/info\x12P\n" +
|
||||
"\tUserItems\x12\x12.user.UserItemsReq\x1a\x0e.user.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/user/items\x12S\n" +
|
||||
@@ -965,7 +1019,7 @@ func file_user_user_proto_rawDescGZIP() []byte {
|
||||
return file_user_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_user_user_proto_goTypes = []any{
|
||||
(*Response)(nil), // 0: user.Response
|
||||
(*LoginReq)(nil), // 1: user.LoginReq
|
||||
@@ -980,28 +1034,31 @@ var file_user_user_proto_goTypes = []any{
|
||||
(*UpdateMobileData)(nil), // 10: user.UpdateMobileData
|
||||
(*RevokeBizClientReq)(nil), // 11: user.RevokeBizClientReq
|
||||
(*RevokeBizClientData)(nil), // 12: user.RevokeBizClientData
|
||||
(*InfoReq)(nil), // 13: user.InfoReq
|
||||
(*SendSmsReq)(nil), // 13: user.SendSmsReq
|
||||
(*InfoReq)(nil), // 14: user.InfoReq
|
||||
}
|
||||
var file_user_user_proto_depIdxs = []int32{
|
||||
7, // 0: user.UsersByIdsData.items:type_name -> user.UserBriefItem
|
||||
1, // 1: user.User.Login:input_type -> user.LoginReq
|
||||
13, // 2: user.User.Info:input_type -> user.InfoReq
|
||||
2, // 3: user.User.UserItems:input_type -> user.UserItemsReq
|
||||
3, // 4: user.User.UserStatus:input_type -> user.UserStatusReq
|
||||
4, // 5: user.User.EnsureBizIdentity:input_type -> user.EnsureBizIdentityReq
|
||||
6, // 6: user.User.UsersByIds:input_type -> user.UsersByIdsReq
|
||||
9, // 7: user.User.UpdateMobile:input_type -> user.UpdateMobileReq
|
||||
11, // 8: user.User.RevokeBizClient:input_type -> user.RevokeBizClientReq
|
||||
0, // 9: user.User.Login:output_type -> user.Response
|
||||
0, // 10: user.User.Info:output_type -> user.Response
|
||||
0, // 11: user.User.UserItems:output_type -> user.Response
|
||||
0, // 12: user.User.UserStatus:output_type -> user.Response
|
||||
5, // 13: user.User.EnsureBizIdentity:output_type -> user.EnsureBizIdentityData
|
||||
8, // 14: user.User.UsersByIds:output_type -> user.UsersByIdsData
|
||||
10, // 15: user.User.UpdateMobile:output_type -> user.UpdateMobileData
|
||||
12, // 16: user.User.RevokeBizClient:output_type -> user.RevokeBizClientData
|
||||
9, // [9:17] is the sub-list for method output_type
|
||||
1, // [1:9] is the sub-list for method input_type
|
||||
13, // 1: user.User.SendSms:input_type -> user.SendSmsReq
|
||||
1, // 2: user.User.Login:input_type -> user.LoginReq
|
||||
14, // 3: user.User.Info:input_type -> user.InfoReq
|
||||
2, // 4: user.User.UserItems:input_type -> user.UserItemsReq
|
||||
3, // 5: user.User.UserStatus:input_type -> user.UserStatusReq
|
||||
4, // 6: user.User.EnsureBizIdentity:input_type -> user.EnsureBizIdentityReq
|
||||
6, // 7: user.User.UsersByIds:input_type -> user.UsersByIdsReq
|
||||
9, // 8: user.User.UpdateMobile:input_type -> user.UpdateMobileReq
|
||||
11, // 9: user.User.RevokeBizClient:input_type -> user.RevokeBizClientReq
|
||||
0, // 10: user.User.SendSms:output_type -> user.Response
|
||||
0, // 11: user.User.Login:output_type -> user.Response
|
||||
0, // 12: user.User.Info:output_type -> user.Response
|
||||
0, // 13: user.User.UserItems:output_type -> user.Response
|
||||
0, // 14: user.User.UserStatus:output_type -> user.Response
|
||||
5, // 15: user.User.EnsureBizIdentity:output_type -> user.EnsureBizIdentityData
|
||||
8, // 16: user.User.UsersByIds:output_type -> user.UsersByIdsData
|
||||
10, // 17: user.User.UpdateMobile:output_type -> user.UpdateMobileData
|
||||
12, // 18: user.User.RevokeBizClient:output_type -> user.RevokeBizClientData
|
||||
10, // [10:19] is the sub-list for method output_type
|
||||
1, // [1:10] 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
|
||||
@@ -1018,7 +1075,7 @@ func file_user_user_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_user_proto_rawDesc), len(file_user_user_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 14,
|
||||
NumMessages: 15,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user