From 44ed2ab876f93303f898cbddea40a2261bf13be0 Mon Sep 17 00:00:00 2001 From: Kaien Date: Fri, 20 Mar 2026 21:12:48 +0300 Subject: [PATCH] Add UsersService proto for l_ai_core user registry --- users.pb.go | 808 +++++++++++++++++++++++++++++++++++++++++++++++ users.proto | 84 +++++ users_grpc.pb.go | 392 +++++++++++++++++++++++ 3 files changed, 1284 insertions(+) create mode 100644 users.pb.go create mode 100644 users.proto create mode 100644 users_grpc.pb.go diff --git a/users.pb.go b/users.pb.go new file mode 100644 index 0000000..66cf67c --- /dev/null +++ b/users.pb.go @@ -0,0 +1,808 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.0 +// source: users.proto + +package proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GlobalUser struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + LinkedAccounts []*LinkedAccount `protobuf:"bytes,5,rep,name=linked_accounts,json=linkedAccounts,proto3" json:"linked_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GlobalUser) Reset() { + *x = GlobalUser{} + mi := &file_users_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GlobalUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GlobalUser) ProtoMessage() {} + +func (x *GlobalUser) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GlobalUser.ProtoReflect.Descriptor instead. +func (*GlobalUser) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{0} +} + +func (x *GlobalUser) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GlobalUser) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *GlobalUser) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *GlobalUser) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *GlobalUser) GetLinkedAccounts() []*LinkedAccount { + if x != nil { + return x.LinkedAccounts + } + return nil +} + +type LinkedAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + GlobalUserId int64 `protobuf:"varint,2,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` + Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"` + AccountId string `protobuf:"bytes,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountUsername string `protobuf:"bytes,5,opt,name=account_username,json=accountUsername,proto3" json:"account_username,omitempty"` + AccountUrl string `protobuf:"bytes,6,opt,name=account_url,json=accountUrl,proto3" json:"account_url,omitempty"` + LinkedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=linked_at,json=linkedAt,proto3" json:"linked_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LinkedAccount) Reset() { + *x = LinkedAccount{} + mi := &file_users_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LinkedAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkedAccount) ProtoMessage() {} + +func (x *LinkedAccount) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LinkedAccount.ProtoReflect.Descriptor instead. +func (*LinkedAccount) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{1} +} + +func (x *LinkedAccount) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *LinkedAccount) GetGlobalUserId() int64 { + if x != nil { + return x.GlobalUserId + } + return 0 +} + +func (x *LinkedAccount) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *LinkedAccount) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *LinkedAccount) GetAccountUsername() string { + if x != nil { + return x.AccountUsername + } + return "" +} + +func (x *LinkedAccount) GetAccountUrl() string { + if x != nil { + return x.AccountUrl + } + return "" +} + +func (x *LinkedAccount) GetLinkedAt() *timestamppb.Timestamp { + if x != nil { + return x.LinkedAt + } + return nil +} + +func (x *LinkedAccount) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type CreateGlobalUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateGlobalUserRequest) Reset() { + *x = CreateGlobalUserRequest{} + mi := &file_users_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateGlobalUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGlobalUserRequest) ProtoMessage() {} + +func (x *CreateGlobalUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGlobalUserRequest.ProtoReflect.Descriptor instead. +func (*CreateGlobalUserRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateGlobalUserRequest) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +type GetGlobalUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetGlobalUserRequest) Reset() { + *x = GetGlobalUserRequest{} + mi := &file_users_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetGlobalUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGlobalUserRequest) ProtoMessage() {} + +func (x *GetGlobalUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGlobalUserRequest.ProtoReflect.Descriptor instead. +func (*GetGlobalUserRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{3} +} + +func (x *GetGlobalUserRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type GetAllGlobalUsersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Users []*GlobalUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAllGlobalUsersResponse) Reset() { + *x = GetAllGlobalUsersResponse{} + mi := &file_users_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAllGlobalUsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllGlobalUsersResponse) ProtoMessage() {} + +func (x *GetAllGlobalUsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllGlobalUsersResponse.ProtoReflect.Descriptor instead. +func (*GetAllGlobalUsersResponse) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{4} +} + +func (x *GetAllGlobalUsersResponse) GetUsers() []*GlobalUser { + if x != nil { + return x.Users + } + return nil +} + +type UpdateDisplayNameRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateDisplayNameRequest) Reset() { + *x = UpdateDisplayNameRequest{} + mi := &file_users_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateDisplayNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDisplayNameRequest) ProtoMessage() {} + +func (x *UpdateDisplayNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDisplayNameRequest.ProtoReflect.Descriptor instead. +func (*UpdateDisplayNameRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateDisplayNameRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *UpdateDisplayNameRequest) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +type LinkAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + GlobalUserId int64 `protobuf:"varint,1,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` + Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` + AccountId string `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountUsername string `protobuf:"bytes,4,opt,name=account_username,json=accountUsername,proto3" json:"account_username,omitempty"` + AccountUrl string `protobuf:"bytes,5,opt,name=account_url,json=accountUrl,proto3" json:"account_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LinkAccountRequest) Reset() { + *x = LinkAccountRequest{} + mi := &file_users_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LinkAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkAccountRequest) ProtoMessage() {} + +func (x *LinkAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LinkAccountRequest.ProtoReflect.Descriptor instead. +func (*LinkAccountRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{6} +} + +func (x *LinkAccountRequest) GetGlobalUserId() int64 { + if x != nil { + return x.GlobalUserId + } + return 0 +} + +func (x *LinkAccountRequest) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *LinkAccountRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *LinkAccountRequest) GetAccountUsername() string { + if x != nil { + return x.AccountUsername + } + return "" +} + +func (x *LinkAccountRequest) GetAccountUrl() string { + if x != nil { + return x.AccountUrl + } + return "" +} + +type UnlinkAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + GlobalUserId int64 `protobuf:"varint,1,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` + Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` + AccountId string `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnlinkAccountRequest) Reset() { + *x = UnlinkAccountRequest{} + mi := &file_users_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnlinkAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnlinkAccountRequest) ProtoMessage() {} + +func (x *UnlinkAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnlinkAccountRequest.ProtoReflect.Descriptor instead. +func (*UnlinkAccountRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{7} +} + +func (x *UnlinkAccountRequest) GetGlobalUserId() int64 { + if x != nil { + return x.GlobalUserId + } + return 0 +} + +func (x *UnlinkAccountRequest) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *UnlinkAccountRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type GetLinkedAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + GlobalUserId int64 `protobuf:"varint,1,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` + Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLinkedAccountRequest) Reset() { + *x = GetLinkedAccountRequest{} + mi := &file_users_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLinkedAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLinkedAccountRequest) ProtoMessage() {} + +func (x *GetLinkedAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLinkedAccountRequest.ProtoReflect.Descriptor instead. +func (*GetLinkedAccountRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{8} +} + +func (x *GetLinkedAccountRequest) GetGlobalUserId() int64 { + if x != nil { + return x.GlobalUserId + } + return 0 +} + +func (x *GetLinkedAccountRequest) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +type GetLinkedAccountsByPlatformRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLinkedAccountsByPlatformRequest) Reset() { + *x = GetLinkedAccountsByPlatformRequest{} + mi := &file_users_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLinkedAccountsByPlatformRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLinkedAccountsByPlatformRequest) ProtoMessage() {} + +func (x *GetLinkedAccountsByPlatformRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLinkedAccountsByPlatformRequest.ProtoReflect.Descriptor instead. +func (*GetLinkedAccountsByPlatformRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{9} +} + +func (x *GetLinkedAccountsByPlatformRequest) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +type GetLinkedAccountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Accounts []*LinkedAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLinkedAccountsResponse) Reset() { + *x = GetLinkedAccountsResponse{} + mi := &file_users_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLinkedAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLinkedAccountsResponse) ProtoMessage() {} + +func (x *GetLinkedAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLinkedAccountsResponse.ProtoReflect.Descriptor instead. +func (*GetLinkedAccountsResponse) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{10} +} + +func (x *GetLinkedAccountsResponse) GetAccounts() []*LinkedAccount { + if x != nil { + return x.Accounts + } + return nil +} + +var File_users_proto protoreflect.FileDescriptor + +const file_users_proto_rawDesc = "" + + "\n" + + "\vusers.proto\x12\x05users\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf4\x01\n" + + "\n" + + "GlobalUser\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x129\n" + + "\n" + + "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12=\n" + + "\x0flinked_accounts\x18\x05 \x03(\v2\x14.users.LinkedAccountR\x0elinkedAccounts\"\xc0\x02\n" + + "\rLinkedAccount\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12$\n" + + "\x0eglobal_user_id\x18\x02 \x01(\x03R\fglobalUserId\x12\x1a\n" + + "\bplatform\x18\x03 \x01(\tR\bplatform\x12\x1d\n" + + "\n" + + "account_id\x18\x04 \x01(\tR\taccountId\x12)\n" + + "\x10account_username\x18\x05 \x01(\tR\x0faccountUsername\x12\x1f\n" + + "\vaccount_url\x18\x06 \x01(\tR\n" + + "accountUrl\x127\n" + + "\tlinked_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\blinkedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"<\n" + + "\x17CreateGlobalUserRequest\x12!\n" + + "\fdisplay_name\x18\x01 \x01(\tR\vdisplayName\"&\n" + + "\x14GetGlobalUserRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"D\n" + + "\x19GetAllGlobalUsersResponse\x12'\n" + + "\x05users\x18\x01 \x03(\v2\x11.users.GlobalUserR\x05users\"M\n" + + "\x18UpdateDisplayNameRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\"\xc1\x01\n" + + "\x12LinkAccountRequest\x12$\n" + + "\x0eglobal_user_id\x18\x01 \x01(\x03R\fglobalUserId\x12\x1a\n" + + "\bplatform\x18\x02 \x01(\tR\bplatform\x12\x1d\n" + + "\n" + + "account_id\x18\x03 \x01(\tR\taccountId\x12)\n" + + "\x10account_username\x18\x04 \x01(\tR\x0faccountUsername\x12\x1f\n" + + "\vaccount_url\x18\x05 \x01(\tR\n" + + "accountUrl\"w\n" + + "\x14UnlinkAccountRequest\x12$\n" + + "\x0eglobal_user_id\x18\x01 \x01(\x03R\fglobalUserId\x12\x1a\n" + + "\bplatform\x18\x02 \x01(\tR\bplatform\x12\x1d\n" + + "\n" + + "account_id\x18\x03 \x01(\tR\taccountId\"[\n" + + "\x17GetLinkedAccountRequest\x12$\n" + + "\x0eglobal_user_id\x18\x01 \x01(\x03R\fglobalUserId\x12\x1a\n" + + "\bplatform\x18\x02 \x01(\tR\bplatform\"@\n" + + "\"GetLinkedAccountsByPlatformRequest\x12\x1a\n" + + "\bplatform\x18\x01 \x01(\tR\bplatform\"M\n" + + "\x19GetLinkedAccountsResponse\x120\n" + + "\baccounts\x18\x01 \x03(\v2\x14.users.LinkedAccountR\baccounts2\xef\x04\n" + + "\fUsersService\x12E\n" + + "\x10CreateGlobalUser\x12\x1e.users.CreateGlobalUserRequest\x1a\x11.users.GlobalUser\x12?\n" + + "\rGetGlobalUser\x12\x1b.users.GetGlobalUserRequest\x1a\x11.users.GlobalUser\x12M\n" + + "\x11GetAllGlobalUsers\x12\x16.google.protobuf.Empty\x1a .users.GetAllGlobalUsersResponse\x12L\n" + + "\x11UpdateDisplayName\x12\x1f.users.UpdateDisplayNameRequest\x1a\x16.google.protobuf.Empty\x12>\n" + + "\vLinkAccount\x12\x19.users.LinkAccountRequest\x1a\x14.users.LinkedAccount\x12D\n" + + "\rUnlinkAccount\x12\x1b.users.UnlinkAccountRequest\x1a\x16.google.protobuf.Empty\x12H\n" + + "\x10GetLinkedAccount\x12\x1e.users.GetLinkedAccountRequest\x1a\x14.users.LinkedAccount\x12j\n" + + "\x1bGetLinkedAccountsByPlatform\x12).users.GetLinkedAccountsByPlatformRequest\x1a .users.GetLinkedAccountsResponseB,Z*git.be.kaien.ru/l-ai/l-ai-core-proto/protob\x06proto3" + +var ( + file_users_proto_rawDescOnce sync.Once + file_users_proto_rawDescData []byte +) + +func file_users_proto_rawDescGZIP() []byte { + file_users_proto_rawDescOnce.Do(func() { + file_users_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_users_proto_rawDesc), len(file_users_proto_rawDesc))) + }) + return file_users_proto_rawDescData +} + +var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_users_proto_goTypes = []any{ + (*GlobalUser)(nil), // 0: users.GlobalUser + (*LinkedAccount)(nil), // 1: users.LinkedAccount + (*CreateGlobalUserRequest)(nil), // 2: users.CreateGlobalUserRequest + (*GetGlobalUserRequest)(nil), // 3: users.GetGlobalUserRequest + (*GetAllGlobalUsersResponse)(nil), // 4: users.GetAllGlobalUsersResponse + (*UpdateDisplayNameRequest)(nil), // 5: users.UpdateDisplayNameRequest + (*LinkAccountRequest)(nil), // 6: users.LinkAccountRequest + (*UnlinkAccountRequest)(nil), // 7: users.UnlinkAccountRequest + (*GetLinkedAccountRequest)(nil), // 8: users.GetLinkedAccountRequest + (*GetLinkedAccountsByPlatformRequest)(nil), // 9: users.GetLinkedAccountsByPlatformRequest + (*GetLinkedAccountsResponse)(nil), // 10: users.GetLinkedAccountsResponse + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 12: google.protobuf.Empty +} +var file_users_proto_depIdxs = []int32{ + 11, // 0: users.GlobalUser.created_at:type_name -> google.protobuf.Timestamp + 11, // 1: users.GlobalUser.updated_at:type_name -> google.protobuf.Timestamp + 1, // 2: users.GlobalUser.linked_accounts:type_name -> users.LinkedAccount + 11, // 3: users.LinkedAccount.linked_at:type_name -> google.protobuf.Timestamp + 11, // 4: users.LinkedAccount.updated_at:type_name -> google.protobuf.Timestamp + 0, // 5: users.GetAllGlobalUsersResponse.users:type_name -> users.GlobalUser + 1, // 6: users.GetLinkedAccountsResponse.accounts:type_name -> users.LinkedAccount + 2, // 7: users.UsersService.CreateGlobalUser:input_type -> users.CreateGlobalUserRequest + 3, // 8: users.UsersService.GetGlobalUser:input_type -> users.GetGlobalUserRequest + 12, // 9: users.UsersService.GetAllGlobalUsers:input_type -> google.protobuf.Empty + 5, // 10: users.UsersService.UpdateDisplayName:input_type -> users.UpdateDisplayNameRequest + 6, // 11: users.UsersService.LinkAccount:input_type -> users.LinkAccountRequest + 7, // 12: users.UsersService.UnlinkAccount:input_type -> users.UnlinkAccountRequest + 8, // 13: users.UsersService.GetLinkedAccount:input_type -> users.GetLinkedAccountRequest + 9, // 14: users.UsersService.GetLinkedAccountsByPlatform:input_type -> users.GetLinkedAccountsByPlatformRequest + 0, // 15: users.UsersService.CreateGlobalUser:output_type -> users.GlobalUser + 0, // 16: users.UsersService.GetGlobalUser:output_type -> users.GlobalUser + 4, // 17: users.UsersService.GetAllGlobalUsers:output_type -> users.GetAllGlobalUsersResponse + 12, // 18: users.UsersService.UpdateDisplayName:output_type -> google.protobuf.Empty + 1, // 19: users.UsersService.LinkAccount:output_type -> users.LinkedAccount + 12, // 20: users.UsersService.UnlinkAccount:output_type -> google.protobuf.Empty + 1, // 21: users.UsersService.GetLinkedAccount:output_type -> users.LinkedAccount + 10, // 22: users.UsersService.GetLinkedAccountsByPlatform:output_type -> users.GetLinkedAccountsResponse + 15, // [15:23] is the sub-list for method output_type + 7, // [7:15] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_users_proto_init() } +func file_users_proto_init() { + if File_users_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_users_proto_rawDesc), len(file_users_proto_rawDesc)), + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_users_proto_goTypes, + DependencyIndexes: file_users_proto_depIdxs, + MessageInfos: file_users_proto_msgTypes, + }.Build() + File_users_proto = out.File + file_users_proto_goTypes = nil + file_users_proto_depIdxs = nil +} diff --git a/users.proto b/users.proto new file mode 100644 index 0000000..fa1db0e --- /dev/null +++ b/users.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; + +package users; + +option go_package = "git.be.kaien.ru/l-ai/l-ai-core-proto/proto"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +// UsersService manages global users and their linked platform accounts +service UsersService { + rpc CreateGlobalUser(CreateGlobalUserRequest) returns (GlobalUser); + rpc GetGlobalUser(GetGlobalUserRequest) returns (GlobalUser); + rpc GetAllGlobalUsers(google.protobuf.Empty) returns (GetAllGlobalUsersResponse); + rpc UpdateDisplayName(UpdateDisplayNameRequest) returns (google.protobuf.Empty); + + rpc LinkAccount(LinkAccountRequest) returns (LinkedAccount); + rpc UnlinkAccount(UnlinkAccountRequest) returns (google.protobuf.Empty); + rpc GetLinkedAccount(GetLinkedAccountRequest) returns (LinkedAccount); + rpc GetLinkedAccountsByPlatform(GetLinkedAccountsByPlatformRequest) returns (GetLinkedAccountsResponse); +} + +message GlobalUser { + int64 id = 1; + string display_name = 2; + google.protobuf.Timestamp created_at = 3; + google.protobuf.Timestamp updated_at = 4; + repeated LinkedAccount linked_accounts = 5; +} + +message LinkedAccount { + int64 id = 1; + int64 global_user_id = 2; + string platform = 3; + string account_id = 4; + string account_username = 5; + string account_url = 6; + google.protobuf.Timestamp linked_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +message CreateGlobalUserRequest { + string display_name = 1; +} + +message GetGlobalUserRequest { + int64 id = 1; +} + +message GetAllGlobalUsersResponse { + repeated GlobalUser users = 1; +} + +message UpdateDisplayNameRequest { + int64 id = 1; + string display_name = 2; +} + +message LinkAccountRequest { + int64 global_user_id = 1; + string platform = 2; + string account_id = 3; + string account_username = 4; + string account_url = 5; +} + +message UnlinkAccountRequest { + int64 global_user_id = 1; + string platform = 2; + string account_id = 3; +} + +message GetLinkedAccountRequest { + int64 global_user_id = 1; + string platform = 2; +} + +message GetLinkedAccountsByPlatformRequest { + string platform = 1; +} + +message GetLinkedAccountsResponse { + repeated LinkedAccount accounts = 1; +} diff --git a/users_grpc.pb.go b/users_grpc.pb.go new file mode 100644 index 0000000..18c6329 --- /dev/null +++ b/users_grpc.pb.go @@ -0,0 +1,392 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.1 +// - protoc v7.34.0 +// source: users.proto + +package proto + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + UsersService_CreateGlobalUser_FullMethodName = "/users.UsersService/CreateGlobalUser" + UsersService_GetGlobalUser_FullMethodName = "/users.UsersService/GetGlobalUser" + UsersService_GetAllGlobalUsers_FullMethodName = "/users.UsersService/GetAllGlobalUsers" + UsersService_UpdateDisplayName_FullMethodName = "/users.UsersService/UpdateDisplayName" + UsersService_LinkAccount_FullMethodName = "/users.UsersService/LinkAccount" + UsersService_UnlinkAccount_FullMethodName = "/users.UsersService/UnlinkAccount" + UsersService_GetLinkedAccount_FullMethodName = "/users.UsersService/GetLinkedAccount" + UsersService_GetLinkedAccountsByPlatform_FullMethodName = "/users.UsersService/GetLinkedAccountsByPlatform" +) + +// UsersServiceClient is the client API for UsersService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// UsersService manages global users and their linked platform accounts +type UsersServiceClient interface { + CreateGlobalUser(ctx context.Context, in *CreateGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error) + GetGlobalUser(ctx context.Context, in *GetGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error) + GetAllGlobalUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllGlobalUsersResponse, error) + UpdateDisplayName(ctx context.Context, in *UpdateDisplayNameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + LinkAccount(ctx context.Context, in *LinkAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error) + UnlinkAccount(ctx context.Context, in *UnlinkAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetLinkedAccount(ctx context.Context, in *GetLinkedAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error) + GetLinkedAccountsByPlatform(ctx context.Context, in *GetLinkedAccountsByPlatformRequest, opts ...grpc.CallOption) (*GetLinkedAccountsResponse, error) +} + +type usersServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUsersServiceClient(cc grpc.ClientConnInterface) UsersServiceClient { + return &usersServiceClient{cc} +} + +func (c *usersServiceClient) CreateGlobalUser(ctx context.Context, in *CreateGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GlobalUser) + err := c.cc.Invoke(ctx, UsersService_CreateGlobalUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) GetGlobalUser(ctx context.Context, in *GetGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GlobalUser) + err := c.cc.Invoke(ctx, UsersService_GetGlobalUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) GetAllGlobalUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllGlobalUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAllGlobalUsersResponse) + err := c.cc.Invoke(ctx, UsersService_GetAllGlobalUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) UpdateDisplayName(ctx context.Context, in *UpdateDisplayNameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UsersService_UpdateDisplayName_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) LinkAccount(ctx context.Context, in *LinkAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LinkedAccount) + err := c.cc.Invoke(ctx, UsersService_LinkAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) UnlinkAccount(ctx context.Context, in *UnlinkAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UsersService_UnlinkAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) GetLinkedAccount(ctx context.Context, in *GetLinkedAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LinkedAccount) + err := c.cc.Invoke(ctx, UsersService_GetLinkedAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) GetLinkedAccountsByPlatform(ctx context.Context, in *GetLinkedAccountsByPlatformRequest, opts ...grpc.CallOption) (*GetLinkedAccountsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLinkedAccountsResponse) + err := c.cc.Invoke(ctx, UsersService_GetLinkedAccountsByPlatform_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UsersServiceServer is the server API for UsersService service. +// All implementations must embed UnimplementedUsersServiceServer +// for forward compatibility. +// +// UsersService manages global users and their linked platform accounts +type UsersServiceServer interface { + CreateGlobalUser(context.Context, *CreateGlobalUserRequest) (*GlobalUser, error) + GetGlobalUser(context.Context, *GetGlobalUserRequest) (*GlobalUser, error) + GetAllGlobalUsers(context.Context, *emptypb.Empty) (*GetAllGlobalUsersResponse, error) + UpdateDisplayName(context.Context, *UpdateDisplayNameRequest) (*emptypb.Empty, error) + LinkAccount(context.Context, *LinkAccountRequest) (*LinkedAccount, error) + UnlinkAccount(context.Context, *UnlinkAccountRequest) (*emptypb.Empty, error) + GetLinkedAccount(context.Context, *GetLinkedAccountRequest) (*LinkedAccount, error) + GetLinkedAccountsByPlatform(context.Context, *GetLinkedAccountsByPlatformRequest) (*GetLinkedAccountsResponse, error) + mustEmbedUnimplementedUsersServiceServer() +} + +// UnimplementedUsersServiceServer 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 UnimplementedUsersServiceServer struct{} + +func (UnimplementedUsersServiceServer) CreateGlobalUser(context.Context, *CreateGlobalUserRequest) (*GlobalUser, error) { + return nil, status.Error(codes.Unimplemented, "method CreateGlobalUser not implemented") +} +func (UnimplementedUsersServiceServer) GetGlobalUser(context.Context, *GetGlobalUserRequest) (*GlobalUser, error) { + return nil, status.Error(codes.Unimplemented, "method GetGlobalUser not implemented") +} +func (UnimplementedUsersServiceServer) GetAllGlobalUsers(context.Context, *emptypb.Empty) (*GetAllGlobalUsersResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAllGlobalUsers not implemented") +} +func (UnimplementedUsersServiceServer) UpdateDisplayName(context.Context, *UpdateDisplayNameRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateDisplayName not implemented") +} +func (UnimplementedUsersServiceServer) LinkAccount(context.Context, *LinkAccountRequest) (*LinkedAccount, error) { + return nil, status.Error(codes.Unimplemented, "method LinkAccount not implemented") +} +func (UnimplementedUsersServiceServer) UnlinkAccount(context.Context, *UnlinkAccountRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method UnlinkAccount not implemented") +} +func (UnimplementedUsersServiceServer) GetLinkedAccount(context.Context, *GetLinkedAccountRequest) (*LinkedAccount, error) { + return nil, status.Error(codes.Unimplemented, "method GetLinkedAccount not implemented") +} +func (UnimplementedUsersServiceServer) GetLinkedAccountsByPlatform(context.Context, *GetLinkedAccountsByPlatformRequest) (*GetLinkedAccountsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetLinkedAccountsByPlatform not implemented") +} +func (UnimplementedUsersServiceServer) mustEmbedUnimplementedUsersServiceServer() {} +func (UnimplementedUsersServiceServer) testEmbeddedByValue() {} + +// UnsafeUsersServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UsersServiceServer will +// result in compilation errors. +type UnsafeUsersServiceServer interface { + mustEmbedUnimplementedUsersServiceServer() +} + +func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer) { + // If the following call panics, it indicates UnimplementedUsersServiceServer 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(&UsersService_ServiceDesc, srv) +} + +func _UsersService_CreateGlobalUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGlobalUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).CreateGlobalUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_CreateGlobalUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).CreateGlobalUser(ctx, req.(*CreateGlobalUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_GetGlobalUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGlobalUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).GetGlobalUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_GetGlobalUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).GetGlobalUser(ctx, req.(*GetGlobalUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_GetAllGlobalUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).GetAllGlobalUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_GetAllGlobalUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).GetAllGlobalUsers(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_UpdateDisplayName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDisplayNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).UpdateDisplayName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_UpdateDisplayName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).UpdateDisplayName(ctx, req.(*UpdateDisplayNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_LinkAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LinkAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).LinkAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_LinkAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).LinkAccount(ctx, req.(*LinkAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_UnlinkAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnlinkAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).UnlinkAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_UnlinkAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).UnlinkAccount(ctx, req.(*UnlinkAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_GetLinkedAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLinkedAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).GetLinkedAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_GetLinkedAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).GetLinkedAccount(ctx, req.(*GetLinkedAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_GetLinkedAccountsByPlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLinkedAccountsByPlatformRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).GetLinkedAccountsByPlatform(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_GetLinkedAccountsByPlatform_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).GetLinkedAccountsByPlatform(ctx, req.(*GetLinkedAccountsByPlatformRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UsersService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "users.UsersService", + HandlerType: (*UsersServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateGlobalUser", + Handler: _UsersService_CreateGlobalUser_Handler, + }, + { + MethodName: "GetGlobalUser", + Handler: _UsersService_GetGlobalUser_Handler, + }, + { + MethodName: "GetAllGlobalUsers", + Handler: _UsersService_GetAllGlobalUsers_Handler, + }, + { + MethodName: "UpdateDisplayName", + Handler: _UsersService_UpdateDisplayName_Handler, + }, + { + MethodName: "LinkAccount", + Handler: _UsersService_LinkAccount_Handler, + }, + { + MethodName: "UnlinkAccount", + Handler: _UsersService_UnlinkAccount_Handler, + }, + { + MethodName: "GetLinkedAccount", + Handler: _UsersService_GetLinkedAccount_Handler, + }, + { + MethodName: "GetLinkedAccountsByPlatform", + Handler: _UsersService_GetLinkedAccountsByPlatform_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "users.proto", +}