Compare commits

...

6 Commits
dev ... main

12 changed files with 588 additions and 185 deletions

2
go.sum
View File

@ -790,7 +790,7 @@ github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=
github.com/oleiade/reflections v1.0.0/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=
github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM=
github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

View File

@ -38,11 +38,25 @@ func (a Account) ToStorageType() storage.Account {
}
func (lc LocalAuth) ToStorageType() storage.LocalAuth {
emailValidation := storage.Validation{}
if lc.EmailValidation != nil {
emailValidation.Validated = lc.EmailValidation.Validated
emailValidation.ValidationCode = lc.EmailValidation.ValidationCode
}
phoneValidation := storage.Validation{}
if lc.PhoneNumberValidation != nil {
phoneValidation.Validated = lc.PhoneNumberValidation.Validated
phoneValidation.ValidationCode = lc.PhoneNumberValidation.ValidationCode
}
return storage.LocalAuth{
Username: lc.Username,
Password: lc.Password,
Email: lc.Email,
PhoneNumber: lc.PhoneNumber,
Username: lc.Username,
Password: lc.Password,
Email: lc.Email,
EmailValidation: emailValidation,
PhoneNumber: lc.PhoneNumber,
PhoneNumberValidation: phoneValidation,
}
}
@ -76,6 +90,14 @@ func LocalAuthFromStorageType(lc storage.LocalAuth) *LocalAuth {
Password: lc.Password,
Email: lc.Email,
PhoneNumber: lc.PhoneNumber,
EmailValidation: &Validation{
Validated: lc.EmailValidation.Validated,
ValidationCode: lc.EmailValidation.ValidationCode,
},
PhoneNumberValidation: &Validation{
Validated: lc.PhoneNumberValidation.Validated,
ValidationCode: lc.PhoneNumberValidation.ValidationCode,
},
}
}

View File

