chore: auto-generate protobuf files [skip ci]
This commit is contained in:
@@ -605,6 +605,282 @@ func (x *GetAccountRoleLevelResponse) GetRoleLevel() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetSessionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetSessionRequest) Reset() {
|
||||
*x = GetSessionRequest{}
|
||||
mi := &file_auth_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetSessionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetSessionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetSessionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetSessionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *GetSessionRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetSessionRequest) GetSessionId() string {
|
||||
if x != nil {
|
||||
return x.SessionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SessionItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Здесь будет лежать захэшированный ID
|
||||
IpAddress string `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
|
||||
UserAgent string `protobuf:"bytes,3,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
|
||||
LastActivity int64 `protobuf:"varint,4,opt,name=last_activity,json=lastActivity,proto3" json:"last_activity,omitempty"` // Unix timestamp в миллисекундах
|
||||
IsCurrent bool `protobuf:"varint,5,opt,name=is_current,json=isCurrent,proto3" json:"is_current,omitempty"` // Флаг текущей сессии
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SessionItem) Reset() {
|
||||
*x = SessionItem{}
|
||||
mi := &file_auth_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SessionItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SessionItem) ProtoMessage() {}
|
||||
|
||||
func (x *SessionItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[11]
|
||||
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 SessionItem.ProtoReflect.Descriptor instead.
|
||||
func (*SessionItem) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *SessionItem) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SessionItem) GetIpAddress() string {
|
||||
if x != nil {
|
||||
return x.IpAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SessionItem) GetUserAgent() string {
|
||||
if x != nil {
|
||||
return x.UserAgent
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SessionItem) GetLastActivity() int64 {
|
||||
if x != nil {
|
||||
return x.LastActivity
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SessionItem) GetIsCurrent() bool {
|
||||
if x != nil {
|
||||
return x.IsCurrent
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type GetSessionsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Sessions []*SessionItem `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetSessionsResponse) Reset() {
|
||||
*x = GetSessionsResponse{}
|
||||
mi := &file_auth_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetSessionsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetSessionsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetSessionsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[12]
|
||||
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 GetSessionsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetSessionsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *GetSessionsResponse) GetSessions() []*SessionItem {
|
||||
if x != nil {
|
||||
return x.Sessions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TerminateSessionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
TargetHash string `protobuf:"bytes,2,opt,name=target_hash,json=targetHash,proto3" json:"target_hash,omitempty"` // Хэш сессии, которую нужно убить
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TerminateSessionRequest) Reset() {
|
||||
*x = TerminateSessionRequest{}
|
||||
mi := &file_auth_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TerminateSessionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TerminateSessionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *TerminateSessionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[13]
|
||||
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 TerminateSessionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*TerminateSessionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *TerminateSessionRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TerminateSessionRequest) GetTargetHash() string {
|
||||
if x != nil {
|
||||
return x.TargetHash
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TerminateSessionResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TerminateSessionResponse) Reset() {
|
||||
*x = TerminateSessionResponse{}
|
||||
mi := &file_auth_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TerminateSessionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TerminateSessionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *TerminateSessionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[14]
|
||||
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 TerminateSessionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*TerminateSessionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *TerminateSessionResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TerminateSessionResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_auth_proto_rawDesc = "" +
|
||||
@@ -665,14 +941,38 @@ const file_auth_proto_rawDesc = "" +
|
||||
"\x1bGetAccountRoleLevelResponse\x12\x14\n" +
|
||||
"\x05found\x18\x01 \x01(\bR\x05found\x12\x1d\n" +
|
||||
"\n" +
|
||||
"role_level\x18\x02 \x01(\x05R\troleLevel2\xaa\x03\n" +
|
||||
"role_level\x18\x02 \x01(\x05R\troleLevel\"K\n" +
|
||||
"\x11GetSessionRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x02 \x01(\tR\tsessionId\"\x9f\x01\n" +
|
||||
"\vSessionItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" +
|
||||
"\n" +
|
||||
"ip_address\x18\x02 \x01(\tR\tipAddress\x12\x1d\n" +
|
||||
"\n" +
|
||||
"user_agent\x18\x03 \x01(\tR\tuserAgent\x12#\n" +
|
||||
"\rlast_activity\x18\x04 \x01(\x03R\flastActivity\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_current\x18\x05 \x01(\bR\tisCurrent\"G\n" +
|
||||
"\x13GetSessionsResponse\x120\n" +
|
||||
"\bsessions\x18\x01 \x03(\v2\x14.auth.v1.SessionItemR\bsessions\"S\n" +
|
||||
"\x17TerminateSessionRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1f\n" +
|
||||
"\vtarget_hash\x18\x02 \x01(\tR\n" +
|
||||
"targetHash\"N\n" +
|
||||
"\x18TerminateSessionResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage2\xcc\x04\n" +
|
||||
"\vAuthService\x126\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" +
|
||||
"\vVerifyToken\x12\x1b.auth.v1.VerifyTokenRequest\x1a\x1c.auth.v1.VerifyTokenResponse\x12`\n" +
|
||||
"\x13GetAccountRoleLevel\x12#.auth.v1.GetAccountRoleLevelRequest\x1a$.auth.v1.GetAccountRoleLevelResponse\x129\n" +
|
||||
"\x06Logout\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12>\n" +
|
||||
"\vLogoutOther\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||
"\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" +
|
||||
"\x10TerminateSession\x12 .auth.v1.TerminateSessionRequest\x1a!.auth.v1.TerminateSessionResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||
|
||||
var (
|
||||
file_auth_proto_rawDescOnce sync.Once
|
||||
@@ -686,7 +986,7 @@ func file_auth_proto_rawDescGZIP() []byte {
|
||||
return file_auth_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_auth_proto_goTypes = []any{
|
||||
(*LoginRequest)(nil), // 0: auth.v1.LoginRequest
|
||||
(*LoginResponse)(nil), // 1: auth.v1.LoginResponse
|
||||
@@ -698,25 +998,35 @@ var file_auth_proto_goTypes = []any{
|
||||
(*VerifyTokenResponse)(nil), // 7: auth.v1.VerifyTokenResponse
|
||||
(*GetAccountRoleLevelRequest)(nil), // 8: auth.v1.GetAccountRoleLevelRequest
|
||||
(*GetAccountRoleLevelResponse)(nil), // 9: auth.v1.GetAccountRoleLevelResponse
|
||||
(*GetSessionRequest)(nil), // 10: auth.v1.GetSessionRequest
|
||||
(*SessionItem)(nil), // 11: auth.v1.SessionItem
|
||||
(*GetSessionsResponse)(nil), // 12: auth.v1.GetSessionsResponse
|
||||
(*TerminateSessionRequest)(nil), // 13: auth.v1.TerminateSessionRequest
|
||||
(*TerminateSessionResponse)(nil), // 14: auth.v1.TerminateSessionResponse
|
||||
}
|
||||
var file_auth_proto_depIdxs = []int32{
|
||||
0, // 0: auth.v1.AuthService.Login:input_type -> auth.v1.LoginRequest
|
||||
2, // 1: auth.v1.AuthService.Refresh:input_type -> auth.v1.RefreshRequest
|
||||
6, // 2: auth.v1.AuthService.VerifyToken:input_type -> auth.v1.VerifyTokenRequest
|
||||
8, // 3: auth.v1.AuthService.GetAccountRoleLevel:input_type -> auth.v1.GetAccountRoleLevelRequest
|
||||
4, // 4: auth.v1.AuthService.Logout:input_type -> auth.v1.LogoutRequest
|
||||
4, // 5: auth.v1.AuthService.LogoutOther:input_type -> auth.v1.LogoutRequest
|
||||
1, // 6: auth.v1.AuthService.Login:output_type -> auth.v1.LoginResponse
|
||||
3, // 7: auth.v1.AuthService.Refresh:output_type -> auth.v1.RefreshResponse
|
||||
7, // 8: auth.v1.AuthService.VerifyToken:output_type -> auth.v1.VerifyTokenResponse
|
||||
9, // 9: auth.v1.AuthService.GetAccountRoleLevel:output_type -> auth.v1.GetAccountRoleLevelResponse
|
||||
5, // 10: auth.v1.AuthService.Logout:output_type -> auth.v1.LogoutResponse
|
||||
5, // 11: auth.v1.AuthService.LogoutOther:output_type -> auth.v1.LogoutResponse
|
||||
6, // [6:12] is the sub-list for method output_type
|
||||
0, // [0:6] 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
|
||||
11, // 0: auth.v1.GetSessionsResponse.sessions:type_name -> auth.v1.SessionItem
|
||||
0, // 1: auth.v1.AuthService.Login:input_type -> auth.v1.LoginRequest
|
||||
2, // 2: auth.v1.AuthService.Refresh:input_type -> auth.v1.RefreshRequest
|
||||
6, // 3: auth.v1.AuthService.VerifyToken:input_type -> auth.v1.VerifyTokenRequest
|
||||
8, // 4: auth.v1.AuthService.GetAccountRoleLevel:input_type -> auth.v1.GetAccountRoleLevelRequest
|
||||
4, // 5: auth.v1.AuthService.Logout:input_type -> auth.v1.LogoutRequest
|
||||
4, // 6: auth.v1.AuthService.LogoutOther:input_type -> auth.v1.LogoutRequest
|
||||
10, // 7: auth.v1.AuthService.GetSessions:input_type -> auth.v1.GetSessionRequest
|
||||
13, // 8: auth.v1.AuthService.TerminateSession:input_type -> auth.v1.TerminateSessionRequest
|
||||
1, // 9: auth.v1.AuthService.Login:output_type -> auth.v1.LoginResponse
|
||||
3, // 10: auth.v1.AuthService.Refresh:output_type -> auth.v1.RefreshResponse
|
||||
7, // 11: auth.v1.AuthService.VerifyToken:output_type -> auth.v1.VerifyTokenResponse
|
||||
9, // 12: auth.v1.AuthService.GetAccountRoleLevel:output_type -> auth.v1.GetAccountRoleLevelResponse
|
||||
5, // 13: auth.v1.AuthService.Logout:output_type -> auth.v1.LogoutResponse
|
||||
5, // 14: auth.v1.AuthService.LogoutOther:output_type -> auth.v1.LogoutResponse
|
||||
12, // 15: auth.v1.AuthService.GetSessions:output_type -> auth.v1.GetSessionsResponse
|
||||
14, // 16: auth.v1.AuthService.TerminateSession:output_type -> auth.v1.TerminateSessionResponse
|
||||
9, // [9:17] is the sub-list for method output_type
|
||||
1, // [1:9] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_auth_proto_init() }
|
||||
@@ -732,7 +1042,7 @@ func file_auth_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumMessages: 15,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user