Compare commits
4 Commits
dev
...
a362fd6ec5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a362fd6ec5 | ||
| de94bd583f | |||
| 3a80acae37 | |||
| 045bcb7bf6 |
@@ -39,6 +39,18 @@ 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,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.19.6
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc v6.31.1
|
||||
// source: accounts.proto
|
||||
|
||||
package grpcapi
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
structpb "google.golang.org/protobuf/types/known/structpb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -22,23 +23,20 @@ const (
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Authentication *AccountAuth `protobuf:"bytes,3,opt,name=authentication,proto3" json:"authentication,omitempty"`
|
||||
Data *structpb.Struct `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Account) Reset() {
|
||||
*x = Account{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Account) String() string {
|
||||
@@ -49,7 +47,7 @@ func (*Account) ProtoMessage() {}
|
||||
|
||||
func (x *Account) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -93,20 +91,17 @@ func (x *Account) GetData() *structpb.Struct {
|
||||
}
|
||||
|
||||
type AccountAuth struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Local *LocalAuth `protobuf:"bytes,7,opt,name=local,proto3,oneof" json:"local,omitempty"` //TODO SSO
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccountAuth) Reset() {
|
||||
*x = AccountAuth{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AccountAuth) String() string {
|
||||
@@ -117,7 +112,7 @@ func (*AccountAuth) ProtoMessage() {}
|
||||
|
||||
func (x *AccountAuth) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -140,25 +135,22 @@ func (x *AccountAuth) GetLocal() *LocalAuth {
|
||||
}
|
||||
|
||||
type LocalAuth struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Username *string `protobuf:"bytes,10,opt,name=username,proto3,oneof" json:"username,omitempty"`
|
||||
Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password,omitempty"`
|
||||
Email *string `protobuf:"bytes,12,opt,name=email,proto3,oneof" json:"email,omitempty"`
|
||||
PhoneNumber *string `protobuf:"bytes,13,opt,name=phone_number,json=phoneNumber,proto3,oneof" json:"phone_number,omitempty"`
|
||||
EmailValidation *Validation `protobuf:"bytes,14,opt,name=email_validation,json=emailValidation,proto3,oneof" json:"email_validation,omitempty"`
|
||||
PhoneNumberValidation *Validation `protobuf:"bytes,15,opt,name=phone_number_validation,json=phoneNumberValidation,proto3,oneof" json:"phone_number_validation,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *LocalAuth) Reset() {
|
||||
*x = LocalAuth{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LocalAuth) String() string {
|
||||
@@ -169,7 +161,7 @@ func (*LocalAuth) ProtoMessage() {}
|
||||
|
||||
func (x *LocalAuth) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -227,21 +219,18 @@ func (x *LocalAuth) GetPhoneNumberValidation() *Validation {
|
||||
}
|
||||
|
||||
type Validation struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
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 {
|
||||
@@ -252,7 +241,7 @@ func (*Validation) ProtoMessage() {}
|
||||
|
||||
func (x *Validation) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -283,73 +272,50 @@ func (x *Validation) GetValidationCode() string {
|
||||
|
||||
var File_accounts_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_accounts_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a,
|
||||
0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0c, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x0e,
|
||||
0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, 0x0a, 0x0b, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x12, 0x25, 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, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x88, 0x01,
|
||||
0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0xeb, 0x02, 0x0a, 0x09,
|
||||
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x08, 0x75, 0x73, 0x65,
|
||||
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x75,
|
||||
0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 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, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
|
||||
0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01,
|
||||
0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65,
|
||||
0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65,
|
||||
0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3b, 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,
|
||||
0x48, 0x03, 0x52, 0x0f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x48, 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, 0x48, 0x04, 0x52, 0x15, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d,
|
||||
0x62, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01,
|
||||
0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a,
|
||||
0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x68, 0x6f, 0x6e,
|
||||
0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x0a,
|
||||
0x18, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76,
|
||||
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,
|
||||
}
|
||||
const file_accounts_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0eaccounts.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x9a\x01\n" +
|
||||
"\aAccount\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" +
|
||||
"\tnamespace\x18\x02 \x01(\tR\tnamespace\x124\n" +
|
||||
"\x0eauthentication\x18\x03 \x01(\v2\f.AccountAuthR\x0eauthentication\x12+\n" +
|
||||
"\x04data\x18\x04 \x01(\v2\x17.google.protobuf.StructR\x04data\">\n" +
|
||||
"\vAccountAuth\x12%\n" +
|
||||
"\x05local\x18\a \x01(\v2\n" +
|
||||
".LocalAuthH\x00R\x05local\x88\x01\x01B\b\n" +
|
||||
"\x06_local\"\xeb\x02\n" +
|
||||
"\tLocalAuth\x12\x1f\n" +
|
||||
"\busername\x18\n" +
|
||||
" \x01(\tH\x00R\busername\x88\x01\x01\x12\x1a\n" +
|
||||
"\bpassword\x18\v \x01(\tR\bpassword\x12\x19\n" +
|
||||
"\x05email\x18\f \x01(\tH\x01R\x05email\x88\x01\x01\x12&\n" +
|
||||
"\fphone_number\x18\r \x01(\tH\x02R\vphoneNumber\x88\x01\x01\x12;\n" +
|
||||
"\x10email_validation\x18\x0e \x01(\v2\v.ValidationH\x03R\x0femailValidation\x88\x01\x01\x12H\n" +
|
||||
"\x17phone_number_validation\x18\x0f \x01(\v2\v.ValidationH\x04R\x15phoneNumberValidation\x88\x01\x01B\v\n" +
|
||||
"\t_usernameB\b\n" +
|
||||
"\x06_emailB\x0f\n" +
|
||||
"\r_phone_numberB\x13\n" +
|
||||
"\x11_email_validationB\x1a\n" +
|
||||
"\x18_phone_number_validation\"S\n" +
|
||||
"\n" +
|
||||
"Validation\x12\x1c\n" +
|
||||
"\tvalidated\x18\x14 \x01(\bR\tvalidated\x12'\n" +
|
||||
"\x0fvalidation_code\x18\x15 \x01(\tR\x0evalidationCodeB9Z7git.coopgo.io/coopgo-platform/mobility-accounts/grpcapib\x06proto3"
|
||||
|
||||
var (
|
||||
file_accounts_proto_rawDescOnce sync.Once
|
||||
file_accounts_proto_rawDescData = file_accounts_proto_rawDesc
|
||||
file_accounts_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_accounts_proto_rawDescGZIP() []byte {
|
||||
file_accounts_proto_rawDescOnce.Do(func() {
|
||||
file_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_accounts_proto_rawDescData)
|
||||
file_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_accounts_proto_rawDesc), len(file_accounts_proto_rawDesc)))
|
||||
})
|
||||
return file_accounts_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_accounts_proto_goTypes = []interface{}{
|
||||
var file_accounts_proto_goTypes = []any{
|
||||
(*Account)(nil), // 0: Account
|
||||
(*AccountAuth)(nil), // 1: AccountAuth
|
||||
(*LocalAuth)(nil), // 2: LocalAuth
|
||||
@@ -374,63 +340,13 @@ func file_accounts_proto_init() {
|
||||
if File_accounts_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Account); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AccountAuth); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LocalAuth); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
file_accounts_proto_msgTypes[1].OneofWrappers = []interface{}{}
|
||||
file_accounts_proto_msgTypes[2].OneofWrappers = []interface{}{}
|
||||
file_accounts_proto_msgTypes[1].OneofWrappers = []any{}
|
||||
file_accounts_proto_msgTypes[2].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_accounts_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_accounts_proto_rawDesc), len(file_accounts_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
@@ -441,7 +357,6 @@ func file_accounts_proto_init() {
|
||||
MessageInfos: file_accounts_proto_msgTypes,
|
||||
}.Build()
|
||||
File_accounts_proto = out.File
|
||||
file_accounts_proto_rawDesc = nil
|
||||
file_accounts_proto_goTypes = nil
|
||||
file_accounts_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,9 @@
|
||||
//COMA (COOPGO Mobility Accounts) gRPC service definition
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.19.6
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v6.31.1
|
||||
// source: comasvc.proto
|
||||
|
||||
package grpcapi
|
||||
@@ -15,8 +17,20 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
MobilityAccounts_Register_FullMethodName = "/MobilityAccounts/Register"
|
||||
MobilityAccounts_UpdateData_FullMethodName = "/MobilityAccounts/UpdateData"
|
||||
MobilityAccounts_UpdatePhoneNumber_FullMethodName = "/MobilityAccounts/UpdatePhoneNumber"
|
||||
MobilityAccounts_GetAccount_FullMethodName = "/MobilityAccounts/GetAccount"
|
||||
MobilityAccounts_GetAccountUsername_FullMethodName = "/MobilityAccounts/GetAccountUsername"
|
||||
MobilityAccounts_GetAccounts_FullMethodName = "/MobilityAccounts/GetAccounts"
|
||||
MobilityAccounts_GetAccountsBatch_FullMethodName = "/MobilityAccounts/GetAccountsBatch"
|
||||
MobilityAccounts_Login_FullMethodName = "/MobilityAccounts/Login"
|
||||
MobilityAccounts_ChangePassword_FullMethodName = "/MobilityAccounts/ChangePassword"
|
||||
)
|
||||
|
||||
// MobilityAccountsClient is the client API for MobilityAccounts service.
|
||||
//
|
||||
@@ -43,8 +57,9 @@ func NewMobilityAccountsClient(cc grpc.ClientConnInterface) MobilityAccountsClie
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RegisterResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/Register", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_Register_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -52,8 +67,9 @@ func (c *mobilityAccountsClient) Register(ctx context.Context, in *RegisterReque
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) UpdateData(ctx context.Context, in *UpdateDataRequest, opts ...grpc.CallOption) (*UpdateDataResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateDataResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/UpdateData", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_UpdateData_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -61,8 +77,9 @@ func (c *mobilityAccountsClient) UpdateData(ctx context.Context, in *UpdateDataR
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) UpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest, opts ...grpc.CallOption) (*UpdatePhoneNumberResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdatePhoneNumberResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/UpdatePhoneNumber", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_UpdatePhoneNumber_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -70,8 +87,9 @@ func (c *mobilityAccountsClient) UpdatePhoneNumber(ctx context.Context, in *Upda
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetAccountResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccount", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_GetAccount_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -79,8 +97,9 @@ func (c *mobilityAccountsClient) GetAccount(ctx context.Context, in *GetAccountR
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) GetAccountUsername(ctx context.Context, in *GetAccountUsernameRequest, opts ...grpc.CallOption) (*GetAccountUsernameResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetAccountUsernameResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccountUsername", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_GetAccountUsername_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -88,8 +107,9 @@ func (c *mobilityAccountsClient) GetAccountUsername(ctx context.Context, in *Get
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetAccountsResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccounts", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_GetAccounts_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -97,8 +117,9 @@ func (c *mobilityAccountsClient) GetAccounts(ctx context.Context, in *GetAccount
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) GetAccountsBatch(ctx context.Context, in *GetAccountsBatchRequest, opts ...grpc.CallOption) (*GetAccountsBatchResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetAccountsBatchResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccountsBatch", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_GetAccountsBatch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -106,8 +127,9 @@ func (c *mobilityAccountsClient) GetAccountsBatch(ctx context.Context, in *GetAc
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LoginResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/Login", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_Login_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -115,8 +137,9 @@ func (c *mobilityAccountsClient) Login(ctx context.Context, in *LoginRequest, op
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ChangePasswordResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/ChangePassword", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, MobilityAccounts_ChangePassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -125,7 +148,7 @@ func (c *mobilityAccountsClient) ChangePassword(ctx context.Context, in *ChangeP
|
||||
|
||||
// MobilityAccountsServer is the server API for MobilityAccounts service.
|
||||
// All implementations must embed UnimplementedMobilityAccountsServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type MobilityAccountsServer interface {
|
||||
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
||||
UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error)
|
||||
@@ -140,9 +163,12 @@ type MobilityAccountsServer interface {
|
||||
mustEmbedUnimplementedMobilityAccountsServer()
|
||||
}
|
||||
|
||||
// UnimplementedMobilityAccountsServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedMobilityAccountsServer struct {
|
||||
}
|
||||
// UnimplementedMobilityAccountsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMobilityAccountsServer struct{}
|
||||
|
||||
func (UnimplementedMobilityAccountsServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
||||
@@ -172,6 +198,7 @@ func (UnimplementedMobilityAccountsServer) ChangePassword(context.Context, *Chan
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
|
||||
}
|
||||
func (UnimplementedMobilityAccountsServer) mustEmbedUnimplementedMobilityAccountsServer() {}
|
||||
func (UnimplementedMobilityAccountsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMobilityAccountsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MobilityAccountsServer will
|
||||
@@ -181,6 +208,13 @@ type UnsafeMobilityAccountsServer interface {
|
||||
}
|
||||
|
||||
func RegisterMobilityAccountsServer(s grpc.ServiceRegistrar, srv MobilityAccountsServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMobilityAccountsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&MobilityAccounts_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -194,7 +228,7 @@ func _MobilityAccounts_Register_Handler(srv interface{}, ctx context.Context, de
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/Register",
|
||||
FullMethod: MobilityAccounts_Register_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).Register(ctx, req.(*RegisterRequest))
|
||||
@@ -212,7 +246,7 @@ func _MobilityAccounts_UpdateData_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/UpdateData",
|
||||
FullMethod: MobilityAccounts_UpdateData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).UpdateData(ctx, req.(*UpdateDataRequest))
|
||||
@@ -230,7 +264,7 @@ func _MobilityAccounts_UpdatePhoneNumber_Handler(srv interface{}, ctx context.Co
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/UpdatePhoneNumber",
|
||||
FullMethod: MobilityAccounts_UpdatePhoneNumber_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).UpdatePhoneNumber(ctx, req.(*UpdatePhoneNumberRequest))
|
||||
@@ -248,7 +282,7 @@ func _MobilityAccounts_GetAccount_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/GetAccount",
|
||||
FullMethod: MobilityAccounts_GetAccount_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).GetAccount(ctx, req.(*GetAccountRequest))
|
||||
@@ -266,7 +300,7 @@ func _MobilityAccounts_GetAccountUsername_Handler(srv interface{}, ctx context.C
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/GetAccountUsername",
|
||||
FullMethod: MobilityAccounts_GetAccountUsername_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).GetAccountUsername(ctx, req.(*GetAccountUsernameRequest))
|
||||
@@ -284,7 +318,7 @@ func _MobilityAccounts_GetAccounts_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/GetAccounts",
|
||||
FullMethod: MobilityAccounts_GetAccounts_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).GetAccounts(ctx, req.(*GetAccountsRequest))
|
||||
@@ -302,7 +336,7 @@ func _MobilityAccounts_GetAccountsBatch_Handler(srv interface{}, ctx context.Con
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/GetAccountsBatch",
|
||||
FullMethod: MobilityAccounts_GetAccountsBatch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).GetAccountsBatch(ctx, req.(*GetAccountsBatchRequest))
|
||||
@@ -320,7 +354,7 @@ func _MobilityAccounts_Login_Handler(srv interface{}, ctx context.Context, dec f
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/Login",
|
||||
FullMethod: MobilityAccounts_Login_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).Login(ctx, req.(*LoginRequest))
|
||||
@@ -338,7 +372,7 @@ func _MobilityAccounts_ChangePassword_Handler(srv interface{}, ctx context.Conte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/ChangePassword",
|
||||
FullMethod: MobilityAccounts_ChangePassword_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||
|
||||
Reference in New Issue
Block a user