Templayte updates and small changes

This commit is contained in:
Arnaud Delcasse 2022-09-06 15:03:39 +02:00
parent 6530d024f8
commit b9a32e41bf
6 changed files with 387 additions and 126 deletions

View File

@ -325,9 +325,7 @@ type GetAccountRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"`
Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"`
Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"`
} }
func (x *GetAccountRequest) Reset() { func (x *GetAccountRequest) Reset() {
@ -369,20 +367,6 @@ func (x *GetAccountRequest) GetId() string {
return "" return ""
} }
func (x *GetAccountRequest) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *GetAccountRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type GetAccountResponse struct { type GetAccountResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -430,6 +414,108 @@ func (x *GetAccountResponse) GetAccount() *Account {
return nil return nil
} }
type GetAccountUsernameRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"`
Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"`
}
func (x *GetAccountUsernameRequest) Reset() {
*x = GetAccountUsernameRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccountUsernameRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccountUsernameRequest) ProtoMessage() {}
func (x *GetAccountUsernameRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[8]
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 GetAccountUsernameRequest.ProtoReflect.Descriptor instead.
func (*GetAccountUsernameRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{8}
}
func (x *GetAccountUsernameRequest) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *GetAccountUsernameRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type GetAccountUsernameResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Account *Account `protobuf:"bytes,12,opt,name=account,proto3" json:"account,omitempty"`
}
func (x *GetAccountUsernameResponse) Reset() {
*x = GetAccountUsernameResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccountUsernameResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccountUsernameResponse) ProtoMessage() {}
func (x *GetAccountUsernameResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[9]
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 GetAccountUsernameResponse.ProtoReflect.Descriptor instead.
func (*GetAccountUsernameResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{9}
}
func (x *GetAccountUsernameResponse) GetAccount() *Account {
if x != nil {
return x.Account
}
return nil
}
type GetAccountsRequest struct { type GetAccountsRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -441,7 +527,7 @@ type GetAccountsRequest struct {
func (x *GetAccountsRequest) Reset() { func (x *GetAccountsRequest) Reset() {
*x = GetAccountsRequest{} *x = GetAccountsRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[8] mi := &file_comasvc_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -454,7 +540,7 @@ func (x *GetAccountsRequest) String() string {
func (*GetAccountsRequest) ProtoMessage() {} func (*GetAccountsRequest) ProtoMessage() {}
func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message { func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[8] mi := &file_comasvc_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -467,7 +553,7 @@ func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsRequest.ProtoReflect.Descriptor instead. // Deprecated: Use GetAccountsRequest.ProtoReflect.Descriptor instead.
func (*GetAccountsRequest) Descriptor() ([]byte, []int) { func (*GetAccountsRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{8} return file_comasvc_proto_rawDescGZIP(), []int{10}
} }
func (x *GetAccountsRequest) GetNamespaces() []string { func (x *GetAccountsRequest) GetNamespaces() []string {
@ -488,7 +574,7 @@ type GetAccountsResponse struct {
func (x *GetAccountsResponse) Reset() { func (x *GetAccountsResponse) Reset() {
*x = GetAccountsResponse{} *x = GetAccountsResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[9] mi := &file_comasvc_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -501,7 +587,7 @@ func (x *GetAccountsResponse) String() string {
func (*GetAccountsResponse) ProtoMessage() {} func (*GetAccountsResponse) ProtoMessage() {}
func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message { func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[9] mi := &file_comasvc_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -514,7 +600,7 @@ func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead. // Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead.
func (*GetAccountsResponse) Descriptor() ([]byte, []int) { func (*GetAccountsResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{9} return file_comasvc_proto_rawDescGZIP(), []int{11}
} }
func (x *GetAccountsResponse) GetAccounts() []*Account { func (x *GetAccountsResponse) GetAccounts() []*Account {
@ -535,7 +621,7 @@ type GetAccountsBatchRequest struct {
func (x *GetAccountsBatchRequest) Reset() { func (x *GetAccountsBatchRequest) Reset() {
*x = GetAccountsBatchRequest{} *x = GetAccountsBatchRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[10] mi := &file_comasvc_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -548,7 +634,7 @@ func (x *GetAccountsBatchRequest) String() string {
func (*GetAccountsBatchRequest) ProtoMessage() {} func (*GetAccountsBatchRequest) ProtoMessage() {}
func (x *GetAccountsBatchRequest) ProtoReflect() protoreflect.Message { func (x *GetAccountsBatchRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[10] mi := &file_comasvc_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -561,7 +647,7 @@ func (x *GetAccountsBatchRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsBatchRequest.ProtoReflect.Descriptor instead. // Deprecated: Use GetAccountsBatchRequest.ProtoReflect.Descriptor instead.
func (*GetAccountsBatchRequest) Descriptor() ([]byte, []int) { func (*GetAccountsBatchRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{10} return file_comasvc_proto_rawDescGZIP(), []int{12}
} }
func (x *GetAccountsBatchRequest) GetAccountids() []string { func (x *GetAccountsBatchRequest) GetAccountids() []string {
@ -582,7 +668,7 @@ type GetAccountsBatchResponse struct {
func (x *GetAccountsBatchResponse) Reset() { func (x *GetAccountsBatchResponse) Reset() {
*x = GetAccountsBatchResponse{} *x = GetAccountsBatchResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[11] mi := &file_comasvc_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -595,7 +681,7 @@ func (x *GetAccountsBatchResponse) String() string {
func (*GetAccountsBatchResponse) ProtoMessage() {} func (*GetAccountsBatchResponse) ProtoMessage() {}
func (x *GetAccountsBatchResponse) ProtoReflect() protoreflect.Message { func (x *GetAccountsBatchResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[11] mi := &file_comasvc_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -608,7 +694,7 @@ func (x *GetAccountsBatchResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetAccountsBatchResponse.ProtoReflect.Descriptor instead. // Deprecated: Use GetAccountsBatchResponse.ProtoReflect.Descriptor instead.
func (*GetAccountsBatchResponse) Descriptor() ([]byte, []int) { func (*GetAccountsBatchResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{11} return file_comasvc_proto_rawDescGZIP(), []int{13}
} }
func (x *GetAccountsBatchResponse) GetAccounts() []*Account { func (x *GetAccountsBatchResponse) GetAccounts() []*Account {
@ -630,7 +716,7 @@ type ChangePasswordRequest struct {
func (x *ChangePasswordRequest) Reset() { func (x *ChangePasswordRequest) Reset() {
*x = ChangePasswordRequest{} *x = ChangePasswordRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[12] mi := &file_comasvc_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -643,7 +729,7 @@ func (x *ChangePasswordRequest) String() string {
func (*ChangePasswordRequest) ProtoMessage() {} func (*ChangePasswordRequest) ProtoMessage() {}
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message { func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[12] mi := &file_comasvc_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -656,7 +742,7 @@ func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead. // Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{12} return file_comasvc_proto_rawDescGZIP(), []int{14}
} }
func (x *ChangePasswordRequest) GetId() string { func (x *ChangePasswordRequest) GetId() string {
@ -682,7 +768,7 @@ type ChangePasswordResponse struct {
func (x *ChangePasswordResponse) Reset() { func (x *ChangePasswordResponse) Reset() {
*x = ChangePasswordResponse{} *x = ChangePasswordResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_comasvc_proto_msgTypes[13] mi := &file_comasvc_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -695,7 +781,7 @@ func (x *ChangePasswordResponse) String() string {
func (*ChangePasswordResponse) ProtoMessage() {} func (*ChangePasswordResponse) ProtoMessage() {}
func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message { func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message {
mi := &file_comasvc_proto_msgTypes[13] mi := &file_comasvc_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -708,7 +794,7 @@ func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead. // Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead.
func (*ChangePasswordResponse) Descriptor() ([]byte, []int) { func (*ChangePasswordResponse) Descriptor() ([]byte, []int) {
return file_comasvc_proto_rawDescGZIP(), []int{13} return file_comasvc_proto_rawDescGZIP(), []int{15}
} }
var File_comasvc_proto protoreflect.FileDescriptor var File_comasvc_proto protoreflect.FileDescriptor
@ -739,49 +825,60 @@ var file_comasvc_proto_rawDesc = []byte{
0x6e, 0x74, 0x22, 0x38, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 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, 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, 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, 0x5d, 0x0a, 0x11, 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, 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, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x64, 0x22, 0x38, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x38, 0x0a, 0x12, 0x47, 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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x63, 0x65, 0x22, 0x40, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a,
0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65,
0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x69, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20,
0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61,
0x24, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x63,
0x0b, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x64, 0x73,
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24,
0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x68, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b,
0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x32, 0x08, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f,
0x6f, 0x6e, 0x73, 0x65, 0x32, 0xad, 0x03, 0x0a, 0x10, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61,
0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x02, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52,
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x68, 0x61,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x2e, 0x55, 0x70, 0x64, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x6e, 0x73, 0x65, 0x32, 0xfe, 0x03, 0x0a, 0x10, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52,
0x75, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x55,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 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, 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, 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, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
@ -816,52 +913,57 @@ func file_comasvc_proto_rawDescGZIP() []byte {
return file_comasvc_proto_rawDescData return file_comasvc_proto_rawDescData
} }
var file_comasvc_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_comasvc_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_comasvc_proto_goTypes = []interface{}{ var file_comasvc_proto_goTypes = []interface{}{
(*LoginRequest)(nil), // 0: LoginRequest (*LoginRequest)(nil), // 0: LoginRequest
(*LoginResponse)(nil), // 1: LoginResponse (*LoginResponse)(nil), // 1: LoginResponse
(*RegisterRequest)(nil), // 2: RegisterRequest (*RegisterRequest)(nil), // 2: RegisterRequest
(*RegisterResponse)(nil), // 3: RegisterResponse (*RegisterResponse)(nil), // 3: RegisterResponse
(*UpdateDataRequest)(nil), // 4: UpdateDataRequest (*UpdateDataRequest)(nil), // 4: UpdateDataRequest
(*UpdateDataResponse)(nil), // 5: UpdateDataResponse (*UpdateDataResponse)(nil), // 5: UpdateDataResponse
(*GetAccountRequest)(nil), // 6: GetAccountRequest (*GetAccountRequest)(nil), // 6: GetAccountRequest
(*GetAccountResponse)(nil), // 7: GetAccountResponse (*GetAccountResponse)(nil), // 7: GetAccountResponse
(*GetAccountsRequest)(nil), // 8: GetAccountsRequest (*GetAccountUsernameRequest)(nil), // 8: GetAccountUsernameRequest
(*GetAccountsResponse)(nil), // 9: GetAccountsResponse (*GetAccountUsernameResponse)(nil), // 9: GetAccountUsernameResponse
(*GetAccountsBatchRequest)(nil), // 10: GetAccountsBatchRequest (*GetAccountsRequest)(nil), // 10: GetAccountsRequest
(*GetAccountsBatchResponse)(nil), // 11: GetAccountsBatchResponse (*GetAccountsResponse)(nil), // 11: GetAccountsResponse
(*ChangePasswordRequest)(nil), // 12: ChangePasswordRequest (*GetAccountsBatchRequest)(nil), // 12: GetAccountsBatchRequest
(*ChangePasswordResponse)(nil), // 13: ChangePasswordResponse (*GetAccountsBatchResponse)(nil), // 13: GetAccountsBatchResponse
(*Account)(nil), // 14: Account (*ChangePasswordRequest)(nil), // 14: ChangePasswordRequest
(*ChangePasswordResponse)(nil), // 15: ChangePasswordResponse
(*Account)(nil), // 16: Account
} }
var file_comasvc_proto_depIdxs = []int32{ var file_comasvc_proto_depIdxs = []int32{
14, // 0: LoginResponse.account:type_name -> Account 16, // 0: LoginResponse.account:type_name -> Account
14, // 1: RegisterRequest.account:type_name -> Account 16, // 1: RegisterRequest.account:type_name -> Account
14, // 2: RegisterResponse.account:type_name -> Account 16, // 2: RegisterResponse.account:type_name -> Account
14, // 3: UpdateDataRequest.account:type_name -> Account 16, // 3: UpdateDataRequest.account:type_name -> Account
14, // 4: UpdateDataResponse.account:type_name -> Account 16, // 4: UpdateDataResponse.account:type_name -> Account
14, // 5: GetAccountResponse.account:type_name -> Account 16, // 5: GetAccountResponse.account:type_name -> Account
14, // 6: GetAccountsResponse.accounts:type_name -> Account 16, // 6: GetAccountUsernameResponse.account:type_name -> Account
14, // 7: GetAccountsBatchResponse.accounts:type_name -> Account 16, // 7: GetAccountsResponse.accounts:type_name -> Account
2, // 8: MobilityAccounts.Register:input_type -> RegisterRequest 16, // 8: GetAccountsBatchResponse.accounts:type_name -> Account
4, // 9: MobilityAccounts.UpdateData:input_type -> UpdateDataRequest 2, // 9: MobilityAccounts.Register:input_type -> RegisterRequest
6, // 10: MobilityAccounts.GetAccount:input_type -> GetAccountRequest 4, // 10: MobilityAccounts.UpdateData:input_type -> UpdateDataRequest
8, // 11: MobilityAccounts.GetAccounts:input_type -> GetAccountsRequest 6, // 11: MobilityAccounts.GetAccount:input_type -> GetAccountRequest
10, // 12: MobilityAccounts.GetAccountsBatch:input_type -> GetAccountsBatchRequest 8, // 12: MobilityAccounts.GetAccountUsername:input_type -> GetAccountUsernameRequest
0, // 13: MobilityAccounts.Login:input_type -> LoginRequest 10, // 13: MobilityAccounts.GetAccounts:input_type -> GetAccountsRequest
12, // 14: MobilityAccounts.ChangePassword:input_type -> ChangePasswordRequest 12, // 14: MobilityAccounts.GetAccountsBatch:input_type -> GetAccountsBatchRequest
3, // 15: MobilityAccounts.Register:output_type -> RegisterResponse 0, // 15: MobilityAccounts.Login:input_type -> LoginRequest
5, // 16: MobilityAccounts.UpdateData:output_type -> UpdateDataResponse 14, // 16: MobilityAccounts.ChangePassword:input_type -> ChangePasswordRequest
7, // 17: MobilityAccounts.GetAccount:output_type -> GetAccountResponse 3, // 17: MobilityAccounts.Register:output_type -> RegisterResponse
9, // 18: MobilityAccounts.GetAccounts:output_type -> GetAccountsResponse 5, // 18: MobilityAccounts.UpdateData:output_type -> UpdateDataResponse
11, // 19: MobilityAccounts.GetAccountsBatch:output_type -> GetAccountsBatchResponse 7, // 19: MobilityAccounts.GetAccount:output_type -> GetAccountResponse
1, // 20: MobilityAccounts.Login:output_type -> LoginResponse 9, // 20: MobilityAccounts.GetAccountUsername:output_type -> GetAccountUsernameResponse
13, // 21: MobilityAccounts.ChangePassword:output_type -> ChangePasswordResponse 11, // 21: MobilityAccounts.GetAccounts:output_type -> GetAccountsResponse
15, // [15:22] is the sub-list for method output_type 13, // 22: MobilityAccounts.GetAccountsBatch:output_type -> GetAccountsBatchResponse
8, // [8:15] is the sub-list for method input_type 1, // 23: MobilityAccounts.Login:output_type -> LoginResponse
8, // [8:8] is the sub-list for extension type_name 15, // 24: MobilityAccounts.ChangePassword:output_type -> ChangePasswordResponse
8, // [8:8] is the sub-list for extension extendee 17, // [17:25] is the sub-list for method output_type
0, // [0:8] is the sub-list for field type_name 9, // [9:17] 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
} }
func init() { file_comasvc_proto_init() } func init() { file_comasvc_proto_init() }
@ -968,7 +1070,7 @@ func file_comasvc_proto_init() {
} }
} }
file_comasvc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_comasvc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsRequest); i { switch v := v.(*GetAccountUsernameRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -980,7 +1082,7 @@ func file_comasvc_proto_init() {
} }
} }
file_comasvc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_comasvc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsResponse); i { switch v := v.(*GetAccountUsernameResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -992,7 +1094,7 @@ func file_comasvc_proto_init() {
} }
} }
file_comasvc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_comasvc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsBatchRequest); i { switch v := v.(*GetAccountsRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1004,7 +1106,7 @@ func file_comasvc_proto_init() {
} }
} }
file_comasvc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_comasvc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountsBatchResponse); i { switch v := v.(*GetAccountsResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1016,7 +1118,7 @@ func file_comasvc_proto_init() {
} }
} }
file_comasvc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_comasvc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordRequest); i { switch v := v.(*GetAccountsBatchRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1028,6 +1130,30 @@ func file_comasvc_proto_init() {
} }
} }
file_comasvc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { file_comasvc_proto_msgTypes[13].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[14].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[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChangePasswordResponse); i { switch v := v.(*ChangePasswordResponse); i {
case 0: case 0:
return &v.state return &v.state
@ -1046,7 +1172,7 @@ func file_comasvc_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_comasvc_proto_rawDesc, RawDescriptor: file_comasvc_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 14, NumMessages: 16,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@ -10,6 +10,7 @@ service MobilityAccounts {
rpc Register(RegisterRequest) returns (RegisterResponse) {} rpc Register(RegisterRequest) returns (RegisterResponse) {}
rpc UpdateData(UpdateDataRequest) returns (UpdateDataResponse) {} rpc UpdateData(UpdateDataRequest) returns (UpdateDataResponse) {}
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {} rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {}
rpc GetAccountUsername(GetAccountUsernameRequest) returns (GetAccountUsernameResponse) {}
rpc GetAccounts(GetAccountsRequest) returns (GetAccountsResponse) {} rpc GetAccounts(GetAccountsRequest) returns (GetAccountsResponse) {}
rpc GetAccountsBatch(GetAccountsBatchRequest) returns (GetAccountsBatchResponse) {} rpc GetAccountsBatch(GetAccountsBatchRequest) returns (GetAccountsBatchResponse) {}
@ -46,11 +47,18 @@ message UpdateDataResponse {
message GetAccountRequest { message GetAccountRequest {
string id = 9; string id = 9;
}
message GetAccountResponse {
Account account = 12;
}
message GetAccountUsernameRequest {
string username = 10; string username = 10;
string namespace = 11; string namespace = 11;
} }
message GetAccountResponse { message GetAccountUsernameResponse {
Account account = 12; Account account = 12;
} }

View File

@ -25,6 +25,7 @@ type MobilityAccountsClient interface {
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
UpdateData(ctx context.Context, in *UpdateDataRequest, opts ...grpc.CallOption) (*UpdateDataResponse, error) UpdateData(ctx context.Context, in *UpdateDataRequest, opts ...grpc.CallOption) (*UpdateDataResponse, error)
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, 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) GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error)
GetAccountsBatch(ctx context.Context, in *GetAccountsBatchRequest, opts ...grpc.CallOption) (*GetAccountsBatchResponse, error) GetAccountsBatch(ctx context.Context, in *GetAccountsBatchRequest, opts ...grpc.CallOption) (*GetAccountsBatchResponse, error)
// Authentication functions // Authentication functions
@ -67,6 +68,15 @@ func (c *mobilityAccountsClient) GetAccount(ctx context.Context, in *GetAccountR
return out, nil return out, nil
} }
func (c *mobilityAccountsClient) GetAccountUsername(ctx context.Context, in *GetAccountUsernameRequest, opts ...grpc.CallOption) (*GetAccountUsernameResponse, error) {
out := new(GetAccountUsernameResponse)
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccountUsername", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mobilityAccountsClient) GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error) { func (c *mobilityAccountsClient) GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error) {
out := new(GetAccountsResponse) out := new(GetAccountsResponse)
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccounts", in, out, opts...) err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccounts", in, out, opts...)
@ -110,6 +120,7 @@ type MobilityAccountsServer interface {
Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error) UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error)
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
GetAccountUsername(context.Context, *GetAccountUsernameRequest) (*GetAccountUsernameResponse, error)
GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
GetAccountsBatch(context.Context, *GetAccountsBatchRequest) (*GetAccountsBatchResponse, error) GetAccountsBatch(context.Context, *GetAccountsBatchRequest) (*GetAccountsBatchResponse, error)
// Authentication functions // Authentication functions
@ -131,6 +142,9 @@ func (UnimplementedMobilityAccountsServer) UpdateData(context.Context, *UpdateDa
func (UnimplementedMobilityAccountsServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) { func (UnimplementedMobilityAccountsServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
} }
func (UnimplementedMobilityAccountsServer) GetAccountUsername(context.Context, *GetAccountUsernameRequest) (*GetAccountUsernameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccountUsername not implemented")
}
func (UnimplementedMobilityAccountsServer) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error) { func (UnimplementedMobilityAccountsServer) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccounts not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetAccounts not implemented")
} }
@ -210,6 +224,24 @@ func _MobilityAccounts_GetAccount_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _MobilityAccounts_GetAccountUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountUsernameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MobilityAccountsServer).GetAccountUsername(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/MobilityAccounts/GetAccountUsername",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MobilityAccountsServer).GetAccountUsername(ctx, req.(*GetAccountUsernameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MobilityAccounts_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _MobilityAccounts_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountsRequest) in := new(GetAccountsRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -301,6 +333,10 @@ var MobilityAccounts_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetAccount", MethodName: "GetAccount",
Handler: _MobilityAccounts_GetAccount_Handler, Handler: _MobilityAccounts_GetAccount_Handler,
}, },
{
MethodName: "GetAccountUsername",
Handler: _MobilityAccounts_GetAccountUsername_Handler,
},
{ {
MethodName: "GetAccounts", MethodName: "GetAccounts",
Handler: _MobilityAccounts_GetAccounts_Handler, Handler: _MobilityAccounts_GetAccounts_Handler,

View File

@ -76,6 +76,19 @@ func (s MobilityAccountsServerImpl) GetAccount(ctx context.Context, req *GetAcco
} }
return &GetAccountResponse{Account: response}, nil return &GetAccountResponse{Account: response}, nil
} }
func (s MobilityAccountsServerImpl) GetAccountUsername(ctx context.Context, req *GetAccountUsernameRequest) (*GetAccountUsernameResponse, error) {
account, err := s.handler.GetAccountUsername(req.Username, req.Namespace)
if err != nil {
fmt.Println(err)
return nil, status.Errorf(codes.AlreadyExists, "issue while retrieving account : %v", err)
}
response, err := AccountFromStorageType(account)
if err != nil {
fmt.Println(err)
return nil, status.Errorf(codes.Internal, "issue while retrieving account : %v", err)
}
return &GetAccountUsernameResponse{Account: response}, nil
}
func (s MobilityAccountsServerImpl) GetAccounts(ctx context.Context, req *GetAccountsRequest) (*GetAccountsResponse, error) { func (s MobilityAccountsServerImpl) GetAccounts(ctx context.Context, req *GetAccountsRequest) (*GetAccountsResponse, error) {
responses, err := s.handler.GetAccounts(req.Namespaces) responses, err := s.handler.GetAccounts(req.Namespaces)
if err != nil { if err != nil {

View File

@ -120,6 +120,11 @@ func (h MobilityAccountsHandler) GetAccount(id string) (account *storage.Account
return return
} }
func (h MobilityAccountsHandler) GetAccountUsername(username string, namespace string) (account *storage.Account, err error) {
account, err = h.storage.DB.LocalAuthentication(namespace, username, "", "")
return
}
func (h MobilityAccountsHandler) GetAccounts(namespaces []string) (accounts []storage.Account, err error) { func (h MobilityAccountsHandler) GetAccounts(namespaces []string) (accounts []storage.Account, err error) {
accounts, err = h.storage.DB.GetAccounts(namespaces) accounts, err = h.storage.DB.GetAccounts(namespaces)
return return

View File

@ -0,0 +1,73 @@
{{define "auth"}}
<html class="h-full bg-gray-50">
<head>
<title>PARCOURSMOB - Identification</title>
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
</head>
<body class="h-full">
<form method="post">
{{ .csrfField }}
<!--
This example requires Tailwind CSS v2.0+
This example requires some changes to your config:
```
// tailwind.config.js
module.exports = {
// ...
plugins: [
// ...
require('@tailwindcss/forms'),
],
}
```
-->
<!--
This example requires updating your template:
```
<html class="h-full bg-gray-50">
<body class="h-full">
```
-->
<div class="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
<div class="sm:mx-auto sm:w-full sm:max-w-md">
<!-- <img class="mx-auto h-12 w-auto" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" alt="Your Company"> -->
<h2 class="mt-6 text-center text-3xl font-bold tracking-tight text-gray-900">Connectez vous à PARCOURSMOB</h2>
</div>
<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
<div>
<label for="username" class="block text-sm font-medium text-gray-700">Email</label>
<div class="mt-1">
<input id="username" name="username" type="email" autocomplete="email" required class="block w-full appearance-none rounded-2xl border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
</div>
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700">Mot de passe</label>
<div class="mt-1">
<input id="password" name="password" type="password" autocomplete="current-password" required class="block w-full appearance-none rounded-2xl border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
</div>
</div>
<div>
<button type="submit" class="mt-2 flex w-full justify-center rounded-2xl border border-transparent bg-co-blue py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2">Sign in</button>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
{{end}}