Compare commits
12 Commits
0f12ea6451
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5472083d6 | ||
|
|
c56ff16cde | ||
|
|
d32f0f2c77 | ||
|
|
04bfccb868 | ||
|
|
1ce76254e5 | ||
|
|
2733943488 | ||
|
|
e1ca345e38 | ||
|
|
cbc5dd3551 | ||
|
|
ae86764d43 | ||
|
|
5847a6e560 | ||
|
|
28f8834c7b | ||
|
|
d6f8906f22 |
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: admin/admin-account.proto
|
// source: admin/admin-account.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: admin/audit.proto
|
// source: admin/audit.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: admin/rbac.proto
|
// source: admin/rbac.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: chat/chat.proto
|
// source: chat/chat.proto
|
||||||
|
|
||||||
@@ -173,6 +173,15 @@ export interface MarkAsReadResponse {
|
|||||||
success: boolean;
|
success: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CheckChatMembershipRequest {
|
||||||
|
userId: string;
|
||||||
|
chatId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CheckChatMembershipResponse {
|
||||||
|
isMember: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export const CHAT_V1_PACKAGE_NAME = "chat.v1";
|
export const CHAT_V1_PACKAGE_NAME = "chat.v1";
|
||||||
|
|
||||||
export interface ChatServiceClient {
|
export interface ChatServiceClient {
|
||||||
@@ -215,6 +224,11 @@ export interface ChatServiceClient {
|
|||||||
/** Статусы */
|
/** Статусы */
|
||||||
|
|
||||||
markAsRead(request: MarkAsReadRequest, metadata?: Metadata): Observable<MarkAsReadResponse>;
|
markAsRead(request: MarkAsReadRequest, metadata?: Metadata): Observable<MarkAsReadResponse>;
|
||||||
|
|
||||||
|
checkChatMembership(
|
||||||
|
request: CheckChatMembershipRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Observable<CheckChatMembershipResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ChatServiceController {
|
export interface ChatServiceController {
|
||||||
@@ -293,6 +307,11 @@ export interface ChatServiceController {
|
|||||||
request: MarkAsReadRequest,
|
request: MarkAsReadRequest,
|
||||||
metadata?: Metadata,
|
metadata?: Metadata,
|
||||||
): Promise<MarkAsReadResponse> | Observable<MarkAsReadResponse> | MarkAsReadResponse;
|
): Promise<MarkAsReadResponse> | Observable<MarkAsReadResponse> | MarkAsReadResponse;
|
||||||
|
|
||||||
|
checkChatMembership(
|
||||||
|
request: CheckChatMembershipRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<CheckChatMembershipResponse> | Observable<CheckChatMembershipResponse> | CheckChatMembershipResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ChatServiceControllerMethods() {
|
export function ChatServiceControllerMethods() {
|
||||||
@@ -310,6 +329,7 @@ export function ChatServiceControllerMethods() {
|
|||||||
"editMessage",
|
"editMessage",
|
||||||
"deleteMessage",
|
"deleteMessage",
|
||||||
"markAsRead",
|
"markAsRead",
|
||||||
|
"checkChatMembership",
|
||||||
];
|
];
|
||||||
for (const method of grpcMethods) {
|
for (const method of grpcMethods) {
|
||||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
|||||||
@@ -1474,6 +1474,102 @@ func (x *MarkAsReadResponse) GetSuccess() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CheckChatMembershipRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
ChatId string `protobuf:"bytes,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipRequest) Reset() {
|
||||||
|
*x = CheckChatMembershipRequest{}
|
||||||
|
mi := &file_chat_chat_proto_msgTypes[25]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CheckChatMembershipRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_chat_chat_proto_msgTypes[25]
|
||||||
|
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 CheckChatMembershipRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CheckChatMembershipRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_chat_chat_proto_rawDescGZIP(), []int{25}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipRequest) GetChatId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ChatId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type CheckChatMembershipResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
IsMember bool `protobuf:"varint,1,opt,name=is_member,json=isMember,proto3" json:"is_member,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipResponse) Reset() {
|
||||||
|
*x = CheckChatMembershipResponse{}
|
||||||
|
mi := &file_chat_chat_proto_msgTypes[26]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CheckChatMembershipResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_chat_chat_proto_msgTypes[26]
|
||||||
|
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 CheckChatMembershipResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CheckChatMembershipResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_chat_chat_proto_rawDescGZIP(), []int{26}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CheckChatMembershipResponse) GetIsMember() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.IsMember
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
var File_chat_chat_proto protoreflect.FileDescriptor
|
var File_chat_chat_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_chat_chat_proto_rawDesc = "" +
|
const file_chat_chat_proto_rawDesc = "" +
|
||||||
@@ -1581,7 +1677,12 @@ const file_chat_chat_proto_rawDesc = "" +
|
|||||||
"\n" +
|
"\n" +
|
||||||
"message_id\x18\x03 \x01(\tR\tmessageId\".\n" +
|
"message_id\x18\x03 \x01(\tR\tmessageId\".\n" +
|
||||||
"\x12MarkAsReadResponse\x12\x18\n" +
|
"\x12MarkAsReadResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess2\xea\x06\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\"N\n" +
|
||||||
|
"\x1aCheckChatMembershipRequest\x12\x17\n" +
|
||||||
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x17\n" +
|
||||||
|
"\achat_id\x18\x02 \x01(\tR\x06chatId\":\n" +
|
||||||
|
"\x1bCheckChatMembershipResponse\x12\x1b\n" +
|
||||||
|
"\tis_member\x18\x01 \x01(\bR\bisMember2\xcc\a\n" +
|
||||||
"\vChatService\x12E\n" +
|
"\vChatService\x12E\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"CreateChat\x12\x1a.chat.v1.CreateChatRequest\x1a\x1b.chat.v1.CreateChatResponse\x12K\n" +
|
"CreateChat\x12\x1a.chat.v1.CreateChatRequest\x1a\x1b.chat.v1.CreateChatResponse\x12K\n" +
|
||||||
@@ -1596,7 +1697,8 @@ const file_chat_chat_proto_rawDesc = "" +
|
|||||||
"\vEditMessage\x12\x1b.chat.v1.EditMessageRequest\x1a\x13.chat.v1.MessageDto\x12N\n" +
|
"\vEditMessage\x12\x1b.chat.v1.EditMessageRequest\x1a\x13.chat.v1.MessageDto\x12N\n" +
|
||||||
"\rDeleteMessage\x12\x1d.chat.v1.DeleteMessageRequest\x1a\x1e.chat.v1.DeleteMessageResponse\x12E\n" +
|
"\rDeleteMessage\x12\x1d.chat.v1.DeleteMessageRequest\x1a\x1e.chat.v1.DeleteMessageResponse\x12E\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"MarkAsRead\x12\x1a.chat.v1.MarkAsReadRequest\x1a\x1b.chat.v1.MarkAsReadResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
"MarkAsRead\x12\x1a.chat.v1.MarkAsReadRequest\x1a\x1b.chat.v1.MarkAsReadResponse\x12`\n" +
|
||||||
|
"\x13CheckChatMembership\x12#.chat.v1.CheckChatMembershipRequest\x1a$.chat.v1.CheckChatMembershipResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_chat_chat_proto_rawDescOnce sync.Once
|
file_chat_chat_proto_rawDescOnce sync.Once
|
||||||
@@ -1610,7 +1712,7 @@ func file_chat_chat_proto_rawDescGZIP() []byte {
|
|||||||
return file_chat_chat_proto_rawDescData
|
return file_chat_chat_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
|
var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
|
||||||
var file_chat_chat_proto_goTypes = []any{
|
var file_chat_chat_proto_goTypes = []any{
|
||||||
(*MessageDto)(nil), // 0: chat.v1.MessageDto
|
(*MessageDto)(nil), // 0: chat.v1.MessageDto
|
||||||
(*ChatMemberDto)(nil), // 1: chat.v1.ChatMemberDto
|
(*ChatMemberDto)(nil), // 1: chat.v1.ChatMemberDto
|
||||||
@@ -1637,6 +1739,8 @@ var file_chat_chat_proto_goTypes = []any{
|
|||||||
(*DeleteMessageResponse)(nil), // 22: chat.v1.DeleteMessageResponse
|
(*DeleteMessageResponse)(nil), // 22: chat.v1.DeleteMessageResponse
|
||||||
(*MarkAsReadRequest)(nil), // 23: chat.v1.MarkAsReadRequest
|
(*MarkAsReadRequest)(nil), // 23: chat.v1.MarkAsReadRequest
|
||||||
(*MarkAsReadResponse)(nil), // 24: chat.v1.MarkAsReadResponse
|
(*MarkAsReadResponse)(nil), // 24: chat.v1.MarkAsReadResponse
|
||||||
|
(*CheckChatMembershipRequest)(nil), // 25: chat.v1.CheckChatMembershipRequest
|
||||||
|
(*CheckChatMembershipResponse)(nil), // 26: chat.v1.CheckChatMembershipResponse
|
||||||
}
|
}
|
||||||
var file_chat_chat_proto_depIdxs = []int32{
|
var file_chat_chat_proto_depIdxs = []int32{
|
||||||
0, // 0: chat.v1.ChatDto.last_message:type_name -> chat.v1.MessageDto
|
0, // 0: chat.v1.ChatDto.last_message:type_name -> chat.v1.MessageDto
|
||||||
@@ -1657,20 +1761,22 @@ var file_chat_chat_proto_depIdxs = []int32{
|
|||||||
20, // 15: chat.v1.ChatService.EditMessage:input_type -> chat.v1.EditMessageRequest
|
20, // 15: chat.v1.ChatService.EditMessage:input_type -> chat.v1.EditMessageRequest
|
||||||
21, // 16: chat.v1.ChatService.DeleteMessage:input_type -> chat.v1.DeleteMessageRequest
|
21, // 16: chat.v1.ChatService.DeleteMessage:input_type -> chat.v1.DeleteMessageRequest
|
||||||
23, // 17: chat.v1.ChatService.MarkAsRead:input_type -> chat.v1.MarkAsReadRequest
|
23, // 17: chat.v1.ChatService.MarkAsRead:input_type -> chat.v1.MarkAsReadRequest
|
||||||
4, // 18: chat.v1.ChatService.CreateChat:output_type -> chat.v1.CreateChatResponse
|
25, // 18: chat.v1.ChatService.CheckChatMembership:input_type -> chat.v1.CheckChatMembershipRequest
|
||||||
6, // 19: chat.v1.ChatService.GetUserChats:output_type -> chat.v1.GetUserChatsResponse
|
4, // 19: chat.v1.ChatService.CreateChat:output_type -> chat.v1.CreateChatResponse
|
||||||
8, // 20: chat.v1.ChatService.GetChatDetails:output_type -> chat.v1.GetChatDetailsResponse
|
6, // 20: chat.v1.ChatService.GetUserChats:output_type -> chat.v1.GetUserChatsResponse
|
||||||
10, // 21: chat.v1.ChatService.JoinChat:output_type -> chat.v1.JoinChatResponse
|
8, // 21: chat.v1.ChatService.GetChatDetails:output_type -> chat.v1.GetChatDetailsResponse
|
||||||
12, // 22: chat.v1.ChatService.LeaveChat:output_type -> chat.v1.LeaveChatResponse
|
10, // 22: chat.v1.ChatService.JoinChat:output_type -> chat.v1.JoinChatResponse
|
||||||
14, // 23: chat.v1.ChatService.RemoveMember:output_type -> chat.v1.RemoveMemberResponse
|
12, // 23: chat.v1.ChatService.LeaveChat:output_type -> chat.v1.LeaveChatResponse
|
||||||
16, // 24: chat.v1.ChatService.MuteChat:output_type -> chat.v1.MuteChatResponse
|
14, // 24: chat.v1.ChatService.RemoveMember:output_type -> chat.v1.RemoveMemberResponse
|
||||||
18, // 25: chat.v1.ChatService.GetMessages:output_type -> chat.v1.GetMessagesResponse
|
16, // 25: chat.v1.ChatService.MuteChat:output_type -> chat.v1.MuteChatResponse
|
||||||
0, // 26: chat.v1.ChatService.SendMessage:output_type -> chat.v1.MessageDto
|
18, // 26: chat.v1.ChatService.GetMessages:output_type -> chat.v1.GetMessagesResponse
|
||||||
0, // 27: chat.v1.ChatService.EditMessage:output_type -> chat.v1.MessageDto
|
0, // 27: chat.v1.ChatService.SendMessage:output_type -> chat.v1.MessageDto
|
||||||
22, // 28: chat.v1.ChatService.DeleteMessage:output_type -> chat.v1.DeleteMessageResponse
|
0, // 28: chat.v1.ChatService.EditMessage:output_type -> chat.v1.MessageDto
|
||||||
24, // 29: chat.v1.ChatService.MarkAsRead:output_type -> chat.v1.MarkAsReadResponse
|
22, // 29: chat.v1.ChatService.DeleteMessage:output_type -> chat.v1.DeleteMessageResponse
|
||||||
18, // [18:30] is the sub-list for method output_type
|
24, // 30: chat.v1.ChatService.MarkAsRead:output_type -> chat.v1.MarkAsReadResponse
|
||||||
6, // [6:18] is the sub-list for method input_type
|
26, // 31: chat.v1.ChatService.CheckChatMembership:output_type -> chat.v1.CheckChatMembershipResponse
|
||||||
|
19, // [19:32] is the sub-list for method output_type
|
||||||
|
6, // [6:19] is the sub-list for method input_type
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
6, // [6:6] is the sub-list for extension type_name
|
||||||
6, // [6:6] is the sub-list for extension extendee
|
6, // [6:6] is the sub-list for extension extendee
|
||||||
0, // [0:6] is the sub-list for field type_name
|
0, // [0:6] is the sub-list for field type_name
|
||||||
@@ -1687,7 +1793,7 @@ func file_chat_chat_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_chat_chat_proto_rawDesc), len(file_chat_chat_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_chat_chat_proto_rawDesc), len(file_chat_chat_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 25,
|
NumMessages: 27,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const (
|
|||||||
ChatService_EditMessage_FullMethodName = "/chat.v1.ChatService/EditMessage"
|
ChatService_EditMessage_FullMethodName = "/chat.v1.ChatService/EditMessage"
|
||||||
ChatService_DeleteMessage_FullMethodName = "/chat.v1.ChatService/DeleteMessage"
|
ChatService_DeleteMessage_FullMethodName = "/chat.v1.ChatService/DeleteMessage"
|
||||||
ChatService_MarkAsRead_FullMethodName = "/chat.v1.ChatService/MarkAsRead"
|
ChatService_MarkAsRead_FullMethodName = "/chat.v1.ChatService/MarkAsRead"
|
||||||
|
ChatService_CheckChatMembership_FullMethodName = "/chat.v1.ChatService/CheckChatMembership"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ChatServiceClient is the client API for ChatService service.
|
// ChatServiceClient is the client API for ChatService service.
|
||||||
@@ -53,6 +54,7 @@ type ChatServiceClient interface {
|
|||||||
DeleteMessage(ctx context.Context, in *DeleteMessageRequest, opts ...grpc.CallOption) (*DeleteMessageResponse, error)
|
DeleteMessage(ctx context.Context, in *DeleteMessageRequest, opts ...grpc.CallOption) (*DeleteMessageResponse, error)
|
||||||
// Статусы
|
// Статусы
|
||||||
MarkAsRead(ctx context.Context, in *MarkAsReadRequest, opts ...grpc.CallOption) (*MarkAsReadResponse, error)
|
MarkAsRead(ctx context.Context, in *MarkAsReadRequest, opts ...grpc.CallOption) (*MarkAsReadResponse, error)
|
||||||
|
CheckChatMembership(ctx context.Context, in *CheckChatMembershipRequest, opts ...grpc.CallOption) (*CheckChatMembershipResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type chatServiceClient struct {
|
type chatServiceClient struct {
|
||||||
@@ -183,6 +185,16 @@ func (c *chatServiceClient) MarkAsRead(ctx context.Context, in *MarkAsReadReques
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *chatServiceClient) CheckChatMembership(ctx context.Context, in *CheckChatMembershipRequest, opts ...grpc.CallOption) (*CheckChatMembershipResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(CheckChatMembershipResponse)
|
||||||
|
err := c.cc.Invoke(ctx, ChatService_CheckChatMembership_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// ChatServiceServer is the server API for ChatService service.
|
// ChatServiceServer is the server API for ChatService service.
|
||||||
// All implementations must embed UnimplementedChatServiceServer
|
// All implementations must embed UnimplementedChatServiceServer
|
||||||
// for forward compatibility.
|
// for forward compatibility.
|
||||||
@@ -203,6 +215,7 @@ type ChatServiceServer interface {
|
|||||||
DeleteMessage(context.Context, *DeleteMessageRequest) (*DeleteMessageResponse, error)
|
DeleteMessage(context.Context, *DeleteMessageRequest) (*DeleteMessageResponse, error)
|
||||||
// Статусы
|
// Статусы
|
||||||
MarkAsRead(context.Context, *MarkAsReadRequest) (*MarkAsReadResponse, error)
|
MarkAsRead(context.Context, *MarkAsReadRequest) (*MarkAsReadResponse, error)
|
||||||
|
CheckChatMembership(context.Context, *CheckChatMembershipRequest) (*CheckChatMembershipResponse, error)
|
||||||
mustEmbedUnimplementedChatServiceServer()
|
mustEmbedUnimplementedChatServiceServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,6 +262,9 @@ func (UnimplementedChatServiceServer) DeleteMessage(context.Context, *DeleteMess
|
|||||||
func (UnimplementedChatServiceServer) MarkAsRead(context.Context, *MarkAsReadRequest) (*MarkAsReadResponse, error) {
|
func (UnimplementedChatServiceServer) MarkAsRead(context.Context, *MarkAsReadRequest) (*MarkAsReadResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method MarkAsRead not implemented")
|
return nil, status.Error(codes.Unimplemented, "method MarkAsRead not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedChatServiceServer) CheckChatMembership(context.Context, *CheckChatMembershipRequest) (*CheckChatMembershipResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method CheckChatMembership not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedChatServiceServer) mustEmbedUnimplementedChatServiceServer() {}
|
func (UnimplementedChatServiceServer) mustEmbedUnimplementedChatServiceServer() {}
|
||||||
func (UnimplementedChatServiceServer) testEmbeddedByValue() {}
|
func (UnimplementedChatServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
@@ -486,6 +502,24 @@ func _ChatService_MarkAsRead_Handler(srv interface{}, ctx context.Context, dec f
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _ChatService_CheckChatMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CheckChatMembershipRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ChatServiceServer).CheckChatMembership(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ChatService_CheckChatMembership_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ChatServiceServer).CheckChatMembership(ctx, req.(*CheckChatMembershipRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// ChatService_ServiceDesc is the grpc.ServiceDesc for ChatService service.
|
// ChatService_ServiceDesc is the grpc.ServiceDesc for ChatService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@@ -541,6 +575,10 @@ var ChatService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "MarkAsRead",
|
MethodName: "MarkAsRead",
|
||||||
Handler: _ChatService_MarkAsRead_Handler,
|
Handler: _ChatService_MarkAsRead_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CheckChatMembership",
|
||||||
|
Handler: _ChatService_CheckChatMembership_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "chat/chat.proto",
|
Metadata: "chat/chat.proto",
|
||||||
|
|||||||
308
gen/go/media/media.pb.go
Normal file
308
gen/go/media/media.pb.go
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
// contracts/proto/media/v1/media.proto
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.36.11
|
||||||
|
// protoc v4.25.9
|
||||||
|
// source: media/media.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
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 UploadRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
|
||||||
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Сами байты файла
|
||||||
|
Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` // "avatar", "chat", "raw"
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadRequest) Reset() {
|
||||||
|
*x = UploadRequest{}
|
||||||
|
mi := &file_media_media_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UploadRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UploadRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_media_media_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 UploadRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UploadRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_media_media_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadRequest) GetFileName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.FileName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadRequest) GetData() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadRequest) GetMode() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Mode
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type UploadResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
|
||||||
|
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadResponse) Reset() {
|
||||||
|
*x = UploadResponse{}
|
||||||
|
mi := &file_media_media_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UploadResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UploadResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_media_media_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 UploadResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UploadResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_media_media_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadResponse) GetFileName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.FileName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UploadResponse) GetSize() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Size
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPresignedUrlRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
|
||||||
|
IsPublic bool `protobuf:"varint,2,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"` // Если true, ссылка живет 24 часа, иначе 2 минуты
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlRequest) Reset() {
|
||||||
|
*x = GetPresignedUrlRequest{}
|
||||||
|
mi := &file_media_media_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPresignedUrlRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_media_media_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 GetPresignedUrlRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPresignedUrlRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_media_media_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlRequest) GetFileName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.FileName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlRequest) GetIsPublic() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.IsPublic
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPresignedUrlResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlResponse) Reset() {
|
||||||
|
*x = GetPresignedUrlResponse{}
|
||||||
|
mi := &file_media_media_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPresignedUrlResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_media_media_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 GetPresignedUrlResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPresignedUrlResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_media_media_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPresignedUrlResponse) GetUrl() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Url
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_media_media_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
const file_media_media_proto_rawDesc = "" +
|
||||||
|
"\n" +
|
||||||
|
"\x11media/media.proto\x12\bmedia.v1\"T\n" +
|
||||||
|
"\rUploadRequest\x12\x1b\n" +
|
||||||
|
"\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x12\n" +
|
||||||
|
"\x04data\x18\x02 \x01(\fR\x04data\x12\x12\n" +
|
||||||
|
"\x04mode\x18\x03 \x01(\tR\x04mode\"A\n" +
|
||||||
|
"\x0eUploadResponse\x12\x1b\n" +
|
||||||
|
"\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x12\n" +
|
||||||
|
"\x04size\x18\x02 \x01(\x03R\x04size\"R\n" +
|
||||||
|
"\x16GetPresignedUrlRequest\x12\x1b\n" +
|
||||||
|
"\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x1b\n" +
|
||||||
|
"\tis_public\x18\x02 \x01(\bR\bisPublic\"+\n" +
|
||||||
|
"\x17GetPresignedUrlResponse\x12\x10\n" +
|
||||||
|
"\x03url\x18\x01 \x01(\tR\x03url2\xa3\x01\n" +
|
||||||
|
"\fMediaService\x12;\n" +
|
||||||
|
"\x06Upload\x12\x17.media.v1.UploadRequest\x1a\x18.media.v1.UploadResponse\x12V\n" +
|
||||||
|
"\x0fGetPresignedUrl\x12 .media.v1.GetPresignedUrlRequest\x1a!.media.v1.GetPresignedUrlResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_media_media_proto_rawDescOnce sync.Once
|
||||||
|
file_media_media_proto_rawDescData []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_media_media_proto_rawDescGZIP() []byte {
|
||||||
|
file_media_media_proto_rawDescOnce.Do(func() {
|
||||||
|
file_media_media_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_media_media_proto_rawDesc), len(file_media_media_proto_rawDesc)))
|
||||||
|
})
|
||||||
|
return file_media_media_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_media_media_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||||
|
var file_media_media_proto_goTypes = []any{
|
||||||
|
(*UploadRequest)(nil), // 0: media.v1.UploadRequest
|
||||||
|
(*UploadResponse)(nil), // 1: media.v1.UploadResponse
|
||||||
|
(*GetPresignedUrlRequest)(nil), // 2: media.v1.GetPresignedUrlRequest
|
||||||
|
(*GetPresignedUrlResponse)(nil), // 3: media.v1.GetPresignedUrlResponse
|
||||||
|
}
|
||||||
|
var file_media_media_proto_depIdxs = []int32{
|
||||||
|
0, // 0: media.v1.MediaService.Upload:input_type -> media.v1.UploadRequest
|
||||||
|
2, // 1: media.v1.MediaService.GetPresignedUrl:input_type -> media.v1.GetPresignedUrlRequest
|
||||||
|
1, // 2: media.v1.MediaService.Upload:output_type -> media.v1.UploadResponse
|
||||||
|
3, // 3: media.v1.MediaService.GetPresignedUrl:output_type -> media.v1.GetPresignedUrlResponse
|
||||||
|
2, // [2:4] is the sub-list for method output_type
|
||||||
|
0, // [0:2] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_media_media_proto_init() }
|
||||||
|
func file_media_media_proto_init() {
|
||||||
|
if File_media_media_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_media_media_proto_rawDesc), len(file_media_media_proto_rawDesc)),
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 4,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_media_media_proto_goTypes,
|
||||||
|
DependencyIndexes: file_media_media_proto_depIdxs,
|
||||||
|
MessageInfos: file_media_media_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_media_media_proto = out.File
|
||||||
|
file_media_media_proto_goTypes = nil
|
||||||
|
file_media_media_proto_depIdxs = nil
|
||||||
|
}
|
||||||
165
gen/go/media/media_grpc.pb.go
Normal file
165
gen/go/media/media_grpc.pb.go
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
// contracts/proto/media/v1/media.proto
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc v4.25.9
|
||||||
|
// source: media/media.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 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 (
|
||||||
|
MediaService_Upload_FullMethodName = "/media.v1.MediaService/Upload"
|
||||||
|
MediaService_GetPresignedUrl_FullMethodName = "/media.v1.MediaService/GetPresignedUrl"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MediaServiceClient is the client API for MediaService 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.
|
||||||
|
type MediaServiceClient interface {
|
||||||
|
// Загрузка файла
|
||||||
|
Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error)
|
||||||
|
// Генерация временной ссылки для скачивания/просмотра
|
||||||
|
GetPresignedUrl(ctx context.Context, in *GetPresignedUrlRequest, opts ...grpc.CallOption) (*GetPresignedUrlResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type mediaServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMediaServiceClient(cc grpc.ClientConnInterface) MediaServiceClient {
|
||||||
|
return &mediaServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *mediaServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(UploadResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MediaService_Upload_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *mediaServiceClient) GetPresignedUrl(ctx context.Context, in *GetPresignedUrlRequest, opts ...grpc.CallOption) (*GetPresignedUrlResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetPresignedUrlResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MediaService_GetPresignedUrl_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MediaServiceServer is the server API for MediaService service.
|
||||||
|
// All implementations must embed UnimplementedMediaServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type MediaServiceServer interface {
|
||||||
|
// Загрузка файла
|
||||||
|
Upload(context.Context, *UploadRequest) (*UploadResponse, error)
|
||||||
|
// Генерация временной ссылки для скачивания/просмотра
|
||||||
|
GetPresignedUrl(context.Context, *GetPresignedUrlRequest) (*GetPresignedUrlResponse, error)
|
||||||
|
mustEmbedUnimplementedMediaServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMediaServiceServer 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 UnimplementedMediaServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedMediaServiceServer) Upload(context.Context, *UploadRequest) (*UploadResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method Upload not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMediaServiceServer) GetPresignedUrl(context.Context, *GetPresignedUrlRequest) (*GetPresignedUrlResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetPresignedUrl not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMediaServiceServer) mustEmbedUnimplementedMediaServiceServer() {}
|
||||||
|
func (UnimplementedMediaServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeMediaServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MediaServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMediaServiceServer interface {
|
||||||
|
mustEmbedUnimplementedMediaServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMediaServiceServer(s grpc.ServiceRegistrar, srv MediaServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedMediaServiceServer 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(&MediaService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MediaService_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UploadRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MediaServiceServer).Upload(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MediaService_Upload_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MediaServiceServer).Upload(ctx, req.(*UploadRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MediaService_GetPresignedUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetPresignedUrlRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MediaServiceServer).GetPresignedUrl(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MediaService_GetPresignedUrl_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MediaServiceServer).GetPresignedUrl(ctx, req.(*GetPresignedUrlRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MediaService_ServiceDesc is the grpc.ServiceDesc for MediaService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var MediaService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "media.v1.MediaService",
|
||||||
|
HandlerType: (*MediaServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Upload",
|
||||||
|
Handler: _MediaService_Upload_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetPresignedUrl",
|
||||||
|
Handler: _MediaService_GetPresignedUrl_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "media/media.proto",
|
||||||
|
}
|
||||||
@@ -913,206 +913,6 @@ func (x *TerminateSessionResponse) GetMessage() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type GenerateOauthCodeRequest struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeRequest) Reset() {
|
|
||||||
*x = GenerateOauthCodeRequest{}
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[15]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeRequest) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*GenerateOauthCodeRequest) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeRequest) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[15]
|
|
||||||
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 GenerateOauthCodeRequest.ProtoReflect.Descriptor instead.
|
|
||||||
func (*GenerateOauthCodeRequest) Descriptor() ([]byte, []int) {
|
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{15}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeRequest) GetUserId() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.UserId
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type GenerateOauthCodeResponse struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeResponse) Reset() {
|
|
||||||
*x = GenerateOauthCodeResponse{}
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[16]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeResponse) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*GenerateOauthCodeResponse) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeResponse) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[16]
|
|
||||||
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 GenerateOauthCodeResponse.ProtoReflect.Descriptor instead.
|
|
||||||
func (*GenerateOauthCodeResponse) Descriptor() ([]byte, []int) {
|
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{16}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GenerateOauthCodeResponse) GetCode() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Code
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type ExchangeOauthCodeRequest struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
|
||||||
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
|
||||||
ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeRequest) Reset() {
|
|
||||||
*x = ExchangeOauthCodeRequest{}
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[17]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeRequest) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*ExchangeOauthCodeRequest) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeRequest) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[17]
|
|
||||||
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 ExchangeOauthCodeRequest.ProtoReflect.Descriptor instead.
|
|
||||||
func (*ExchangeOauthCodeRequest) Descriptor() ([]byte, []int) {
|
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{17}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeRequest) GetCode() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Code
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeRequest) GetClientId() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.ClientId
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeRequest) GetClientSecret() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.ClientSecret
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type ExchangeOauthCodeResponse struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
|
||||||
ExpiresIn int32 `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeResponse) Reset() {
|
|
||||||
*x = ExchangeOauthCodeResponse{}
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[18]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeResponse) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*ExchangeOauthCodeResponse) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeResponse) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_sso_auth_proto_msgTypes[18]
|
|
||||||
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 ExchangeOauthCodeResponse.ProtoReflect.Descriptor instead.
|
|
||||||
func (*ExchangeOauthCodeResponse) Descriptor() ([]byte, []int) {
|
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{18}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeResponse) GetAccessToken() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.AccessToken
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ExchangeOauthCodeResponse) GetExpiresIn() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.ExpiresIn
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type SystemCreateAccountRequest struct {
|
type SystemCreateAccountRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
||||||
@@ -1124,7 +924,7 @@ type SystemCreateAccountRequest struct {
|
|||||||
|
|
||||||
func (x *SystemCreateAccountRequest) Reset() {
|
func (x *SystemCreateAccountRequest) Reset() {
|
||||||
*x = SystemCreateAccountRequest{}
|
*x = SystemCreateAccountRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[19]
|
mi := &file_sso_auth_proto_msgTypes[15]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1136,7 +936,7 @@ func (x *SystemCreateAccountRequest) String() string {
|
|||||||
func (*SystemCreateAccountRequest) ProtoMessage() {}
|
func (*SystemCreateAccountRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemCreateAccountRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemCreateAccountRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[19]
|
mi := &file_sso_auth_proto_msgTypes[15]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1149,7 +949,7 @@ func (x *SystemCreateAccountRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemCreateAccountRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemCreateAccountRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemCreateAccountRequest) Descriptor() ([]byte, []int) {
|
func (*SystemCreateAccountRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{19}
|
return file_sso_auth_proto_rawDescGZIP(), []int{15}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemCreateAccountRequest) GetUsername() string {
|
func (x *SystemCreateAccountRequest) GetUsername() string {
|
||||||
@@ -1182,7 +982,7 @@ type SystemCreateAccountResponse struct {
|
|||||||
|
|
||||||
func (x *SystemCreateAccountResponse) Reset() {
|
func (x *SystemCreateAccountResponse) Reset() {
|
||||||
*x = SystemCreateAccountResponse{}
|
*x = SystemCreateAccountResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[20]
|
mi := &file_sso_auth_proto_msgTypes[16]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1194,7 +994,7 @@ func (x *SystemCreateAccountResponse) String() string {
|
|||||||
func (*SystemCreateAccountResponse) ProtoMessage() {}
|
func (*SystemCreateAccountResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemCreateAccountResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemCreateAccountResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[20]
|
mi := &file_sso_auth_proto_msgTypes[16]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1207,7 +1007,7 @@ func (x *SystemCreateAccountResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemCreateAccountResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemCreateAccountResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemCreateAccountResponse) Descriptor() ([]byte, []int) {
|
func (*SystemCreateAccountResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{20}
|
return file_sso_auth_proto_rawDescGZIP(), []int{16}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemCreateAccountResponse) GetAccountId() string {
|
func (x *SystemCreateAccountResponse) GetAccountId() string {
|
||||||
@@ -1227,7 +1027,7 @@ type SystemChangeStatusRequest struct {
|
|||||||
|
|
||||||
func (x *SystemChangeStatusRequest) Reset() {
|
func (x *SystemChangeStatusRequest) Reset() {
|
||||||
*x = SystemChangeStatusRequest{}
|
*x = SystemChangeStatusRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[21]
|
mi := &file_sso_auth_proto_msgTypes[17]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1239,7 +1039,7 @@ func (x *SystemChangeStatusRequest) String() string {
|
|||||||
func (*SystemChangeStatusRequest) ProtoMessage() {}
|
func (*SystemChangeStatusRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemChangeStatusRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemChangeStatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[21]
|
mi := &file_sso_auth_proto_msgTypes[17]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1252,7 +1052,7 @@ func (x *SystemChangeStatusRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemChangeStatusRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemChangeStatusRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemChangeStatusRequest) Descriptor() ([]byte, []int) {
|
func (*SystemChangeStatusRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{21}
|
return file_sso_auth_proto_rawDescGZIP(), []int{17}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemChangeStatusRequest) GetAccountId() string {
|
func (x *SystemChangeStatusRequest) GetAccountId() string {
|
||||||
@@ -1278,7 +1078,7 @@ type SystemChangeStatusResponse struct {
|
|||||||
|
|
||||||
func (x *SystemChangeStatusResponse) Reset() {
|
func (x *SystemChangeStatusResponse) Reset() {
|
||||||
*x = SystemChangeStatusResponse{}
|
*x = SystemChangeStatusResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[22]
|
mi := &file_sso_auth_proto_msgTypes[18]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1290,7 +1090,7 @@ func (x *SystemChangeStatusResponse) String() string {
|
|||||||
func (*SystemChangeStatusResponse) ProtoMessage() {}
|
func (*SystemChangeStatusResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemChangeStatusResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemChangeStatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[22]
|
mi := &file_sso_auth_proto_msgTypes[18]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1303,7 +1103,7 @@ func (x *SystemChangeStatusResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemChangeStatusResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemChangeStatusResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemChangeStatusResponse) Descriptor() ([]byte, []int) {
|
func (*SystemChangeStatusResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{22}
|
return file_sso_auth_proto_rawDescGZIP(), []int{18}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemChangeStatusResponse) GetSuccess() bool {
|
func (x *SystemChangeStatusResponse) GetSuccess() bool {
|
||||||
@@ -1323,7 +1123,7 @@ type SystemUpdatePasswordRequest struct {
|
|||||||
|
|
||||||
func (x *SystemUpdatePasswordRequest) Reset() {
|
func (x *SystemUpdatePasswordRequest) Reset() {
|
||||||
*x = SystemUpdatePasswordRequest{}
|
*x = SystemUpdatePasswordRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[23]
|
mi := &file_sso_auth_proto_msgTypes[19]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1335,7 +1135,7 @@ func (x *SystemUpdatePasswordRequest) String() string {
|
|||||||
func (*SystemUpdatePasswordRequest) ProtoMessage() {}
|
func (*SystemUpdatePasswordRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemUpdatePasswordRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemUpdatePasswordRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[23]
|
mi := &file_sso_auth_proto_msgTypes[19]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1348,7 +1148,7 @@ func (x *SystemUpdatePasswordRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemUpdatePasswordRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemUpdatePasswordRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemUpdatePasswordRequest) Descriptor() ([]byte, []int) {
|
func (*SystemUpdatePasswordRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{23}
|
return file_sso_auth_proto_rawDescGZIP(), []int{19}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemUpdatePasswordRequest) GetAccountId() string {
|
func (x *SystemUpdatePasswordRequest) GetAccountId() string {
|
||||||
@@ -1374,7 +1174,7 @@ type SystemUpdatePasswordResponse struct {
|
|||||||
|
|
||||||
func (x *SystemUpdatePasswordResponse) Reset() {
|
func (x *SystemUpdatePasswordResponse) Reset() {
|
||||||
*x = SystemUpdatePasswordResponse{}
|
*x = SystemUpdatePasswordResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[24]
|
mi := &file_sso_auth_proto_msgTypes[20]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1386,7 +1186,7 @@ func (x *SystemUpdatePasswordResponse) String() string {
|
|||||||
func (*SystemUpdatePasswordResponse) ProtoMessage() {}
|
func (*SystemUpdatePasswordResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemUpdatePasswordResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemUpdatePasswordResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[24]
|
mi := &file_sso_auth_proto_msgTypes[20]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1399,7 +1199,7 @@ func (x *SystemUpdatePasswordResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemUpdatePasswordResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemUpdatePasswordResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemUpdatePasswordResponse) Descriptor() ([]byte, []int) {
|
func (*SystemUpdatePasswordResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{24}
|
return file_sso_auth_proto_rawDescGZIP(), []int{20}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemUpdatePasswordResponse) GetSuccess() bool {
|
func (x *SystemUpdatePasswordResponse) GetSuccess() bool {
|
||||||
@@ -1419,7 +1219,7 @@ type SystemUpdatePinRequest struct {
|
|||||||
|
|
||||||
func (x *SystemUpdatePinRequest) Reset() {
|
func (x *SystemUpdatePinRequest) Reset() {
|
||||||
*x = SystemUpdatePinRequest{}
|
*x = SystemUpdatePinRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[25]
|
mi := &file_sso_auth_proto_msgTypes[21]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1431,7 +1231,7 @@ func (x *SystemUpdatePinRequest) String() string {
|
|||||||
func (*SystemUpdatePinRequest) ProtoMessage() {}
|
func (*SystemUpdatePinRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemUpdatePinRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemUpdatePinRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[25]
|
mi := &file_sso_auth_proto_msgTypes[21]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1444,7 +1244,7 @@ func (x *SystemUpdatePinRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemUpdatePinRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemUpdatePinRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemUpdatePinRequest) Descriptor() ([]byte, []int) {
|
func (*SystemUpdatePinRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{25}
|
return file_sso_auth_proto_rawDescGZIP(), []int{21}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemUpdatePinRequest) GetAccountId() string {
|
func (x *SystemUpdatePinRequest) GetAccountId() string {
|
||||||
@@ -1470,7 +1270,7 @@ type SystemUpdatePinResponse struct {
|
|||||||
|
|
||||||
func (x *SystemUpdatePinResponse) Reset() {
|
func (x *SystemUpdatePinResponse) Reset() {
|
||||||
*x = SystemUpdatePinResponse{}
|
*x = SystemUpdatePinResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[26]
|
mi := &file_sso_auth_proto_msgTypes[22]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1482,7 +1282,7 @@ func (x *SystemUpdatePinResponse) String() string {
|
|||||||
func (*SystemUpdatePinResponse) ProtoMessage() {}
|
func (*SystemUpdatePinResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemUpdatePinResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemUpdatePinResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[26]
|
mi := &file_sso_auth_proto_msgTypes[22]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1495,7 +1295,7 @@ func (x *SystemUpdatePinResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemUpdatePinResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemUpdatePinResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemUpdatePinResponse) Descriptor() ([]byte, []int) {
|
func (*SystemUpdatePinResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{26}
|
return file_sso_auth_proto_rawDescGZIP(), []int{22}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemUpdatePinResponse) GetSuccess() bool {
|
func (x *SystemUpdatePinResponse) GetSuccess() bool {
|
||||||
@@ -1516,7 +1316,7 @@ type SystemBlockIpRequest struct {
|
|||||||
|
|
||||||
func (x *SystemBlockIpRequest) Reset() {
|
func (x *SystemBlockIpRequest) Reset() {
|
||||||
*x = SystemBlockIpRequest{}
|
*x = SystemBlockIpRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[27]
|
mi := &file_sso_auth_proto_msgTypes[23]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1528,7 +1328,7 @@ func (x *SystemBlockIpRequest) String() string {
|
|||||||
func (*SystemBlockIpRequest) ProtoMessage() {}
|
func (*SystemBlockIpRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemBlockIpRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemBlockIpRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[27]
|
mi := &file_sso_auth_proto_msgTypes[23]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1541,7 +1341,7 @@ func (x *SystemBlockIpRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemBlockIpRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemBlockIpRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemBlockIpRequest) Descriptor() ([]byte, []int) {
|
func (*SystemBlockIpRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{27}
|
return file_sso_auth_proto_rawDescGZIP(), []int{23}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemBlockIpRequest) GetIpAddress() string {
|
func (x *SystemBlockIpRequest) GetIpAddress() string {
|
||||||
@@ -1574,7 +1374,7 @@ type SystemBlockIpResponse struct {
|
|||||||
|
|
||||||
func (x *SystemBlockIpResponse) Reset() {
|
func (x *SystemBlockIpResponse) Reset() {
|
||||||
*x = SystemBlockIpResponse{}
|
*x = SystemBlockIpResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[28]
|
mi := &file_sso_auth_proto_msgTypes[24]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1586,7 +1386,7 @@ func (x *SystemBlockIpResponse) String() string {
|
|||||||
func (*SystemBlockIpResponse) ProtoMessage() {}
|
func (*SystemBlockIpResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemBlockIpResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemBlockIpResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[28]
|
mi := &file_sso_auth_proto_msgTypes[24]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1599,7 +1399,7 @@ func (x *SystemBlockIpResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemBlockIpResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemBlockIpResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemBlockIpResponse) Descriptor() ([]byte, []int) {
|
func (*SystemBlockIpResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{28}
|
return file_sso_auth_proto_rawDescGZIP(), []int{24}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemBlockIpResponse) GetSuccess() bool {
|
func (x *SystemBlockIpResponse) GetSuccess() bool {
|
||||||
@@ -1618,7 +1418,7 @@ type SystemUnblockIpRequest struct {
|
|||||||
|
|
||||||
func (x *SystemUnblockIpRequest) Reset() {
|
func (x *SystemUnblockIpRequest) Reset() {
|
||||||
*x = SystemUnblockIpRequest{}
|
*x = SystemUnblockIpRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[29]
|
mi := &file_sso_auth_proto_msgTypes[25]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1630,7 +1430,7 @@ func (x *SystemUnblockIpRequest) String() string {
|
|||||||
func (*SystemUnblockIpRequest) ProtoMessage() {}
|
func (*SystemUnblockIpRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemUnblockIpRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemUnblockIpRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[29]
|
mi := &file_sso_auth_proto_msgTypes[25]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1643,7 +1443,7 @@ func (x *SystemUnblockIpRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemUnblockIpRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemUnblockIpRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemUnblockIpRequest) Descriptor() ([]byte, []int) {
|
func (*SystemUnblockIpRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{29}
|
return file_sso_auth_proto_rawDescGZIP(), []int{25}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemUnblockIpRequest) GetIpAddress() string {
|
func (x *SystemUnblockIpRequest) GetIpAddress() string {
|
||||||
@@ -1662,7 +1462,7 @@ type SystemUnblockIpResponse struct {
|
|||||||
|
|
||||||
func (x *SystemUnblockIpResponse) Reset() {
|
func (x *SystemUnblockIpResponse) Reset() {
|
||||||
*x = SystemUnblockIpResponse{}
|
*x = SystemUnblockIpResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[30]
|
mi := &file_sso_auth_proto_msgTypes[26]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1674,7 +1474,7 @@ func (x *SystemUnblockIpResponse) String() string {
|
|||||||
func (*SystemUnblockIpResponse) ProtoMessage() {}
|
func (*SystemUnblockIpResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemUnblockIpResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemUnblockIpResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[30]
|
mi := &file_sso_auth_proto_msgTypes[26]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1687,7 +1487,7 @@ func (x *SystemUnblockIpResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemUnblockIpResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemUnblockIpResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemUnblockIpResponse) Descriptor() ([]byte, []int) {
|
func (*SystemUnblockIpResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{30}
|
return file_sso_auth_proto_rawDescGZIP(), []int{26}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemUnblockIpResponse) GetSuccess() bool {
|
func (x *SystemUnblockIpResponse) GetSuccess() bool {
|
||||||
@@ -1707,7 +1507,7 @@ type SystemGetAllAccountsRequest struct {
|
|||||||
|
|
||||||
func (x *SystemGetAllAccountsRequest) Reset() {
|
func (x *SystemGetAllAccountsRequest) Reset() {
|
||||||
*x = SystemGetAllAccountsRequest{}
|
*x = SystemGetAllAccountsRequest{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[31]
|
mi := &file_sso_auth_proto_msgTypes[27]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1719,7 +1519,7 @@ func (x *SystemGetAllAccountsRequest) String() string {
|
|||||||
func (*SystemGetAllAccountsRequest) ProtoMessage() {}
|
func (*SystemGetAllAccountsRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemGetAllAccountsRequest) ProtoReflect() protoreflect.Message {
|
func (x *SystemGetAllAccountsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[31]
|
mi := &file_sso_auth_proto_msgTypes[27]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1732,7 +1532,7 @@ func (x *SystemGetAllAccountsRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemGetAllAccountsRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemGetAllAccountsRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemGetAllAccountsRequest) Descriptor() ([]byte, []int) {
|
func (*SystemGetAllAccountsRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{31}
|
return file_sso_auth_proto_rawDescGZIP(), []int{27}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemGetAllAccountsRequest) GetLimit() int32 {
|
func (x *SystemGetAllAccountsRequest) GetLimit() int32 {
|
||||||
@@ -1760,7 +1560,7 @@ type AccountBasicItem struct {
|
|||||||
|
|
||||||
func (x *AccountBasicItem) Reset() {
|
func (x *AccountBasicItem) Reset() {
|
||||||
*x = AccountBasicItem{}
|
*x = AccountBasicItem{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[32]
|
mi := &file_sso_auth_proto_msgTypes[28]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1772,7 +1572,7 @@ func (x *AccountBasicItem) String() string {
|
|||||||
func (*AccountBasicItem) ProtoMessage() {}
|
func (*AccountBasicItem) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *AccountBasicItem) ProtoReflect() protoreflect.Message {
|
func (x *AccountBasicItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[32]
|
mi := &file_sso_auth_proto_msgTypes[28]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1785,7 +1585,7 @@ func (x *AccountBasicItem) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use AccountBasicItem.ProtoReflect.Descriptor instead.
|
// Deprecated: Use AccountBasicItem.ProtoReflect.Descriptor instead.
|
||||||
func (*AccountBasicItem) Descriptor() ([]byte, []int) {
|
func (*AccountBasicItem) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{32}
|
return file_sso_auth_proto_rawDescGZIP(), []int{28}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AccountBasicItem) GetId() string {
|
func (x *AccountBasicItem) GetId() string {
|
||||||
@@ -1819,7 +1619,7 @@ type SystemGetAllAccountsResponse struct {
|
|||||||
|
|
||||||
func (x *SystemGetAllAccountsResponse) Reset() {
|
func (x *SystemGetAllAccountsResponse) Reset() {
|
||||||
*x = SystemGetAllAccountsResponse{}
|
*x = SystemGetAllAccountsResponse{}
|
||||||
mi := &file_sso_auth_proto_msgTypes[33]
|
mi := &file_sso_auth_proto_msgTypes[29]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1831,7 +1631,7 @@ func (x *SystemGetAllAccountsResponse) String() string {
|
|||||||
func (*SystemGetAllAccountsResponse) ProtoMessage() {}
|
func (*SystemGetAllAccountsResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SystemGetAllAccountsResponse) ProtoReflect() protoreflect.Message {
|
func (x *SystemGetAllAccountsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_sso_auth_proto_msgTypes[33]
|
mi := &file_sso_auth_proto_msgTypes[29]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1844,7 +1644,7 @@ func (x *SystemGetAllAccountsResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SystemGetAllAccountsResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SystemGetAllAccountsResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*SystemGetAllAccountsResponse) Descriptor() ([]byte, []int) {
|
func (*SystemGetAllAccountsResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_sso_auth_proto_rawDescGZIP(), []int{33}
|
return file_sso_auth_proto_rawDescGZIP(), []int{29}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SystemGetAllAccountsResponse) GetAccounts() []*AccountBasicItem {
|
func (x *SystemGetAllAccountsResponse) GetAccounts() []*AccountBasicItem {
|
||||||
@@ -1948,19 +1748,7 @@ const file_sso_auth_proto_rawDesc = "" +
|
|||||||
"targetHash\"N\n" +
|
"targetHash\"N\n" +
|
||||||
"\x18TerminateSessionResponse\x12\x18\n" +
|
"\x18TerminateSessionResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
"\amessage\x18\x02 \x01(\tR\amessage\"3\n" +
|
"\amessage\x18\x02 \x01(\tR\amessage\"v\n" +
|
||||||
"\x18GenerateOauthCodeRequest\x12\x17\n" +
|
|
||||||
"\auser_id\x18\x01 \x01(\tR\x06userId\"/\n" +
|
|
||||||
"\x19GenerateOauthCodeResponse\x12\x12\n" +
|
|
||||||
"\x04code\x18\x01 \x01(\tR\x04code\"p\n" +
|
|
||||||
"\x18ExchangeOauthCodeRequest\x12\x12\n" +
|
|
||||||
"\x04code\x18\x01 \x01(\tR\x04code\x12\x1b\n" +
|
|
||||||
"\tclient_id\x18\x02 \x01(\tR\bclientId\x12#\n" +
|
|
||||||
"\rclient_secret\x18\x03 \x01(\tR\fclientSecret\"]\n" +
|
|
||||||
"\x19ExchangeOauthCodeResponse\x12!\n" +
|
|
||||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12\x1d\n" +
|
|
||||||
"\n" +
|
|
||||||
"expires_in\x18\x02 \x01(\x05R\texpiresIn\"v\n" +
|
|
||||||
"\x1aSystemCreateAccountRequest\x12\x1a\n" +
|
"\x1aSystemCreateAccountRequest\x12\x1a\n" +
|
||||||
"\busername\x18\x01 \x01(\tR\busername\x12#\n" +
|
"\busername\x18\x01 \x01(\tR\busername\x12#\n" +
|
||||||
"\rpassword_hash\x18\x02 \x01(\tR\fpasswordHash\x12\x17\n" +
|
"\rpassword_hash\x18\x02 \x01(\tR\fpasswordHash\x12\x17\n" +
|
||||||
@@ -2009,7 +1797,7 @@ const file_sso_auth_proto_rawDesc = "" +
|
|||||||
"\x06status\x18\x03 \x01(\tR\x06status\"k\n" +
|
"\x06status\x18\x03 \x01(\tR\x06status\"k\n" +
|
||||||
"\x1cSystemGetAllAccountsResponse\x125\n" +
|
"\x1cSystemGetAllAccountsResponse\x125\n" +
|
||||||
"\baccounts\x18\x01 \x03(\v2\x19.auth.v1.AccountBasicItemR\baccounts\x12\x14\n" +
|
"\baccounts\x18\x01 \x03(\v2\x19.auth.v1.AccountBasicItemR\baccounts\x12\x14\n" +
|
||||||
"\x05total\x18\x02 \x01(\x05R\x05total2\x8b\v\n" +
|
"\x05total\x18\x02 \x01(\x05R\x05total2\xd3\t\n" +
|
||||||
"\vAuthService\x126\n" +
|
"\vAuthService\x126\n" +
|
||||||
"\x05Login\x12\x15.auth.v1.LoginRequest\x1a\x16.auth.v1.LoginResponse\x12<\n" +
|
"\x05Login\x12\x15.auth.v1.LoginRequest\x1a\x16.auth.v1.LoginResponse\x12<\n" +
|
||||||
"\aRefresh\x12\x17.auth.v1.RefreshRequest\x1a\x18.auth.v1.RefreshResponse\x12H\n" +
|
"\aRefresh\x12\x17.auth.v1.RefreshRequest\x1a\x18.auth.v1.RefreshResponse\x12H\n" +
|
||||||
@@ -2018,9 +1806,7 @@ const file_sso_auth_proto_rawDesc = "" +
|
|||||||
"\x06Logout\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12>\n" +
|
"\x06Logout\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12>\n" +
|
||||||
"\vLogoutOther\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12G\n" +
|
"\vLogoutOther\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12G\n" +
|
||||||
"\vGetSessions\x12\x1a.auth.v1.GetSessionRequest\x1a\x1c.auth.v1.GetSessionsResponse\x12W\n" +
|
"\vGetSessions\x12\x1a.auth.v1.GetSessionRequest\x1a\x1c.auth.v1.GetSessionsResponse\x12W\n" +
|
||||||
"\x10TerminateSession\x12 .auth.v1.TerminateSessionRequest\x1a!.auth.v1.TerminateSessionResponse\x12Z\n" +
|
"\x10TerminateSession\x12 .auth.v1.TerminateSessionRequest\x1a!.auth.v1.TerminateSessionResponse\x12`\n" +
|
||||||
"\x11GenerateOauthCode\x12!.auth.v1.GenerateOauthCodeRequest\x1a\".auth.v1.GenerateOauthCodeResponse\x12Z\n" +
|
|
||||||
"\x11ExchangeOauthCode\x12!.auth.v1.ExchangeOauthCodeRequest\x1a\".auth.v1.ExchangeOauthCodeResponse\x12`\n" +
|
|
||||||
"\x13SystemCreateAccount\x12#.auth.v1.SystemCreateAccountRequest\x1a$.auth.v1.SystemCreateAccountResponse\x12]\n" +
|
"\x13SystemCreateAccount\x12#.auth.v1.SystemCreateAccountRequest\x1a$.auth.v1.SystemCreateAccountResponse\x12]\n" +
|
||||||
"\x12SystemChangeStatus\x12\".auth.v1.SystemChangeStatusRequest\x1a#.auth.v1.SystemChangeStatusResponse\x12c\n" +
|
"\x12SystemChangeStatus\x12\".auth.v1.SystemChangeStatusRequest\x1a#.auth.v1.SystemChangeStatusResponse\x12c\n" +
|
||||||
"\x14SystemUpdatePassword\x12$.auth.v1.SystemUpdatePasswordRequest\x1a%.auth.v1.SystemUpdatePasswordResponse\x12T\n" +
|
"\x14SystemUpdatePassword\x12$.auth.v1.SystemUpdatePasswordRequest\x1a%.auth.v1.SystemUpdatePasswordResponse\x12T\n" +
|
||||||
@@ -2041,7 +1827,7 @@ func file_sso_auth_proto_rawDescGZIP() []byte {
|
|||||||
return file_sso_auth_proto_rawDescData
|
return file_sso_auth_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_sso_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
|
var file_sso_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
|
||||||
var file_sso_auth_proto_goTypes = []any{
|
var file_sso_auth_proto_goTypes = []any{
|
||||||
(*LoginRequest)(nil), // 0: auth.v1.LoginRequest
|
(*LoginRequest)(nil), // 0: auth.v1.LoginRequest
|
||||||
(*LoginResponse)(nil), // 1: auth.v1.LoginResponse
|
(*LoginResponse)(nil), // 1: auth.v1.LoginResponse
|
||||||
@@ -2058,29 +1844,25 @@ var file_sso_auth_proto_goTypes = []any{
|
|||||||
(*GetSessionsResponse)(nil), // 12: auth.v1.GetSessionsResponse
|
(*GetSessionsResponse)(nil), // 12: auth.v1.GetSessionsResponse
|
||||||
(*TerminateSessionRequest)(nil), // 13: auth.v1.TerminateSessionRequest
|
(*TerminateSessionRequest)(nil), // 13: auth.v1.TerminateSessionRequest
|
||||||
(*TerminateSessionResponse)(nil), // 14: auth.v1.TerminateSessionResponse
|
(*TerminateSessionResponse)(nil), // 14: auth.v1.TerminateSessionResponse
|
||||||
(*GenerateOauthCodeRequest)(nil), // 15: auth.v1.GenerateOauthCodeRequest
|
(*SystemCreateAccountRequest)(nil), // 15: auth.v1.SystemCreateAccountRequest
|
||||||
(*GenerateOauthCodeResponse)(nil), // 16: auth.v1.GenerateOauthCodeResponse
|
(*SystemCreateAccountResponse)(nil), // 16: auth.v1.SystemCreateAccountResponse
|
||||||
(*ExchangeOauthCodeRequest)(nil), // 17: auth.v1.ExchangeOauthCodeRequest
|
(*SystemChangeStatusRequest)(nil), // 17: auth.v1.SystemChangeStatusRequest
|
||||||
(*ExchangeOauthCodeResponse)(nil), // 18: auth.v1.ExchangeOauthCodeResponse
|
(*SystemChangeStatusResponse)(nil), // 18: auth.v1.SystemChangeStatusResponse
|
||||||
(*SystemCreateAccountRequest)(nil), // 19: auth.v1.SystemCreateAccountRequest
|
(*SystemUpdatePasswordRequest)(nil), // 19: auth.v1.SystemUpdatePasswordRequest
|
||||||
(*SystemCreateAccountResponse)(nil), // 20: auth.v1.SystemCreateAccountResponse
|
(*SystemUpdatePasswordResponse)(nil), // 20: auth.v1.SystemUpdatePasswordResponse
|
||||||
(*SystemChangeStatusRequest)(nil), // 21: auth.v1.SystemChangeStatusRequest
|
(*SystemUpdatePinRequest)(nil), // 21: auth.v1.SystemUpdatePinRequest
|
||||||
(*SystemChangeStatusResponse)(nil), // 22: auth.v1.SystemChangeStatusResponse
|
(*SystemUpdatePinResponse)(nil), // 22: auth.v1.SystemUpdatePinResponse
|
||||||
(*SystemUpdatePasswordRequest)(nil), // 23: auth.v1.SystemUpdatePasswordRequest
|
(*SystemBlockIpRequest)(nil), // 23: auth.v1.SystemBlockIpRequest
|
||||||
(*SystemUpdatePasswordResponse)(nil), // 24: auth.v1.SystemUpdatePasswordResponse
|
(*SystemBlockIpResponse)(nil), // 24: auth.v1.SystemBlockIpResponse
|
||||||
(*SystemUpdatePinRequest)(nil), // 25: auth.v1.SystemUpdatePinRequest
|
(*SystemUnblockIpRequest)(nil), // 25: auth.v1.SystemUnblockIpRequest
|
||||||
(*SystemUpdatePinResponse)(nil), // 26: auth.v1.SystemUpdatePinResponse
|
(*SystemUnblockIpResponse)(nil), // 26: auth.v1.SystemUnblockIpResponse
|
||||||
(*SystemBlockIpRequest)(nil), // 27: auth.v1.SystemBlockIpRequest
|
(*SystemGetAllAccountsRequest)(nil), // 27: auth.v1.SystemGetAllAccountsRequest
|
||||||
(*SystemBlockIpResponse)(nil), // 28: auth.v1.SystemBlockIpResponse
|
(*AccountBasicItem)(nil), // 28: auth.v1.AccountBasicItem
|
||||||
(*SystemUnblockIpRequest)(nil), // 29: auth.v1.SystemUnblockIpRequest
|
(*SystemGetAllAccountsResponse)(nil), // 29: auth.v1.SystemGetAllAccountsResponse
|
||||||
(*SystemUnblockIpResponse)(nil), // 30: auth.v1.SystemUnblockIpResponse
|
|
||||||
(*SystemGetAllAccountsRequest)(nil), // 31: auth.v1.SystemGetAllAccountsRequest
|
|
||||||
(*AccountBasicItem)(nil), // 32: auth.v1.AccountBasicItem
|
|
||||||
(*SystemGetAllAccountsResponse)(nil), // 33: auth.v1.SystemGetAllAccountsResponse
|
|
||||||
}
|
}
|
||||||
var file_sso_auth_proto_depIdxs = []int32{
|
var file_sso_auth_proto_depIdxs = []int32{
|
||||||
11, // 0: auth.v1.GetSessionsResponse.sessions:type_name -> auth.v1.SessionItem
|
11, // 0: auth.v1.GetSessionsResponse.sessions:type_name -> auth.v1.SessionItem
|
||||||
32, // 1: auth.v1.SystemGetAllAccountsResponse.accounts:type_name -> auth.v1.AccountBasicItem
|
28, // 1: auth.v1.SystemGetAllAccountsResponse.accounts:type_name -> auth.v1.AccountBasicItem
|
||||||
0, // 2: auth.v1.AuthService.Login:input_type -> auth.v1.LoginRequest
|
0, // 2: auth.v1.AuthService.Login:input_type -> auth.v1.LoginRequest
|
||||||
2, // 3: auth.v1.AuthService.Refresh:input_type -> auth.v1.RefreshRequest
|
2, // 3: auth.v1.AuthService.Refresh:input_type -> auth.v1.RefreshRequest
|
||||||
6, // 4: auth.v1.AuthService.VerifyToken:input_type -> auth.v1.VerifyTokenRequest
|
6, // 4: auth.v1.AuthService.VerifyToken:input_type -> auth.v1.VerifyTokenRequest
|
||||||
@@ -2089,34 +1871,30 @@ var file_sso_auth_proto_depIdxs = []int32{
|
|||||||
4, // 7: auth.v1.AuthService.LogoutOther:input_type -> auth.v1.LogoutRequest
|
4, // 7: auth.v1.AuthService.LogoutOther:input_type -> auth.v1.LogoutRequest
|
||||||
10, // 8: auth.v1.AuthService.GetSessions:input_type -> auth.v1.GetSessionRequest
|
10, // 8: auth.v1.AuthService.GetSessions:input_type -> auth.v1.GetSessionRequest
|
||||||
13, // 9: auth.v1.AuthService.TerminateSession:input_type -> auth.v1.TerminateSessionRequest
|
13, // 9: auth.v1.AuthService.TerminateSession:input_type -> auth.v1.TerminateSessionRequest
|
||||||
15, // 10: auth.v1.AuthService.GenerateOauthCode:input_type -> auth.v1.GenerateOauthCodeRequest
|
15, // 10: auth.v1.AuthService.SystemCreateAccount:input_type -> auth.v1.SystemCreateAccountRequest
|
||||||
17, // 11: auth.v1.AuthService.ExchangeOauthCode:input_type -> auth.v1.ExchangeOauthCodeRequest
|
17, // 11: auth.v1.AuthService.SystemChangeStatus:input_type -> auth.v1.SystemChangeStatusRequest
|
||||||
19, // 12: auth.v1.AuthService.SystemCreateAccount:input_type -> auth.v1.SystemCreateAccountRequest
|
19, // 12: auth.v1.AuthService.SystemUpdatePassword:input_type -> auth.v1.SystemUpdatePasswordRequest
|
||||||
21, // 13: auth.v1.AuthService.SystemChangeStatus:input_type -> auth.v1.SystemChangeStatusRequest
|
21, // 13: auth.v1.AuthService.SystemUpdatePin:input_type -> auth.v1.SystemUpdatePinRequest
|
||||||
23, // 14: auth.v1.AuthService.SystemUpdatePassword:input_type -> auth.v1.SystemUpdatePasswordRequest
|
23, // 14: auth.v1.AuthService.SystemBlockIp:input_type -> auth.v1.SystemBlockIpRequest
|
||||||
25, // 15: auth.v1.AuthService.SystemUpdatePin:input_type -> auth.v1.SystemUpdatePinRequest
|
25, // 15: auth.v1.AuthService.SystemUnblockIp:input_type -> auth.v1.SystemUnblockIpRequest
|
||||||
27, // 16: auth.v1.AuthService.SystemBlockIp:input_type -> auth.v1.SystemBlockIpRequest
|
27, // 16: auth.v1.AuthService.SystemGetAllAccounts:input_type -> auth.v1.SystemGetAllAccountsRequest
|
||||||
29, // 17: auth.v1.AuthService.SystemUnblockIp:input_type -> auth.v1.SystemUnblockIpRequest
|
1, // 17: auth.v1.AuthService.Login:output_type -> auth.v1.LoginResponse
|
||||||
31, // 18: auth.v1.AuthService.SystemGetAllAccounts:input_type -> auth.v1.SystemGetAllAccountsRequest
|
3, // 18: auth.v1.AuthService.Refresh:output_type -> auth.v1.RefreshResponse
|
||||||
1, // 19: auth.v1.AuthService.Login:output_type -> auth.v1.LoginResponse
|
7, // 19: auth.v1.AuthService.VerifyToken:output_type -> auth.v1.VerifyTokenResponse
|
||||||
3, // 20: auth.v1.AuthService.Refresh:output_type -> auth.v1.RefreshResponse
|
9, // 20: auth.v1.AuthService.GetAccountRoleLevel:output_type -> auth.v1.GetAccountRoleLevelResponse
|
||||||
7, // 21: auth.v1.AuthService.VerifyToken:output_type -> auth.v1.VerifyTokenResponse
|
5, // 21: auth.v1.AuthService.Logout:output_type -> auth.v1.LogoutResponse
|
||||||
9, // 22: auth.v1.AuthService.GetAccountRoleLevel:output_type -> auth.v1.GetAccountRoleLevelResponse
|
5, // 22: auth.v1.AuthService.LogoutOther:output_type -> auth.v1.LogoutResponse
|
||||||
5, // 23: auth.v1.AuthService.Logout:output_type -> auth.v1.LogoutResponse
|
12, // 23: auth.v1.AuthService.GetSessions:output_type -> auth.v1.GetSessionsResponse
|
||||||
5, // 24: auth.v1.AuthService.LogoutOther:output_type -> auth.v1.LogoutResponse
|
14, // 24: auth.v1.AuthService.TerminateSession:output_type -> auth.v1.TerminateSessionResponse
|
||||||
12, // 25: auth.v1.AuthService.GetSessions:output_type -> auth.v1.GetSessionsResponse
|
16, // 25: auth.v1.AuthService.SystemCreateAccount:output_type -> auth.v1.SystemCreateAccountResponse
|
||||||
14, // 26: auth.v1.AuthService.TerminateSession:output_type -> auth.v1.TerminateSessionResponse
|
18, // 26: auth.v1.AuthService.SystemChangeStatus:output_type -> auth.v1.SystemChangeStatusResponse
|
||||||
16, // 27: auth.v1.AuthService.GenerateOauthCode:output_type -> auth.v1.GenerateOauthCodeResponse
|
20, // 27: auth.v1.AuthService.SystemUpdatePassword:output_type -> auth.v1.SystemUpdatePasswordResponse
|
||||||
18, // 28: auth.v1.AuthService.ExchangeOauthCode:output_type -> auth.v1.ExchangeOauthCodeResponse
|
22, // 28: auth.v1.AuthService.SystemUpdatePin:output_type -> auth.v1.SystemUpdatePinResponse
|
||||||
20, // 29: auth.v1.AuthService.SystemCreateAccount:output_type -> auth.v1.SystemCreateAccountResponse
|
24, // 29: auth.v1.AuthService.SystemBlockIp:output_type -> auth.v1.SystemBlockIpResponse
|
||||||
22, // 30: auth.v1.AuthService.SystemChangeStatus:output_type -> auth.v1.SystemChangeStatusResponse
|
26, // 30: auth.v1.AuthService.SystemUnblockIp:output_type -> auth.v1.SystemUnblockIpResponse
|
||||||
24, // 31: auth.v1.AuthService.SystemUpdatePassword:output_type -> auth.v1.SystemUpdatePasswordResponse
|
29, // 31: auth.v1.AuthService.SystemGetAllAccounts:output_type -> auth.v1.SystemGetAllAccountsResponse
|
||||||
26, // 32: auth.v1.AuthService.SystemUpdatePin:output_type -> auth.v1.SystemUpdatePinResponse
|
17, // [17:32] is the sub-list for method output_type
|
||||||
28, // 33: auth.v1.AuthService.SystemBlockIp:output_type -> auth.v1.SystemBlockIpResponse
|
2, // [2:17] is the sub-list for method input_type
|
||||||
30, // 34: auth.v1.AuthService.SystemUnblockIp:output_type -> auth.v1.SystemUnblockIpResponse
|
|
||||||
33, // 35: auth.v1.AuthService.SystemGetAllAccounts:output_type -> auth.v1.SystemGetAllAccountsResponse
|
|
||||||
19, // [19:36] is the sub-list for method output_type
|
|
||||||
2, // [2:19] is the sub-list for method input_type
|
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
0, // [0:2] is the sub-list for field type_name
|
0, // [0:2] is the sub-list for field type_name
|
||||||
@@ -2129,15 +1907,15 @@ func file_sso_auth_proto_init() {
|
|||||||
}
|
}
|
||||||
file_sso_auth_proto_msgTypes[1].OneofWrappers = []any{}
|
file_sso_auth_proto_msgTypes[1].OneofWrappers = []any{}
|
||||||
file_sso_auth_proto_msgTypes[7].OneofWrappers = []any{}
|
file_sso_auth_proto_msgTypes[7].OneofWrappers = []any{}
|
||||||
file_sso_auth_proto_msgTypes[25].OneofWrappers = []any{}
|
file_sso_auth_proto_msgTypes[21].OneofWrappers = []any{}
|
||||||
file_sso_auth_proto_msgTypes[27].OneofWrappers = []any{}
|
file_sso_auth_proto_msgTypes[23].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_sso_auth_proto_rawDesc), len(file_sso_auth_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_sso_auth_proto_rawDesc), len(file_sso_auth_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 34,
|
NumMessages: 30,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ const (
|
|||||||
AuthService_LogoutOther_FullMethodName = "/auth.v1.AuthService/LogoutOther"
|
AuthService_LogoutOther_FullMethodName = "/auth.v1.AuthService/LogoutOther"
|
||||||
AuthService_GetSessions_FullMethodName = "/auth.v1.AuthService/GetSessions"
|
AuthService_GetSessions_FullMethodName = "/auth.v1.AuthService/GetSessions"
|
||||||
AuthService_TerminateSession_FullMethodName = "/auth.v1.AuthService/TerminateSession"
|
AuthService_TerminateSession_FullMethodName = "/auth.v1.AuthService/TerminateSession"
|
||||||
AuthService_GenerateOauthCode_FullMethodName = "/auth.v1.AuthService/GenerateOauthCode"
|
|
||||||
AuthService_ExchangeOauthCode_FullMethodName = "/auth.v1.AuthService/ExchangeOauthCode"
|
|
||||||
AuthService_SystemCreateAccount_FullMethodName = "/auth.v1.AuthService/SystemCreateAccount"
|
AuthService_SystemCreateAccount_FullMethodName = "/auth.v1.AuthService/SystemCreateAccount"
|
||||||
AuthService_SystemChangeStatus_FullMethodName = "/auth.v1.AuthService/SystemChangeStatus"
|
AuthService_SystemChangeStatus_FullMethodName = "/auth.v1.AuthService/SystemChangeStatus"
|
||||||
AuthService_SystemUpdatePassword_FullMethodName = "/auth.v1.AuthService/SystemUpdatePassword"
|
AuthService_SystemUpdatePassword_FullMethodName = "/auth.v1.AuthService/SystemUpdatePassword"
|
||||||
@@ -50,9 +48,6 @@ type AuthServiceClient interface {
|
|||||||
LogoutOther(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
LogoutOther(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
||||||
GetSessions(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionsResponse, error)
|
GetSessions(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionsResponse, error)
|
||||||
TerminateSession(ctx context.Context, in *TerminateSessionRequest, opts ...grpc.CallOption) (*TerminateSessionResponse, error)
|
TerminateSession(ctx context.Context, in *TerminateSessionRequest, opts ...grpc.CallOption) (*TerminateSessionResponse, error)
|
||||||
// === OAuth2 SSO ===
|
|
||||||
GenerateOauthCode(ctx context.Context, in *GenerateOauthCodeRequest, opts ...grpc.CallOption) (*GenerateOauthCodeResponse, error)
|
|
||||||
ExchangeOauthCode(ctx context.Context, in *ExchangeOauthCodeRequest, opts ...grpc.CallOption) (*ExchangeOauthCodeResponse, error)
|
|
||||||
// Системные методы для админа
|
// Системные методы для админа
|
||||||
SystemCreateAccount(ctx context.Context, in *SystemCreateAccountRequest, opts ...grpc.CallOption) (*SystemCreateAccountResponse, error)
|
SystemCreateAccount(ctx context.Context, in *SystemCreateAccountRequest, opts ...grpc.CallOption) (*SystemCreateAccountResponse, error)
|
||||||
SystemChangeStatus(ctx context.Context, in *SystemChangeStatusRequest, opts ...grpc.CallOption) (*SystemChangeStatusResponse, error)
|
SystemChangeStatus(ctx context.Context, in *SystemChangeStatusRequest, opts ...grpc.CallOption) (*SystemChangeStatusResponse, error)
|
||||||
@@ -151,26 +146,6 @@ func (c *authServiceClient) TerminateSession(ctx context.Context, in *TerminateS
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *authServiceClient) GenerateOauthCode(ctx context.Context, in *GenerateOauthCodeRequest, opts ...grpc.CallOption) (*GenerateOauthCodeResponse, error) {
|
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(GenerateOauthCodeResponse)
|
|
||||||
err := c.cc.Invoke(ctx, AuthService_GenerateOauthCode_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *authServiceClient) ExchangeOauthCode(ctx context.Context, in *ExchangeOauthCodeRequest, opts ...grpc.CallOption) (*ExchangeOauthCodeResponse, error) {
|
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(ExchangeOauthCodeResponse)
|
|
||||||
err := c.cc.Invoke(ctx, AuthService_ExchangeOauthCode_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *authServiceClient) SystemCreateAccount(ctx context.Context, in *SystemCreateAccountRequest, opts ...grpc.CallOption) (*SystemCreateAccountResponse, error) {
|
func (c *authServiceClient) SystemCreateAccount(ctx context.Context, in *SystemCreateAccountRequest, opts ...grpc.CallOption) (*SystemCreateAccountResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(SystemCreateAccountResponse)
|
out := new(SystemCreateAccountResponse)
|
||||||
@@ -253,9 +228,6 @@ type AuthServiceServer interface {
|
|||||||
LogoutOther(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
LogoutOther(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
||||||
GetSessions(context.Context, *GetSessionRequest) (*GetSessionsResponse, error)
|
GetSessions(context.Context, *GetSessionRequest) (*GetSessionsResponse, error)
|
||||||
TerminateSession(context.Context, *TerminateSessionRequest) (*TerminateSessionResponse, error)
|
TerminateSession(context.Context, *TerminateSessionRequest) (*TerminateSessionResponse, error)
|
||||||
// === OAuth2 SSO ===
|
|
||||||
GenerateOauthCode(context.Context, *GenerateOauthCodeRequest) (*GenerateOauthCodeResponse, error)
|
|
||||||
ExchangeOauthCode(context.Context, *ExchangeOauthCodeRequest) (*ExchangeOauthCodeResponse, error)
|
|
||||||
// Системные методы для админа
|
// Системные методы для админа
|
||||||
SystemCreateAccount(context.Context, *SystemCreateAccountRequest) (*SystemCreateAccountResponse, error)
|
SystemCreateAccount(context.Context, *SystemCreateAccountRequest) (*SystemCreateAccountResponse, error)
|
||||||
SystemChangeStatus(context.Context, *SystemChangeStatusRequest) (*SystemChangeStatusResponse, error)
|
SystemChangeStatus(context.Context, *SystemChangeStatusRequest) (*SystemChangeStatusResponse, error)
|
||||||
@@ -298,12 +270,6 @@ func (UnimplementedAuthServiceServer) GetSessions(context.Context, *GetSessionRe
|
|||||||
func (UnimplementedAuthServiceServer) TerminateSession(context.Context, *TerminateSessionRequest) (*TerminateSessionResponse, error) {
|
func (UnimplementedAuthServiceServer) TerminateSession(context.Context, *TerminateSessionRequest) (*TerminateSessionResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method TerminateSession not implemented")
|
return nil, status.Error(codes.Unimplemented, "method TerminateSession not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedAuthServiceServer) GenerateOauthCode(context.Context, *GenerateOauthCodeRequest) (*GenerateOauthCodeResponse, error) {
|
|
||||||
return nil, status.Error(codes.Unimplemented, "method GenerateOauthCode not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedAuthServiceServer) ExchangeOauthCode(context.Context, *ExchangeOauthCodeRequest) (*ExchangeOauthCodeResponse, error) {
|
|
||||||
return nil, status.Error(codes.Unimplemented, "method ExchangeOauthCode not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedAuthServiceServer) SystemCreateAccount(context.Context, *SystemCreateAccountRequest) (*SystemCreateAccountResponse, error) {
|
func (UnimplementedAuthServiceServer) SystemCreateAccount(context.Context, *SystemCreateAccountRequest) (*SystemCreateAccountResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method SystemCreateAccount not implemented")
|
return nil, status.Error(codes.Unimplemented, "method SystemCreateAccount not implemented")
|
||||||
}
|
}
|
||||||
@@ -490,42 +456,6 @@ func _AuthService_TerminateSession_Handler(srv interface{}, ctx context.Context,
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _AuthService_GenerateOauthCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GenerateOauthCodeRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(AuthServiceServer).GenerateOauthCode(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: AuthService_GenerateOauthCode_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(AuthServiceServer).GenerateOauthCode(ctx, req.(*GenerateOauthCodeRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _AuthService_ExchangeOauthCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ExchangeOauthCodeRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(AuthServiceServer).ExchangeOauthCode(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: AuthService_ExchangeOauthCode_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(AuthServiceServer).ExchangeOauthCode(ctx, req.(*ExchangeOauthCodeRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _AuthService_SystemCreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _AuthService_SystemCreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(SystemCreateAccountRequest)
|
in := new(SystemCreateAccountRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@@ -691,14 +621,6 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "TerminateSession",
|
MethodName: "TerminateSession",
|
||||||
Handler: _AuthService_TerminateSession_Handler,
|
Handler: _AuthService_TerminateSession_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "GenerateOauthCode",
|
|
||||||
Handler: _AuthService_GenerateOauthCode_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "ExchangeOauthCode",
|
|
||||||
Handler: _AuthService_ExchangeOauthCode_Handler,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
MethodName: "SystemCreateAccount",
|
MethodName: "SystemCreateAccount",
|
||||||
Handler: _AuthService_SystemCreateAccount_Handler,
|
Handler: _AuthService_SystemCreateAccount_Handler,
|
||||||
|
|||||||
1102
gen/go/sso/oauth.pb.go
Normal file
1102
gen/go/sso/oauth.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
353
gen/go/sso/oauth_grpc.pb.go
Normal file
353
gen/go/sso/oauth_grpc.pb.go
Normal file
@@ -0,0 +1,353 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc v4.25.9
|
||||||
|
// source: sso/oauth.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 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 (
|
||||||
|
OauthService_GenerateOauthCode_FullMethodName = "/oauth.v1.OauthService/GenerateOauthCode"
|
||||||
|
OauthService_ExchangeOauthCode_FullMethodName = "/oauth.v1.OauthService/ExchangeOauthCode"
|
||||||
|
OauthService_CreateOauthClient_FullMethodName = "/oauth.v1.OauthService/CreateOauthClient"
|
||||||
|
OauthService_GetOauthClients_FullMethodName = "/oauth.v1.OauthService/GetOauthClients"
|
||||||
|
OauthService_UpdateOauthClient_FullMethodName = "/oauth.v1.OauthService/UpdateOauthClient"
|
||||||
|
OauthService_ResetOauthSecret_FullMethodName = "/oauth.v1.OauthService/ResetOauthSecret"
|
||||||
|
OauthService_DeleteOauthClient_FullMethodName = "/oauth.v1.OauthService/DeleteOauthClient"
|
||||||
|
)
|
||||||
|
|
||||||
|
// OauthServiceClient is the client API for OauthService 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.
|
||||||
|
type OauthServiceClient interface {
|
||||||
|
// === Базовый SSO (вызывается из Gateway / Графаны) ===
|
||||||
|
GenerateOauthCode(ctx context.Context, in *GenerateOauthCodeRequest, opts ...grpc.CallOption) (*GenerateOauthCodeResponse, error)
|
||||||
|
ExchangeOauthCode(ctx context.Context, in *ExchangeOauthCodeRequest, opts ...grpc.CallOption) (*ExchangeOauthCodeResponse, error)
|
||||||
|
// === Системные методы (Консоль Разработчика / Админка) ===
|
||||||
|
CreateOauthClient(ctx context.Context, in *CreateOauthClientRequest, opts ...grpc.CallOption) (*CreateOauthClientResponse, error)
|
||||||
|
GetOauthClients(ctx context.Context, in *GetOauthClientsRequest, opts ...grpc.CallOption) (*GetOauthClientsResponse, error)
|
||||||
|
UpdateOauthClient(ctx context.Context, in *UpdateOauthClientRequest, opts ...grpc.CallOption) (*UpdateOauthClientResponse, error)
|
||||||
|
ResetOauthSecret(ctx context.Context, in *ResetOauthSecretRequest, opts ...grpc.CallOption) (*ResetOauthSecretResponse, error)
|
||||||
|
DeleteOauthClient(ctx context.Context, in *DeleteOauthClientRequest, opts ...grpc.CallOption) (*DeleteOauthClientResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type oauthServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewOauthServiceClient(cc grpc.ClientConnInterface) OauthServiceClient {
|
||||||
|
return &oauthServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) GenerateOauthCode(ctx context.Context, in *GenerateOauthCodeRequest, opts ...grpc.CallOption) (*GenerateOauthCodeResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GenerateOauthCodeResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_GenerateOauthCode_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) ExchangeOauthCode(ctx context.Context, in *ExchangeOauthCodeRequest, opts ...grpc.CallOption) (*ExchangeOauthCodeResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ExchangeOauthCodeResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_ExchangeOauthCode_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) CreateOauthClient(ctx context.Context, in *CreateOauthClientRequest, opts ...grpc.CallOption) (*CreateOauthClientResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(CreateOauthClientResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_CreateOauthClient_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) GetOauthClients(ctx context.Context, in *GetOauthClientsRequest, opts ...grpc.CallOption) (*GetOauthClientsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetOauthClientsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_GetOauthClients_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) UpdateOauthClient(ctx context.Context, in *UpdateOauthClientRequest, opts ...grpc.CallOption) (*UpdateOauthClientResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(UpdateOauthClientResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_UpdateOauthClient_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) ResetOauthSecret(ctx context.Context, in *ResetOauthSecretRequest, opts ...grpc.CallOption) (*ResetOauthSecretResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ResetOauthSecretResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_ResetOauthSecret_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *oauthServiceClient) DeleteOauthClient(ctx context.Context, in *DeleteOauthClientRequest, opts ...grpc.CallOption) (*DeleteOauthClientResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DeleteOauthClientResponse)
|
||||||
|
err := c.cc.Invoke(ctx, OauthService_DeleteOauthClient_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// OauthServiceServer is the server API for OauthService service.
|
||||||
|
// All implementations must embed UnimplementedOauthServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type OauthServiceServer interface {
|
||||||
|
// === Базовый SSO (вызывается из Gateway / Графаны) ===
|
||||||
|
GenerateOauthCode(context.Context, *GenerateOauthCodeRequest) (*GenerateOauthCodeResponse, error)
|
||||||
|
ExchangeOauthCode(context.Context, *ExchangeOauthCodeRequest) (*ExchangeOauthCodeResponse, error)
|
||||||
|
// === Системные методы (Консоль Разработчика / Админка) ===
|
||||||
|
CreateOauthClient(context.Context, *CreateOauthClientRequest) (*CreateOauthClientResponse, error)
|
||||||
|
GetOauthClients(context.Context, *GetOauthClientsRequest) (*GetOauthClientsResponse, error)
|
||||||
|
UpdateOauthClient(context.Context, *UpdateOauthClientRequest) (*UpdateOauthClientResponse, error)
|
||||||
|
ResetOauthSecret(context.Context, *ResetOauthSecretRequest) (*ResetOauthSecretResponse, error)
|
||||||
|
DeleteOauthClient(context.Context, *DeleteOauthClientRequest) (*DeleteOauthClientResponse, error)
|
||||||
|
mustEmbedUnimplementedOauthServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedOauthServiceServer 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 UnimplementedOauthServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedOauthServiceServer) GenerateOauthCode(context.Context, *GenerateOauthCodeRequest) (*GenerateOauthCodeResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GenerateOauthCode not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) ExchangeOauthCode(context.Context, *ExchangeOauthCodeRequest) (*ExchangeOauthCodeResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method ExchangeOauthCode not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) CreateOauthClient(context.Context, *CreateOauthClientRequest) (*CreateOauthClientResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method CreateOauthClient not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) GetOauthClients(context.Context, *GetOauthClientsRequest) (*GetOauthClientsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetOauthClients not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) UpdateOauthClient(context.Context, *UpdateOauthClientRequest) (*UpdateOauthClientResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method UpdateOauthClient not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) ResetOauthSecret(context.Context, *ResetOauthSecretRequest) (*ResetOauthSecretResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method ResetOauthSecret not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) DeleteOauthClient(context.Context, *DeleteOauthClientRequest) (*DeleteOauthClientResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method DeleteOauthClient not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOauthServiceServer) mustEmbedUnimplementedOauthServiceServer() {}
|
||||||
|
func (UnimplementedOauthServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeOauthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to OauthServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeOauthServiceServer interface {
|
||||||
|
mustEmbedUnimplementedOauthServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterOauthServiceServer(s grpc.ServiceRegistrar, srv OauthServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedOauthServiceServer 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(&OauthService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_GenerateOauthCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GenerateOauthCodeRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).GenerateOauthCode(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_GenerateOauthCode_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).GenerateOauthCode(ctx, req.(*GenerateOauthCodeRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_ExchangeOauthCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ExchangeOauthCodeRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).ExchangeOauthCode(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_ExchangeOauthCode_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).ExchangeOauthCode(ctx, req.(*ExchangeOauthCodeRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_CreateOauthClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateOauthClientRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).CreateOauthClient(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_CreateOauthClient_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).CreateOauthClient(ctx, req.(*CreateOauthClientRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_GetOauthClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetOauthClientsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).GetOauthClients(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_GetOauthClients_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).GetOauthClients(ctx, req.(*GetOauthClientsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_UpdateOauthClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateOauthClientRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).UpdateOauthClient(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_UpdateOauthClient_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).UpdateOauthClient(ctx, req.(*UpdateOauthClientRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_ResetOauthSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ResetOauthSecretRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).ResetOauthSecret(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_ResetOauthSecret_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).ResetOauthSecret(ctx, req.(*ResetOauthSecretRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _OauthService_DeleteOauthClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DeleteOauthClientRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OauthServiceServer).DeleteOauthClient(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: OauthService_DeleteOauthClient_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OauthServiceServer).DeleteOauthClient(ctx, req.(*DeleteOauthClientRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// OauthService_ServiceDesc is the grpc.ServiceDesc for OauthService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var OauthService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "oauth.v1.OauthService",
|
||||||
|
HandlerType: (*OauthServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "GenerateOauthCode",
|
||||||
|
Handler: _OauthService_GenerateOauthCode_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ExchangeOauthCode",
|
||||||
|
Handler: _OauthService_ExchangeOauthCode_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateOauthClient",
|
||||||
|
Handler: _OauthService_CreateOauthClient_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetOauthClients",
|
||||||
|
Handler: _OauthService_GetOauthClients_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateOauthClient",
|
||||||
|
Handler: _OauthService_UpdateOauthClient_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ResetOauthSecret",
|
||||||
|
Handler: _OauthService_ResetOauthSecret_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DeleteOauthClient",
|
||||||
|
Handler: _OauthService_DeleteOauthClient_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "sso/oauth.proto",
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: google/protobuf/struct.proto
|
// source: google/protobuf/struct.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: google/protobuf/timestamp.proto
|
// source: google/protobuf/timestamp.proto
|
||||||
|
|
||||||
|
|||||||
82
gen/media/media.ts
Normal file
82
gen/media/media.ts
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-ts_proto v2.11.8
|
||||||
|
// protoc v4.25.9
|
||||||
|
// source: media/media.proto
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { Metadata } from "@grpc/grpc-js";
|
||||||
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||||||
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
|
export const protobufPackage = "media.v1";
|
||||||
|
|
||||||
|
/** contracts/proto/media/v1/media.proto */
|
||||||
|
|
||||||
|
export interface UploadRequest {
|
||||||
|
fileName: string;
|
||||||
|
/** Сами байты файла */
|
||||||
|
data: Uint8Array;
|
||||||
|
/** "avatar", "chat", "raw" */
|
||||||
|
mode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UploadResponse {
|
||||||
|
fileName: string;
|
||||||
|
size: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetPresignedUrlRequest {
|
||||||
|
fileName: string;
|
||||||
|
/** Если true, ссылка живет 24 часа, иначе 2 минуты */
|
||||||
|
isPublic: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetPresignedUrlResponse {
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const MEDIA_V1_PACKAGE_NAME = "media.v1";
|
||||||
|
|
||||||
|
export interface MediaServiceClient {
|
||||||
|
/** Загрузка файла */
|
||||||
|
|
||||||
|
upload(request: UploadRequest, metadata?: Metadata): Observable<UploadResponse>;
|
||||||
|
|
||||||
|
/** Генерация временной ссылки для скачивания/просмотра */
|
||||||
|
|
||||||
|
getPresignedUrl(request: GetPresignedUrlRequest, metadata?: Metadata): Observable<GetPresignedUrlResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MediaServiceController {
|
||||||
|
/** Загрузка файла */
|
||||||
|
|
||||||
|
upload(
|
||||||
|
request: UploadRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
|
||||||
|
|
||||||
|
/** Генерация временной ссылки для скачивания/просмотра */
|
||||||
|
|
||||||
|
getPresignedUrl(
|
||||||
|
request: GetPresignedUrlRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<GetPresignedUrlResponse> | Observable<GetPresignedUrlResponse> | GetPresignedUrlResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function MediaServiceControllerMethods() {
|
||||||
|
return function (constructor: Function) {
|
||||||
|
const grpcMethods: string[] = ["upload", "getPresignedUrl"];
|
||||||
|
for (const method of grpcMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
const grpcStreamMethods: string[] = [];
|
||||||
|
for (const method of grpcStreamMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcStreamMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const MEDIA_SERVICE_NAME = "MediaService";
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: notifications/notifications.proto
|
// source: notifications/notifications.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: search/search.proto
|
// source: search/search.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: sso/account.proto
|
// source: sso/account.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: sso/auth.proto
|
// source: sso/auth.proto
|
||||||
|
|
||||||
@@ -106,25 +106,6 @@ export interface TerminateSessionResponse {
|
|||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GenerateOauthCodeRequest {
|
|
||||||
userId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GenerateOauthCodeResponse {
|
|
||||||
code: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExchangeOauthCodeRequest {
|
|
||||||
code: string;
|
|
||||||
clientId: string;
|
|
||||||
clientSecret: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExchangeOauthCodeResponse {
|
|
||||||
accessToken: string;
|
|
||||||
expiresIn: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SystemCreateAccountRequest {
|
export interface SystemCreateAccountRequest {
|
||||||
username: string;
|
username: string;
|
||||||
/** Хеш пароля генерирует Admin Service и передает сюда */
|
/** Хеш пароля генерирует Admin Service и передает сюда */
|
||||||
@@ -221,12 +202,6 @@ export interface AuthServiceClient {
|
|||||||
|
|
||||||
terminateSession(request: TerminateSessionRequest, metadata?: Metadata): Observable<TerminateSessionResponse>;
|
terminateSession(request: TerminateSessionRequest, metadata?: Metadata): Observable<TerminateSessionResponse>;
|
||||||
|
|
||||||
/** === OAuth2 SSO === */
|
|
||||||
|
|
||||||
generateOauthCode(request: GenerateOauthCodeRequest, metadata?: Metadata): Observable<GenerateOauthCodeResponse>;
|
|
||||||
|
|
||||||
exchangeOauthCode(request: ExchangeOauthCodeRequest, metadata?: Metadata): Observable<ExchangeOauthCodeResponse>;
|
|
||||||
|
|
||||||
/** Системные методы для админа */
|
/** Системные методы для админа */
|
||||||
|
|
||||||
systemCreateAccount(
|
systemCreateAccount(
|
||||||
@@ -291,18 +266,6 @@ export interface AuthServiceController {
|
|||||||
metadata?: Metadata,
|
metadata?: Metadata,
|
||||||
): Promise<TerminateSessionResponse> | Observable<TerminateSessionResponse> | TerminateSessionResponse;
|
): Promise<TerminateSessionResponse> | Observable<TerminateSessionResponse> | TerminateSessionResponse;
|
||||||
|
|
||||||
/** === OAuth2 SSO === */
|
|
||||||
|
|
||||||
generateOauthCode(
|
|
||||||
request: GenerateOauthCodeRequest,
|
|
||||||
metadata?: Metadata,
|
|
||||||
): Promise<GenerateOauthCodeResponse> | Observable<GenerateOauthCodeResponse> | GenerateOauthCodeResponse;
|
|
||||||
|
|
||||||
exchangeOauthCode(
|
|
||||||
request: ExchangeOauthCodeRequest,
|
|
||||||
metadata?: Metadata,
|
|
||||||
): Promise<ExchangeOauthCodeResponse> | Observable<ExchangeOauthCodeResponse> | ExchangeOauthCodeResponse;
|
|
||||||
|
|
||||||
/** Системные методы для админа */
|
/** Системные методы для админа */
|
||||||
|
|
||||||
systemCreateAccount(
|
systemCreateAccount(
|
||||||
@@ -352,8 +315,6 @@ export function AuthServiceControllerMethods() {
|
|||||||
"logoutOther",
|
"logoutOther",
|
||||||
"getSessions",
|
"getSessions",
|
||||||
"terminateSession",
|
"terminateSession",
|
||||||
"generateOauthCode",
|
|
||||||
"exchangeOauthCode",
|
|
||||||
"systemCreateAccount",
|
"systemCreateAccount",
|
||||||
"systemChangeStatus",
|
"systemChangeStatus",
|
||||||
"systemUpdatePassword",
|
"systemUpdatePassword",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: sso/ldap-auth.proto
|
// source: sso/ldap-auth.proto
|
||||||
|
|
||||||
|
|||||||
197
gen/sso/oauth.ts
Normal file
197
gen/sso/oauth.ts
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-ts_proto v2.11.8
|
||||||
|
// protoc v4.25.9
|
||||||
|
// source: sso/oauth.proto
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { Metadata } from "@grpc/grpc-js";
|
||||||
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||||||
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
|
export const protobufPackage = "oauth.v1";
|
||||||
|
|
||||||
|
/** --- Сообщения для базового SSO --- */
|
||||||
|
export interface GenerateOauthCodeRequest {
|
||||||
|
userId: string;
|
||||||
|
clientId: string;
|
||||||
|
redirectUri: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GenerateOauthCodeResponse {
|
||||||
|
code: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExchangeOauthCodeRequest {
|
||||||
|
code: string;
|
||||||
|
clientId: string;
|
||||||
|
clientSecret: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExchangeOauthCodeResponse {
|
||||||
|
accessToken: string;
|
||||||
|
expiresIn: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** --- Сообщения для управления клиентами --- */
|
||||||
|
export interface CreateOauthClientRequest {
|
||||||
|
ownerId: string;
|
||||||
|
name: string;
|
||||||
|
redirectUris: string[];
|
||||||
|
description?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreateOauthClientResponse {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
clientId: string;
|
||||||
|
/** Отдается ТОЛЬКО здесь один раз */
|
||||||
|
plainSecret: string;
|
||||||
|
redirectUris: string[];
|
||||||
|
ownerId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetOauthClientsRequest {
|
||||||
|
ownerId: string;
|
||||||
|
/** Если true, owner_id игнорируется, выдаются все клиенты */
|
||||||
|
isAdmin: boolean;
|
||||||
|
limit: number;
|
||||||
|
offset: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OauthClientItem {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
clientId: string;
|
||||||
|
redirectUris: string[];
|
||||||
|
description?: string | undefined;
|
||||||
|
ownerId: string;
|
||||||
|
createdAt: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetOauthClientsResponse {
|
||||||
|
clients: OauthClientItem[];
|
||||||
|
total: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UpdateOauthClientRequest {
|
||||||
|
clientId: string;
|
||||||
|
/** ID того, кто делает запрос */
|
||||||
|
ownerId: string;
|
||||||
|
isAdmin: boolean;
|
||||||
|
name?: string | undefined;
|
||||||
|
redirectUris: string[];
|
||||||
|
description?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UpdateOauthClientResponse {
|
||||||
|
success: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResetOauthSecretRequest {
|
||||||
|
clientId: string;
|
||||||
|
ownerId: string;
|
||||||
|
isAdmin: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResetOauthSecretResponse {
|
||||||
|
newPlainSecret: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DeleteOauthClientRequest {
|
||||||
|
clientId: string;
|
||||||
|
ownerId: string;
|
||||||
|
isAdmin: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DeleteOauthClientResponse {
|
||||||
|
success: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const OAUTH_V1_PACKAGE_NAME = "oauth.v1";
|
||||||
|
|
||||||
|
export interface OauthServiceClient {
|
||||||
|
/** === Базовый SSO (вызывается из Gateway / Графаны) === */
|
||||||
|
|
||||||
|
generateOauthCode(request: GenerateOauthCodeRequest, metadata?: Metadata): Observable<GenerateOauthCodeResponse>;
|
||||||
|
|
||||||
|
exchangeOauthCode(request: ExchangeOauthCodeRequest, metadata?: Metadata): Observable<ExchangeOauthCodeResponse>;
|
||||||
|
|
||||||
|
/** === Системные методы (Консоль Разработчика / Админка) === */
|
||||||
|
|
||||||
|
createOauthClient(request: CreateOauthClientRequest, metadata?: Metadata): Observable<CreateOauthClientResponse>;
|
||||||
|
|
||||||
|
getOauthClients(request: GetOauthClientsRequest, metadata?: Metadata): Observable<GetOauthClientsResponse>;
|
||||||
|
|
||||||
|
updateOauthClient(request: UpdateOauthClientRequest, metadata?: Metadata): Observable<UpdateOauthClientResponse>;
|
||||||
|
|
||||||
|
resetOauthSecret(request: ResetOauthSecretRequest, metadata?: Metadata): Observable<ResetOauthSecretResponse>;
|
||||||
|
|
||||||
|
deleteOauthClient(request: DeleteOauthClientRequest, metadata?: Metadata): Observable<DeleteOauthClientResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OauthServiceController {
|
||||||
|
/** === Базовый SSO (вызывается из Gateway / Графаны) === */
|
||||||
|
|
||||||
|
generateOauthCode(
|
||||||
|
request: GenerateOauthCodeRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<GenerateOauthCodeResponse> | Observable<GenerateOauthCodeResponse> | GenerateOauthCodeResponse;
|
||||||
|
|
||||||
|
exchangeOauthCode(
|
||||||
|
request: ExchangeOauthCodeRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<ExchangeOauthCodeResponse> | Observable<ExchangeOauthCodeResponse> | ExchangeOauthCodeResponse;
|
||||||
|
|
||||||
|
/** === Системные методы (Консоль Разработчика / Админка) === */
|
||||||
|
|
||||||
|
createOauthClient(
|
||||||
|
request: CreateOauthClientRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<CreateOauthClientResponse> | Observable<CreateOauthClientResponse> | CreateOauthClientResponse;
|
||||||
|
|
||||||
|
getOauthClients(
|
||||||
|
request: GetOauthClientsRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<GetOauthClientsResponse> | Observable<GetOauthClientsResponse> | GetOauthClientsResponse;
|
||||||
|
|
||||||
|
updateOauthClient(
|
||||||
|
request: UpdateOauthClientRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<UpdateOauthClientResponse> | Observable<UpdateOauthClientResponse> | UpdateOauthClientResponse;
|
||||||
|
|
||||||
|
resetOauthSecret(
|
||||||
|
request: ResetOauthSecretRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<ResetOauthSecretResponse> | Observable<ResetOauthSecretResponse> | ResetOauthSecretResponse;
|
||||||
|
|
||||||
|
deleteOauthClient(
|
||||||
|
request: DeleteOauthClientRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<DeleteOauthClientResponse> | Observable<DeleteOauthClientResponse> | DeleteOauthClientResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function OauthServiceControllerMethods() {
|
||||||
|
return function (constructor: Function) {
|
||||||
|
const grpcMethods: string[] = [
|
||||||
|
"generateOauthCode",
|
||||||
|
"exchangeOauthCode",
|
||||||
|
"createOauthClient",
|
||||||
|
"getOauthClients",
|
||||||
|
"updateOauthClient",
|
||||||
|
"resetOauthSecret",
|
||||||
|
"deleteOauthClient",
|
||||||
|
];
|
||||||
|
for (const method of grpcMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcMethod("OauthService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
const grpcStreamMethods: string[] = [];
|
||||||
|
for (const method of grpcStreamMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcStreamMethod("OauthService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const OAUTH_SERVICE_NAME = "OauthService";
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: sso/twofa.proto
|
// source: sso/twofa.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: users/ldap.proto
|
// source: users/ldap.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.11.6
|
// protoc-gen-ts_proto v2.11.8
|
||||||
// protoc v4.25.9
|
// protoc v4.25.9
|
||||||
// source: users/users.proto
|
// source: users/users.proto
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.2.36",
|
"version": "1.2.43",
|
||||||
"description": "Protobuf definitions and generated TypeScript types",
|
"description": "Protobuf definitions and generated TypeScript types",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ service ChatService {
|
|||||||
|
|
||||||
// Статусы
|
// Статусы
|
||||||
rpc MarkAsRead(MarkAsReadRequest) returns (MarkAsReadResponse);
|
rpc MarkAsRead(MarkAsReadRequest) returns (MarkAsReadResponse);
|
||||||
|
|
||||||
|
rpc CheckChatMembership(CheckChatMembershipRequest) returns (CheckChatMembershipResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- СТРУКТУРЫ ДАННЫХ --- //
|
// --- СТРУКТУРЫ ДАННЫХ --- //
|
||||||
@@ -152,3 +154,13 @@ message MarkAsReadRequest {
|
|||||||
string message_id = 3; // ID последнего видимого сообщения
|
string message_id = 3; // ID последнего видимого сообщения
|
||||||
}
|
}
|
||||||
message MarkAsReadResponse { bool success = 1; }
|
message MarkAsReadResponse { bool success = 1; }
|
||||||
|
|
||||||
|
|
||||||
|
message CheckChatMembershipRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string chat_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CheckChatMembershipResponse {
|
||||||
|
bool is_member = 1;
|
||||||
|
}
|
||||||
33
proto/media/media.proto
Normal file
33
proto/media/media.proto
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
// contracts/proto/media/v1/media.proto
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package media.v1;
|
||||||
|
|
||||||
|
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
|
||||||
|
|
||||||
|
service MediaService {
|
||||||
|
// Загрузка файла
|
||||||
|
rpc Upload(UploadRequest) returns (UploadResponse);
|
||||||
|
// Генерация временной ссылки для скачивания/просмотра
|
||||||
|
rpc GetPresignedUrl(GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
message UploadRequest {
|
||||||
|
string file_name = 1;
|
||||||
|
bytes data = 2; // Сами байты файла
|
||||||
|
string mode = 3; // "avatar", "chat", "raw"
|
||||||
|
}
|
||||||
|
|
||||||
|
message UploadResponse {
|
||||||
|
string file_name = 1;
|
||||||
|
int64 size = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetPresignedUrlRequest {
|
||||||
|
string file_name = 1;
|
||||||
|
bool is_public = 2; // Если true, ссылка живет 24 часа, иначе 2 минуты
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetPresignedUrlResponse {
|
||||||
|
string url = 1;
|
||||||
|
}
|
||||||
@@ -14,9 +14,6 @@ service AuthService {
|
|||||||
rpc GetSessions(GetSessionRequest) returns (GetSessionsResponse);
|
rpc GetSessions(GetSessionRequest) returns (GetSessionsResponse);
|
||||||
rpc TerminateSession(TerminateSessionRequest) returns (TerminateSessionResponse);
|
rpc TerminateSession(TerminateSessionRequest) returns (TerminateSessionResponse);
|
||||||
|
|
||||||
// === OAuth2 SSO ===
|
|
||||||
rpc GenerateOauthCode (GenerateOauthCodeRequest) returns (GenerateOauthCodeResponse);
|
|
||||||
rpc ExchangeOauthCode (ExchangeOauthCodeRequest) returns (ExchangeOauthCodeResponse);
|
|
||||||
|
|
||||||
// Системные методы для админа
|
// Системные методы для админа
|
||||||
rpc SystemCreateAccount (SystemCreateAccountRequest) returns (SystemCreateAccountResponse);
|
rpc SystemCreateAccount (SystemCreateAccountRequest) returns (SystemCreateAccountResponse);
|
||||||
@@ -118,27 +115,6 @@ message TerminateSessionResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// === Сообщения для OAuth2 SSO ===
|
|
||||||
|
|
||||||
message GenerateOauthCodeRequest {
|
|
||||||
string user_id = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GenerateOauthCodeResponse {
|
|
||||||
string code = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ExchangeOauthCodeRequest {
|
|
||||||
string code = 1;
|
|
||||||
string client_id = 2;
|
|
||||||
string client_secret = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ExchangeOauthCodeResponse {
|
|
||||||
string access_token = 1;
|
|
||||||
int32 expires_in = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message SystemCreateAccountRequest {
|
message SystemCreateAccountRequest {
|
||||||
string username = 1;
|
string username = 1;
|
||||||
string password_hash = 2; // Хеш пароля генерирует Admin Service и передает сюда
|
string password_hash = 2; // Хеш пароля генерирует Admin Service и передает сюда
|
||||||
|
|||||||
112
proto/sso/oauth.proto
Normal file
112
proto/sso/oauth.proto
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package oauth.v1;
|
||||||
|
|
||||||
|
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
|
||||||
|
|
||||||
|
service OauthService {
|
||||||
|
// === Базовый SSO (вызывается из Gateway / Графаны) ===
|
||||||
|
rpc GenerateOauthCode (GenerateOauthCodeRequest) returns (GenerateOauthCodeResponse);
|
||||||
|
rpc ExchangeOauthCode (ExchangeOauthCodeRequest) returns (ExchangeOauthCodeResponse);
|
||||||
|
|
||||||
|
// === Системные методы (Консоль Разработчика / Админка) ===
|
||||||
|
rpc CreateOauthClient (CreateOauthClientRequest) returns (CreateOauthClientResponse);
|
||||||
|
rpc GetOauthClients (GetOauthClientsRequest) returns (GetOauthClientsResponse);
|
||||||
|
rpc UpdateOauthClient (UpdateOauthClientRequest) returns (UpdateOauthClientResponse);
|
||||||
|
rpc ResetOauthSecret (ResetOauthSecretRequest) returns (ResetOauthSecretResponse);
|
||||||
|
rpc DeleteOauthClient (DeleteOauthClientRequest) returns (DeleteOauthClientResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Сообщения для базового SSO ---
|
||||||
|
message GenerateOauthCodeRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string client_id = 2;
|
||||||
|
string redirect_uri = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GenerateOauthCodeResponse {
|
||||||
|
string code = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExchangeOauthCodeRequest {
|
||||||
|
string code = 1;
|
||||||
|
string client_id = 2;
|
||||||
|
string client_secret = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExchangeOauthCodeResponse {
|
||||||
|
string access_token = 1;
|
||||||
|
int32 expires_in = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Сообщения для управления клиентами ---
|
||||||
|
message CreateOauthClientRequest {
|
||||||
|
string owner_id = 1;
|
||||||
|
string name = 2;
|
||||||
|
repeated string redirect_uris = 3;
|
||||||
|
optional string description = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateOauthClientResponse {
|
||||||
|
string id = 1;
|
||||||
|
string name = 2;
|
||||||
|
string client_id = 3;
|
||||||
|
string plain_secret = 4; // Отдается ТОЛЬКО здесь один раз
|
||||||
|
repeated string redirect_uris = 5;
|
||||||
|
string owner_id = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOauthClientsRequest {
|
||||||
|
string owner_id = 1;
|
||||||
|
bool is_admin = 2; // Если true, owner_id игнорируется, выдаются все клиенты
|
||||||
|
int32 limit = 3;
|
||||||
|
int32 offset = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message OauthClientItem {
|
||||||
|
string id = 1;
|
||||||
|
string name = 2;
|
||||||
|
string client_id = 3;
|
||||||
|
repeated string redirect_uris = 4;
|
||||||
|
optional string description = 5;
|
||||||
|
string owner_id = 6;
|
||||||
|
int64 created_at = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOauthClientsResponse {
|
||||||
|
repeated OauthClientItem clients = 1;
|
||||||
|
int32 total = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateOauthClientRequest {
|
||||||
|
string client_id = 1;
|
||||||
|
string owner_id = 2; // ID того, кто делает запрос
|
||||||
|
bool is_admin = 3;
|
||||||
|
optional string name = 4;
|
||||||
|
repeated string redirect_uris = 5;
|
||||||
|
optional string description = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateOauthClientResponse {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResetOauthSecretRequest {
|
||||||
|
string client_id = 1;
|
||||||
|
string owner_id = 2;
|
||||||
|
bool is_admin = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResetOauthSecretResponse {
|
||||||
|
string new_plain_secret = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteOauthClientRequest {
|
||||||
|
string client_id = 1;
|
||||||
|
string owner_id = 2;
|
||||||
|
bool is_admin = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteOauthClientResponse {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ export const PROTO_PATHS = {
|
|||||||
LDAP_AUTH: join(__dirname, "../../proto/sso/ldap-auth.proto"),
|
LDAP_AUTH: join(__dirname, "../../proto/sso/ldap-auth.proto"),
|
||||||
ACCOUNT: join(__dirname, "../../proto/sso/account.proto"),
|
ACCOUNT: join(__dirname, "../../proto/sso/account.proto"),
|
||||||
TWOFA: join(__dirname, "../../proto/sso/twofa.proto"),
|
TWOFA: join(__dirname, "../../proto/sso/twofa.proto"),
|
||||||
|
OAUTH: join(__dirname, "../../proto/sso/oauth.proto"),
|
||||||
ADMIN: join(__dirname, "../../proto/admin/admin-account.proto"),
|
ADMIN: join(__dirname, "../../proto/admin/admin-account.proto"),
|
||||||
RBAC: join(__dirname, "../../proto/admin/rbac.proto"),
|
RBAC: join(__dirname, "../../proto/admin/rbac.proto"),
|
||||||
USERS: join(__dirname, "../../proto/users/users.proto"),
|
USERS: join(__dirname, "../../proto/users/users.proto"),
|
||||||
@@ -16,4 +17,5 @@ export const PROTO_PATHS = {
|
|||||||
"../../proto/notifications/notifications.proto",
|
"../../proto/notifications/notifications.proto",
|
||||||
),
|
),
|
||||||
CHAT: join(__dirname, "../../proto/chat/chat.proto"),
|
CHAT: join(__dirname, "../../proto/chat/chat.proto"),
|
||||||
|
MEDIA: join(__dirname, "../../proto/media/media.proto"),
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user