@ -144,10 +144,12 @@ type LocalAuth struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"`
Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password,omitempty"`
Email string `protobuf:"bytes,12,opt,name=email,proto3" json:"email,omitempty"`
PhoneNumber string `protobuf:"bytes,13,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"`
Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password,omitempty"`
Email string `protobuf:"bytes,12,opt,name=email,proto3" json:"email,omitempty"`
PhoneNumber string `protobuf:"bytes,13,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
EmailValidation *Validation `protobuf:"bytes,14,opt,name=email_validation,json=emailValidation,proto3" json:"email_validation,omitempty"`
PhoneNumberValidation *Validation `protobuf:"bytes,15,opt,name=phone_number_validation,json=phoneNumberValidation,proto3" json:"phone_number_validation,omitempty"`
}
func (x *LocalAuth) Reset() {
@ -210,6 +212,75 @@ func (x *LocalAuth) GetPhoneNumber() string {
return ""
}
func (x *LocalAuth) GetEmailValidation() *Validation {
if x != nil {
return x.EmailValidation
}
return nil
}
func (x *LocalAuth) GetPhoneNumberValidation() *Validation {
if x != nil {
return x.PhoneNumberValidation
}
return nil
}
type Validation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Validated bool `protobuf:"varint,20,opt,name=validated,proto3" json:"validated,omitempty"`
ValidationCode string `protobuf:"bytes,21,opt,name=validation_code,json=validationCode,proto3" json:"validation_code,omitempty"`
}
func (x *Validation) Reset() {
*x = Validation{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Validation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Validation) ProtoMessage() {}
func (x *Validation) ProtoReflect() protoreflect.Message {
mi := &file_accounts_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 Validation.ProtoReflect.Descriptor instead.
func (*Validation) Descriptor() ([]byte, []int) {
return file_accounts_proto_rawDescGZIP(), []int{3}
}
func (x *Validation) GetValidated() bool {
if x != nil {
return x.Validated
}
return false
}
func (x *Validation) GetValidationCode() string {
if x != nil {
return x.ValidationCode
}
return ""
}
var File_accounts_proto protoreflect.FileDescriptor
var file_accounts_proto_rawDesc = []byte{
@ -228,19 +299,32 @@ var file_accounts_proto_rawDesc = []byte{
0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x0b, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x05, 0x6c, 0x6f,
0x63, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x4c, 0x6f, 0x63, 0x61,
0x6c, 0x41, 0x75, 0x74, 0x68, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0x7c, 0x0a, 0x09,
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65,
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65,
0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70,
0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69,
0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70,
0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x69,
0x6c, 0x69, 0x74, 0x79, 0x2d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6c, 0x41, 0x75, 0x74, 0x68, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0xf9, 0x01, 0x0a,
0x09, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e,
0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x10, 0x65,
0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x17, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x15, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x39, 0x5a,
0x37, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63,
0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x6d,
0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -255,22 +339,25 @@ func file_accounts_proto_rawDescGZIP() []byte {
return file_accounts_proto_rawDescData
}
var file_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_accounts_proto_goTypes = []interface{}{
(*Account)(nil), // 0: Account
(*AccountAuth)(nil), // 1: AccountAuth
(*LocalAuth)(nil), // 2: LocalAuth
(*structpb.Struct)(nil), // 3: google.protobuf.Struct
(*Validation)(nil), // 3: Validation
(*structpb.Struct)(nil), // 4: google.protobuf.Struct
}
var file_accounts_proto_depIdxs = []int32{
1, // 0: Account.authentication:type_name -> AccountAuth
3, // 1: Account.data:type_name -> google.protobuf.Struct
4, // 1: Account.data:type_name -> google.protobuf.Struct
2, // 2: AccountAuth.local:type_name -> LocalAuth
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
3, // 3: LocalAuth.email_validation:type_name -> Validation
3, // 4: LocalAuth.phone_number_validation:type_name -> Validation
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_accounts_proto_init() }
@ -315,6 +402,18 @@ func file_accounts_proto_init() {
return nil
}
}
file_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Validation); 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{
@ -322,7 +421,7 @@ func file_accounts_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_accounts_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -20,4 +20,11 @@ message LocalAuth {
string password = 11;
string email = 12;
string phone_number = 13;
Validation email_validation = 14;
Validation phone_number_validation = 15;
}
message Validation {
bool validated = 20;
string validation_code = 21;
}

View File

@ -320,6 +320,124 @@ func (x *UpdateDataResponse) GetAccount() *Account {
return nil
}
type UpdatePhoneNumberRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,17,opt,name=id,proto3" json:"id,omitempty"`
PhoneNumber string `protobuf:"bytes,18,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
Verified bool `protobuf:"varint,19,opt,name=verified,proto3" json:"verified,omitempty"`
VerificationCode string `protobuf:"bytes,20,opt,name=verification_code,json=verificationCode,proto3" json:"verification_code,omitempty"`
}
func (x *UpdatePhoneNumberRequest) Reset() {
*x = UpdatePhoneNumberRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePhoneNumberRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePhoneNumberRequest) ProtoMessage() {}
func (x *UpdatePhoneNumberRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[6]
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 UpdatePhoneNumberRequest.ProtoReflect.Descriptor instead.
func (*UpdatePhoneNumberRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{6}
}
func (x *UpdatePhoneNumberRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *UpdatePhoneNumberRequest) GetPhoneNumber() string {
if x != nil {
return x.PhoneNumber
}
return ""
}
func (x *UpdatePhoneNumberRequest) GetVerified() bool {
if x != nil {
return x.Verified
}
return false
}
func (x *UpdatePhoneNumberRequest) GetVerificationCode() string {
if x != nil {
return x.VerificationCode
}
return ""
}
type UpdatePhoneNumberResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ok bool `protobuf:"varint,21,opt,name=ok,proto3" json:"ok,omitempty"`
}
func (x *UpdatePhoneNumberResponse) Reset() {
*x = UpdatePhoneNumberResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePhoneNumberResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePhoneNumberResponse) ProtoMessage() {}
func (x *UpdatePhoneNumberResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[7]
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 UpdatePhoneNumberResponse.ProtoReflect.Descriptor instead.
func (*UpdatePhoneNumberResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{7}
}
func (x *UpdatePhoneNumberResponse) GetOk() bool {
if x != nil {
return x.Ok
}
return false
}
type GetAccountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -331,7 +449,7 @@ type GetAccountRequest struct {
func (x *GetAccountRequest) Reset() {
*x = GetAccountRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[6]
mi := &file_comasvc_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -344,7 +462,7 @@ func (x *GetAccountRequest) String() string {
func (*GetAccountRequest) ProtoMessage() {}
func (x *GetAccountRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[6]
mi := &file_comasvc_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -357,7 +475,7 @@ func (x *GetAccountRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.
func (*GetAccountRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{6}
return file_comasvc_proto_rawDescGZIP(), []int{8}
}
func (x *GetAccountRequest) GetId() string {
@ -378,7 +496,7 @@ type GetAccountResponse struct {
func (x *GetAccountResponse) Reset() {
*x = GetAccountResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[7]
mi := &file_comasvc_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -391,7 +509,7 @@ func (x *GetAccountResponse) String() string {
func (*GetAccountResponse) ProtoMessage() {}
func (x *GetAccountResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[7]
mi := &file_comasvc_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -404,7 +522,7 @@ func (x *GetAccountResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead.
func (*GetAccountResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{7}
return file_comasvc_proto_rawDescGZIP(), []int{9}
}
func (x *GetAccountResponse) GetAccount() *Account {
@ -426,7 +544,7 @@ type GetAccountUsernameRequest struct {
func (x *GetAccountUsernameRequest) Reset() {
*x = GetAccountUsernameRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[8]
mi := &file_comasvc_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -439,7 +557,7 @@ func (x *GetAccountUsernameRequest) String() string {
func (*GetAccountUsernameRequest) ProtoMessage() {}
func (x *GetAccountUsernameRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[8]
mi := &file_comasvc_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -452,7 +570,7 @@ func (x *GetAccountUsernameRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountUsernameRequest.ProtoReflect.Descriptor instead.
func (*GetAccountUsernameRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{8}
return file_comasvc_proto_rawDescGZIP(), []int{10}
}
func (x *GetAccountUsernameRequest) GetUsername() string {
@ -480,7 +598,7 @@ type GetAccountUsernameResponse struct {
func (x *GetAccountUsernameResponse) Reset() {
*x = GetAccountUsernameResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[9]
mi := &file_comasvc_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -493,7 +611,7 @@ func (x *GetAccountUsernameResponse) String() string {
func (*GetAccountUsernameResponse) ProtoMessage() {}
func (x *GetAccountUsernameResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[9]
mi := &file_comasvc_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -506,7 +624,7 @@ func (x *GetAccountUsernameResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountUsernameResponse.ProtoReflect.Descriptor instead.
func (*GetAccountUsernameResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{9}
return file_comasvc_proto_rawDescGZIP(), []int{11}
}
func (x *GetAccountUsernameResponse) GetAccount() *Account {
@ -527,7 +645,7 @@ type GetAccountsRequest struct {
func (x *GetAccountsRequest) Reset() {
*x = GetAccountsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[10]
mi := &file_comasvc_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -540,7 +658,7 @@ func (x *GetAccountsRequest) String() string {
func (*GetAccountsRequest) ProtoMessage() {}
func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[10]
mi := &file_comasvc_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -553,7 +671,7 @@ func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsRequest.ProtoReflect.Descriptor instead.
func (*GetAccountsRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{10}
return file_comasvc_proto_rawDescGZIP(), []int{12}
}
func (x *GetAccountsRequest) GetNamespaces() []string {
@ -574,7 +692,7 @@ type GetAccountsResponse struct {
func (x *GetAccountsResponse) Reset() {
*x = GetAccountsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[11]
mi := &file_comasvc_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -587,7 +705,7 @@ func (x *GetAccountsResponse) String() string {
func (*GetAccountsResponse) ProtoMessage() {}
func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[11]
mi := &file_comasvc_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -600,7 +718,7 @@ func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead.
func (*GetAccountsResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{11}
return file_comasvc_proto_rawDescGZIP(), []int{13}
}
func (x *GetAccountsResponse) GetAccounts() []*Account {
@ -621,7 +739,7 @@ type GetAccountsBatchRequest struct {
func (x *GetAccountsBatchRequest) Reset() {
*x = GetAccountsBatchRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[12]
mi := &file_comasvc_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -634,7 +752,7 @@ func (x *GetAccountsBatchRequest) String() string {
func (*GetAccountsBatchRequest) ProtoMessage() {}
func (x *GetAccountsBatchRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[12]
mi := &file_comasvc_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -647,7 +765,7 @@ func (x *GetAccountsBatchRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsBatchRequest.ProtoReflect.Descriptor instead.
func (*GetAccountsBatchRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{12}
return file_comasvc_proto_rawDescGZIP(), []int{14}
}
func (x *GetAccountsBatchRequest) GetAccountids() []string {
@ -668,7 +786,7 @@ type GetAccountsBatchResponse struct {
func (x *GetAccountsBatchResponse) Reset() {
*x = GetAccountsBatchResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[13]
mi := &file_comasvc_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -681,7 +799,7 @@ func (x *GetAccountsBatchResponse) String() string {
func (*GetAccountsBatchResponse) ProtoMessage() {}
func (x *GetAccountsBatchResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[13]
mi := &file_comasvc_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -694,7 +812,7 @@ func (x *GetAccountsBatchResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsBatchResponse.ProtoReflect.Descriptor instead.
func (*GetAccountsBatchResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{13}
return file_comasvc_proto_rawDescGZIP(), []int{15}
}
func (x *GetAccountsBatchResponse) GetAccounts() []*Account {
@ -716,7 +834,7 @@ type ChangePasswordRequest struct {
func (x *ChangePasswordRequest) Reset() {
*x = ChangePasswordRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[14]
mi := &file_comasvc_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -729,7 +847,7 @@ func (x *ChangePasswordRequest) String() string {
func (*ChangePasswordRequest) ProtoMessage() {}
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[14]
mi := &file_comasvc_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -742,7 +860,7 @@ func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{14}
return file_comasvc_proto_rawDescGZIP(), []int{16}
}
func (x *ChangePasswordRequest) GetId() string {
@ -768,7 +886,7 @@ type ChangePasswordResponse struct {
func (x *ChangePasswordResponse) Reset() {
*x = ChangePasswordResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[15]
mi := &file_comasvc_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -781,7 +899,7 @@ func (x *ChangePasswordResponse) String() string {
func (*ChangePasswordResponse) ProtoMessage() {}
func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[15]
mi := &file_comasvc_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -794,7 +912,7 @@ func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead.
func (*ChangePasswordResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{15}
return file_comasvc_proto_rawDescGZIP(), []int{17}
}
var File_comasvc_proto protoreflect.FileDescriptor
@ -825,80 +943,97 @@ var file_comasvc_proto_rawDesc = []byte{
0x6e, 0x74, 0x22, 0x38, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x23, 0x0a, 0x11,
0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x22, 0x38, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x19, 0x47,
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x22, 0x40, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a,
0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f,
0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08,
0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20,
0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02,
0x6f, 0x6b, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x09, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a,
0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08,
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55,
0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x40, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65,
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0d,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x39, 0x0a,
0x17, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63,
0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22,
0x18, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcc, 0x04, 0x0a, 0x10, 0x4d, 0x6f,
0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x31,
0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67,
0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52,
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x37, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12,
0x12, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12,
0x19, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x4f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55,
0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65,
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x64, 0x73,
0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69,
0x64, 0x73, 0x22, 0x40, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24,
0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x32, 0xfe, 0x03, 0x0a, 0x10, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69,
0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a,
0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1b, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x13, 0x2e,
0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65,
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18,
0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63,
0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0d,
0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x43, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x12, 0x16, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x43, 0x68, 0x61, 0x6e,
0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70,
0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61,
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2d, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49,
0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74,
0x63, 0x68, 0x12, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x47,
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
0x69, 0x6e, 0x12, 0x0d, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73,
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x2e,
0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f,
0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x69,
0x74, 0x79, 0x2d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63,
0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -913,7 +1048,7 @@ func file_comasvc_proto_rawDescGZIP() []byte {
return file_comasvc_proto_rawDescData
}
var file_comasvc_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_comasvc_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_comasvc_proto_goTypes = []interface{}{
(*LoginRequest)(nil), // 0: LoginRequest
(*LoginResponse)(nil), // 1: LoginResponse
@ -921,46 +1056,50 @@ var file_comasvc_proto_goTypes = []interface{}{
(*RegisterResponse)(nil), // 3: RegisterResponse
(*UpdateDataRequest)(nil), // 4: UpdateDataRequest
(*UpdateDataResponse)(nil), // 5: UpdateDataResponse
(*GetAccountRequest)(nil), // 6: GetAccountRequest
(*GetAccountResponse)(nil), // 7: GetAccountResponse
(*GetAccountUsernameRequest)(nil), // 8: GetAccountUsernameRequest
(*GetAccountUsernameResponse)(nil), // 9: GetAccountUsernameResponse
(*GetAccountsRequest)(nil), // 10: GetAccountsRequest
(*GetAccountsResponse)(nil), // 11: GetAccountsResponse
(*GetAccountsBatchRequest)(nil), // 12: GetAccountsBatchRequest
(*GetAccountsBatchResponse)(nil), // 13: GetAccountsBatchResponse
(*ChangePasswordRequest)(nil), // 14: ChangePasswordRequest
(*ChangePasswordResponse)(nil), // 15: ChangePasswordResponse
(*Account)(nil), // 16: Account
(*UpdatePhoneNumberRequest)(nil), // 6: UpdatePhoneNumberRequest
(*UpdatePhoneNumberResponse)(nil), // 7: UpdatePhoneNumberResponse
(*GetAccountRequest)(nil), // 8: GetAccountRequest
(*GetAccountResponse)(nil), // 9: GetAccountResponse
(*GetAccountUsernameRequest)(nil), // 10: GetAccountUsernameRequest
(*GetAccountUsernameResponse)(nil), // 11: GetAccountUsernameResponse
(*GetAccountsRequest)(nil), // 12: GetAccountsRequest
(*GetAccountsResponse)(nil), // 13: GetAccountsResponse
(*GetAccountsBatchRequest)(nil), // 14: GetAccountsBatchRequest
(*GetAccountsBatchResponse)(nil), // 15: GetAccountsBatchResponse
(*ChangePasswordRequest)(nil), // 16: ChangePasswordRequest
(*ChangePasswordResponse)(nil), // 17: ChangePasswordResponse
(*Account)(nil), // 18: Account
}
var file_comasvc_proto_depIdxs = []int32{
16, // 0: LoginResponse.account:type_name -> Account
16, // 1: RegisterRequest.account:type_name -> Account
16, // 2: RegisterResponse.account:type_name -> Account
16, // 3: UpdateDataRequest.account:type_name -> Account
16, // 4: UpdateDataResponse.account:type_name -> Account
16, // 5: GetAccountResponse.account:type_name -> Account
16, // 6: GetAccountUsernameResponse.account:type_name -> Account
16, // 7: GetAccountsResponse.accounts:type_name -> Account
16, // 8: GetAccountsBatchResponse.accounts:type_name -> Account
18, // 0: LoginResponse.account:type_name -> Account
18, // 1: RegisterRequest.account:type_name -> Account
18, // 2: RegisterResponse.account:type_name -> Account
18, // 3: UpdateDataRequest.account:type_name -> Account
18, // 4: UpdateDataResponse.account:type_name -> Account
18, // 5: GetAccountResponse.account:type_name -> Account
18, // 6: GetAccountUsernameResponse.account:type_name -> Account
18, // 7: GetAccountsResponse.accounts:type_name -> Account
18, // 8: GetAccountsBatchResponse.accounts:type_name -> Account
2, // 9: MobilityAccounts.Register:input_type -> RegisterRequest
4, // 10: MobilityAccounts.UpdateData:input_type -> UpdateDataRequest
6, // 11: MobilityAccounts.GetAccount:input_type -> GetAccountRequest
8, // 12: MobilityAccounts.GetAccountUsername:input_type -> GetAccountUsernameRequest
10, // 13: MobilityAccounts.GetAccounts:input_type -> GetAccountsRequest
12, // 14: MobilityAccounts.GetAccountsBatch:input_type -> GetAccountsBatchRequest
0, // 15: MobilityAccounts.Login:input_type -> LoginRequest
14, // 16: MobilityAccounts.ChangePassword:input_type -> ChangePasswordRequest
3, // 17: MobilityAccounts.Register:output_type -> RegisterResponse
5, // 18: MobilityAccounts.UpdateData:output_type -> UpdateDataResponse
7, // 19: MobilityAccounts.GetAccount:output_type -> GetAccountResponse
9, // 20: MobilityAccounts.GetAccountUsername:output_type -> GetAccountUsernameResponse
11, // 21: MobilityAccounts.GetAccounts:output_type -> GetAccountsResponse
13, // 22: MobilityAccounts.GetAccountsBatch:output_type -> GetAccountsBatchResponse
1, // 23: MobilityAccounts.Login:output_type -> LoginResponse
15, // 24: MobilityAccounts.ChangePassword:output_type -> ChangePasswordResponse
17, // [17:25] is the sub-list for method output_type
9, // [9:17] is the sub-list for method input_type
6, // 11: MobilityAccounts.UpdatePhoneNumber:input_type -> UpdatePhoneNumberRequest
8, // 12: MobilityAccounts.GetAccount:input_type -> GetAccountRequest
10, // 13: MobilityAccounts.GetAccountUsername:input_type -> GetAccountUsernameRequest
12, // 14: MobilityAccounts.GetAccounts:input_type -> GetAccountsRequest
14, // 15: MobilityAccounts.GetAccountsBatch:input_type -> GetAccountsBatchRequest
0, // 16: MobilityAccounts.Login:input_type -> LoginRequest
16, // 17: MobilityAccounts.ChangePassword:input_type -> ChangePasswordRequest
3, // 18: MobilityAccounts.Register:output_type -> RegisterResponse
5, // 19: MobilityAccounts.UpdateData:output_type -> UpdateDataResponse
7, // 20: MobilityAccounts.UpdatePhoneNumber:output_type -> UpdatePhoneNumberResponse
9, // 21: MobilityAccounts.GetAccount:output_type -> GetAccountResponse
11, // 22: MobilityAccounts.GetAccountUsername:output_type -> GetAccountUsernameResponse
13, // 23: MobilityAccounts.GetAccounts:output_type -> GetAccountsResponse
15, // 24: MobilityAccounts.GetAccountsBatch:output_type -> GetAccountsBatchResponse
1, // 25: MobilityAccounts.Login:output_type -> LoginResponse
17, // 26: MobilityAccounts.ChangePassword:output_type -> ChangePasswordResponse
18, // [18:27] is the sub-list for method output_type
9, // [9:18] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
@ -1046,7 +1185,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountRequest); i {
switch v := v.(*UpdatePhoneNumberRequest); i {
case 0:
return &v.state
case 1:
@ -1058,7 +1197,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountResponse); i {
switch v := v.(*UpdatePhoneNumberResponse); i {
case 0:
return &v.state
case 1:
@ -1070,7 +1209,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountUsernameRequest); i {
switch v := v.(*GetAccountRequest); i {
case 0:
return &v.state
case 1:
@ -1082,7 +1221,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountUsernameResponse); i {
switch v := v.(*GetAccountResponse); i {
case 0:
return &v.state
case 1:
@ -1094,7 +1233,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsRequest); i {
switch v := v.(*GetAccountUsernameRequest); i {
case 0:
return &v.state
case 1:
@ -1106,7 +1245,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsResponse); i {
switch v := v.(*GetAccountUsernameResponse); i {
case 0:
return &v.state
case 1:
@ -1118,7 +1257,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsBatchRequest); i {
switch v := v.(*GetAccountsRequest); i {
case 0:
return &v.state
case 1:
@ -1130,7 +1269,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsBatchResponse); i {
switch v := v.(*GetAccountsResponse); i {
case 0:
return &v.state
case 1:
@ -1142,7 +1281,7 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordRequest); i {
switch v := v.(*GetAccountsBatchRequest); i {
case 0:
return &v.state
case 1:
@ -1154,6 +1293,30 @@ func file_comasvc_proto_init() {
}
}
file_comasvc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsBatchResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_comasvc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_comasvc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordResponse); i {
case 0:
return &v.state
@ -1172,7 +1335,7 @@ func file_comasvc_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_comasvc_proto_rawDesc,
NumEnums: 0,
NumMessages: 16,
NumMessages: 18,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -9,6 +9,7 @@ import "accounts.proto";
service MobilityAccounts {
rpc Register(RegisterRequest) returns (RegisterResponse) {}
rpc UpdateData(UpdateDataRequest) returns (UpdateDataResponse) {}
rpc UpdatePhoneNumber(UpdatePhoneNumberRequest) returns (UpdatePhoneNumberResponse) {}
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {}
rpc GetAccountUsername(GetAccountUsernameRequest) returns (GetAccountUsernameResponse) {}
rpc GetAccounts(GetAccountsRequest) returns (GetAccountsResponse) {}
@ -45,6 +46,17 @@ message UpdateDataResponse {
Account account = 8;
}
message UpdatePhoneNumberRequest {
string id = 17;
string phone_number = 18;
bool verified = 19;
string verification_code = 20;
}
message UpdatePhoneNumberResponse {
bool ok = 21;
}
message GetAccountRequest {
string id = 9;
}

View File

@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7
type MobilityAccountsClient interface {
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
UpdateData(ctx context.Context, in *UpdateDataRequest, opts ...grpc.CallOption) (*UpdateDataResponse, error)
UpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest, opts ...grpc.CallOption) (*UpdatePhoneNumberResponse, error)
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
GetAccountUsername(ctx context.Context, in *GetAccountUsernameRequest, opts ...grpc.CallOption) (*GetAccountUsernameResponse, error)
GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error)
@ -59,6 +60,15 @@ func (c *mobilityAccountsClient) UpdateData(ctx context.Context, in *UpdateDataR
return out, nil
}
func (c *mobilityAccountsClient) UpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest, opts ...grpc.CallOption) (*UpdatePhoneNumberResponse, error) {
out := new(UpdatePhoneNumberResponse)
err := c.cc.Invoke(ctx, "/MobilityAccounts/UpdatePhoneNumber", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mobilityAccountsClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
out := new(GetAccountResponse)
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccount", in, out, opts...)
@ -119,6 +129,7 @@ func (c *mobilityAccountsClient) ChangePassword(ctx context.Context, in *ChangeP
type MobilityAccountsServer interface {
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error)
UpdatePhoneNumber(context.Context, *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error)
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
GetAccountUsername(context.Context, *GetAccountUsernameRequest) (*GetAccountUsernameResponse, error)
GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
@ -139,6 +150,9 @@ func (UnimplementedMobilityAccountsServer) Register(context.Context, *RegisterRe
func (UnimplementedMobilityAccountsServer) UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateData not implemented")
}
func (UnimplementedMobilityAccountsServer) UpdatePhoneNumber(context.Context, *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePhoneNumber not implemented")
}
func (UnimplementedMobilityAccountsServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
}
@ -206,6 +220,24 @@ func _MobilityAccounts_UpdateData_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _MobilityAccounts_UpdatePhoneNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdatePhoneNumberRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MobilityAccountsServer).UpdatePhoneNumber(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/MobilityAccounts/UpdatePhoneNumber",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MobilityAccountsServer).UpdatePhoneNumber(ctx, req.(*UpdatePhoneNumberRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MobilityAccounts_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountRequest)
if err := dec(in); err != nil {
@ -329,6 +361,10 @@ var MobilityAccounts_ServiceDesc = grpc.ServiceDesc{
MethodName: "UpdateData",
Handler: _MobilityAccounts_UpdateData_Handler,
},
{
MethodName: "UpdatePhoneNumber",
Handler: _MobilityAccounts_UpdatePhoneNumber_Handler,
},
{
MethodName: "GetAccount",
Handler: _MobilityAccounts_GetAccount_Handler,

View File

@ -63,6 +63,18 @@ func (s MobilityAccountsServerImpl) UpdateData(ctx context.Context, req *UpdateD
}
return &UpdateDataResponse{Account: response}, nil
}
func (s MobilityAccountsServerImpl) UpdatePhoneNumber(ctx context.Context, req *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) {
err := s.handler.UpdatePhoneNumber(
req.Id,
req.PhoneNumber,
req.Verified,
req.VerificationCode,
)
if err != nil {
return nil, status.Errorf(codes.Internal, "issue while updating phone number : %v", err)
}
return &UpdatePhoneNumberResponse{Ok: true}, nil
}
func (s MobilityAccountsServerImpl) GetAccount(ctx context.Context, req *GetAccountRequest) (*GetAccountResponse, error) {
account, err := s.handler.GetAccount(req.Id)
if err != nil {

View File

@ -3,6 +3,7 @@ package handlers
import (
"errors"
"fmt"
"strings"
"time"
"git.coopgo.io/coopgo-platform/mobility-accounts/storage"
@ -16,7 +17,7 @@ func (h MobilityAccountsHandler) Login(username string, password string, namespa
if password == "" {
return nil, errors.New("empty password not allowed")
}
account, err := h.storage.DB.LocalAuthentication(namespace, username, "", "")
account, err := h.storage.DB.LocalAuthentication(namespace, strings.ToLower(username), "", "")
if err != nil {
return nil, err
}
@ -32,6 +33,15 @@ func (h MobilityAccountsHandler) Register(account storage.Account) (*storage.Acc
return nil, errors.New("id should be empty")
}
account.Authentication.Local.Username = strings.ToLower(account.Authentication.Local.Username)
account.Authentication.Local.Email = strings.ToLower(account.Authentication.Local.Email)
_, err := h.storage.DB.LocalAuthentication(account.Namespace, account.Authentication.Local.Username, account.Authentication.Local.Email, account.Authentication.Local.PhoneNumber)
if err == nil {
return nil, errors.New("user already exists")
}
// Generate new UUID
account.ID = uuid.NewString()
@ -115,6 +125,30 @@ func (h MobilityAccountsHandler) UpdateData(accountid string, datas map[string]a
return account, nil
}
func (h MobilityAccountsHandler) UpdatePhoneNumber(accountid, phone_number string, verified bool, verification_code string) error {
account, err := h.storage.DB.GetAccount(accountid)
if err != nil {
return err
}
account2, err := h.storage.DB.LocalAuthentication(account.Namespace, "", "", phone_number)
if err == nil && account.ID != account2.ID {
return errors.New("user with this phone number already exists")
}
account.Authentication.Local.PhoneNumber = phone_number
account.Authentication.Local.PhoneNumberValidation.Validated = verified
account.Authentication.Local.PhoneNumberValidation.ValidationCode = verification_code
if err = h.storage.DB.UpdateAccount(*account); err != nil {
fmt.Println(err)
return err
}
return nil
}
func (h MobilityAccountsHandler) GetAccount(id string) (account *storage.Account, err error) {
account, err = h.storage.DB.GetAccount(id)
return

View File

@ -19,6 +19,7 @@ func main() {
service_name = cfg.GetString("name")
grpc_enable = cfg.GetBool("services.grpc.enable")
oidc_provider_enable = cfg.GetBool("services.oidc_provider.enable")
dev_env = cfg.GetBool("dev_env")
)
storage, err := storage.NewStorage(cfg)
@ -29,6 +30,9 @@ func main() {
handler := handlers.NewHandler(cfg, storage)
fmt.Println("Running", service_name, ":")
if dev_env {
fmt.Printf("\033]0;%s\007", service_name)
}
failed := make(chan error)

View File

@ -57,7 +57,7 @@
</div>
</div>
<p class="p-4 text-center text-sm text-co-blue"><a href="http://localhost:9000/auth/lost-password">Mot de passe oublié</a></p>
<p class="p-4 text-center text-sm text-co-blue"><a href="https://spie06.parcoursmob.fr/auth/lost-password">Mot de passe oublié</a></p>

View File

@ -19,13 +19,18 @@ type MongoDBStorage struct {
func NewMongoDBStorage(cfg *viper.Viper) (MongoDBStorage, error) {
var (
mongodb_uri = cfg.GetString("storage.db.mongodb.uri")
mongodb_host = cfg.GetString("storage.db.mongodb.host")
mongodb_port = cfg.GetString("storage.db.mongodb.port")
mongodb_dbname = cfg.GetString("storage.db.mongodb.db_name")
mongodb_users = cfg.GetString("storage.db.mongodb.collections.users")
)
client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://" + mongodb_host + ":" + mongodb_port))
if mongodb_uri == "" {
mongodb_uri = fmt.Sprintf("mongodb://%s:%s", mongodb_host, mongodb_port)
}
client, err := mongo.NewClient(options.Client().ApplyURI(mongodb_uri))
if err != nil {
return MongoDBStorage{}, err
}
@ -43,7 +48,16 @@ func NewMongoDBStorage(cfg *viper.Viper) (MongoDBStorage, error) {
"users": mongodb_users,
},
}
//TODO Indexes
// usernameIndex := mongo.IndexModel{
// Keys: bson.D{
// {"namespace", 1},
// {"authentication.local.username", 1},
// },
// Options: options.Index().SetUnique(true),
// }
// storage.Client.Database(mongodb_dbname).Collection(mongodb_users).Indexes().CreateOne(context.TODO(), usernameIndex)
return storage, err
}