mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 13:10:24 +08:00 
			
		
		
		
	增加管理员和用户登录SESSION API
This commit is contained in:
		@@ -3716,6 +3716,49 @@
 | 
			
		||||
      "filename": "service_login.proto",
 | 
			
		||||
      "doc": "认证相关服务"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "LoginSessionService",
 | 
			
		||||
      "methods": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "createLoginSession",
 | 
			
		||||
          "requestMessageName": "CreateLoginSessionRequest",
 | 
			
		||||
          "responseMessageName": "RPCSuccess",
 | 
			
		||||
          "code": "rpc createLoginSession(CreateLoginSessionRequest) returns (RPCSuccess);",
 | 
			
		||||
          "doc": "创建SESSION",
 | 
			
		||||
          "roles": [],
 | 
			
		||||
          "isDeprecated": false
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "name": "writeLoginSessionValue",
 | 
			
		||||
          "requestMessageName": "WriteLoginSessionValueRequest",
 | 
			
		||||
          "responseMessageName": "RPCSuccess",
 | 
			
		||||
          "code": "rpc writeLoginSessionValue(WriteLoginSessionValueRequest) returns (RPCSuccess);",
 | 
			
		||||
          "doc": "写入SESSION数据",
 | 
			
		||||
          "roles": [],
 | 
			
		||||
          "isDeprecated": false
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "name": "deleteLoginSession",
 | 
			
		||||
          "requestMessageName": "DeleteLoginSessionRequest",
 | 
			
		||||
          "responseMessageName": "RPCSuccess",
 | 
			
		||||
          "code": "rpc deleteLoginSession(DeleteLoginSessionRequest) returns (RPCSuccess);",
 | 
			
		||||
          "doc": "删除SESSION",
 | 
			
		||||
          "roles": [],
 | 
			
		||||
          "isDeprecated": false
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "name": "findLoginSession",
 | 
			
		||||
          "requestMessageName": "FindLoginSessionRequest",
 | 
			
		||||
          "responseMessageName": "FindLoginSessionResponse",
 | 
			
		||||
          "code": "rpc findLoginSession(FindLoginSessionRequest) returns (FindLoginSessionResponse);",
 | 
			
		||||
          "doc": "查找SESSION",
 | 
			
		||||
          "roles": [],
 | 
			
		||||
          "isDeprecated": false
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "filename": "service_login_session.proto",
 | 
			
		||||
      "doc": "登录SESSION服务"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "MessageService",
 | 
			
		||||
      "methods": [
 | 
			
		||||
@@ -13749,6 +13792,11 @@
 | 
			
		||||
      "code": "message CreateLogResponse {\n\n}",
 | 
			
		||||
      "doc": ""
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "CreateLoginSessionRequest",
 | 
			
		||||
      "code": "message CreateLoginSessionRequest {\n\tstring sid = 1; // SESSION ID\n\tstring ip = 2; // 登录IP\n\tint64 expiresAt = 3; // 过期时间\n}",
 | 
			
		||||
      "doc": "创建SESSION"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "CreateMessageMediaInstanceRequest",
 | 
			
		||||
      "code": "message CreateMessageMediaInstanceRequest {\n\tstring name = 1;\n\tstring mediaType = 2;\n\tbytes paramsJSON = 3;\n\trepeated int64 groupIds = 4;\n\tstring description = 5;\n\tbytes rateJSON = 6;\n\tint32 hashLife = 7;\n}",
 | 
			
		||||
@@ -14494,6 +14542,11 @@
 | 
			
		||||
      "code": "message DeleteLogPermanentlyRequest {\n\tint64 logId = 1;\n}",
 | 
			
		||||
      "doc": "删除单条"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "DeleteLoginSessionRequest",
 | 
			
		||||
      "code": "message DeleteLoginSessionRequest {\n\tstring sid = 1;\n}",
 | 
			
		||||
      "doc": "删除SESSION"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "DeleteLogsPermanentlyRequest",
 | 
			
		||||
      "code": "message DeleteLogsPermanentlyRequest {\n\trepeated int64 logIds = 1;\n}",
 | 
			
		||||
@@ -17289,6 +17342,16 @@
 | 
			
		||||
      "code": "message FindLatestUserEmailVerificationResponse {\n\tUserEmailVerification userEmailVerification = 1;\n}",
 | 
			
		||||
      "doc": ""
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "FindLoginSessionRequest",
 | 
			
		||||
      "code": "message FindLoginSessionRequest {\n\tstring sid = 1;\n}",
 | 
			
		||||
      "doc": "查找SESSION"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "FindLoginSessionResponse",
 | 
			
		||||
      "code": "message FindLoginSessionResponse {\n\tLoginSession loginSession = 1;\n}",
 | 
			
		||||
      "doc": ""
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "FindNSAccessLogRequest",
 | 
			
		||||
      "code": "message FindNSAccessLogRequest {\n\tstring requestId = 1;\n}",
 | 
			
		||||
@@ -19019,6 +19082,11 @@
 | 
			
		||||
      "code": "message LoginAdminResponse {\n\tint64 adminId = 1;\n\tbool isOk = 2;\n\tstring message = 3;\n}",
 | 
			
		||||
      "doc": ""
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "LoginSession",
 | 
			
		||||
      "code": "message LoginSession {\n\tint64 id = 1;\n\tint64 adminId = 2;\n\tint64 userId = 3;\n\tstring sid = 4;\n\tbytes valuesJSON = 5;\n\tstring ip = 6;\n\tint64 createdAt = 7;\n\tint64 expiresAt = 8;\n}",
 | 
			
		||||
      "doc": "登录SESSION"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "LoginUserRequest",
 | 
			
		||||
      "code": "message LoginUserRequest {\n\tstring username = 1;\n\tstring password = 2;\n}",
 | 
			
		||||
@@ -21093,6 +21161,11 @@
 | 
			
		||||
      "name": "WriteHTTPAccessLogPolicyRequest",
 | 
			
		||||
      "code": "message WriteHTTPAccessLogPolicyRequest {\n\tint64 httpAccessLogPolicyId = 1;\n\tHTTPAccessLog httpAccessLog = 2;\n}",
 | 
			
		||||
      "doc": "测试写入某个访问日志策略"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "WriteLoginSessionValueRequest",
 | 
			
		||||
      "code": "message WriteLoginSessionValueRequest {\n\tstring sid = 1;\n\tstring key = 2;\n\tstring value = 3;\n}",
 | 
			
		||||
      "doc": "写入SESSION数据"
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "links": [
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										215
									
								
								pkg/rpc/pb/model_login_session.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										215
									
								
								pkg/rpc/pb/model_login_session.pb.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,215 @@
 | 
			
		||||
// Code generated by protoc-gen-go. DO NOT EDIT.
 | 
			
		||||
// versions:
 | 
			
		||||
// 	protoc-gen-go v1.25.0
 | 
			
		||||
// 	protoc        v3.19.4
 | 
			
		||||
// source: models/model_login_session.proto
 | 
			
		||||
 | 
			
		||||
package pb
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	proto "github.com/golang/protobuf/proto"
 | 
			
		||||
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 | 
			
		||||
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 | 
			
		||||
	reflect "reflect"
 | 
			
		||||
	sync "sync"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// This is a compile-time assertion that a sufficiently up-to-date version
 | 
			
		||||
// of the legacy proto package is being used.
 | 
			
		||||
const _ = proto.ProtoPackageIsVersion4
 | 
			
		||||
 | 
			
		||||
// 登录SESSION
 | 
			
		||||
type LoginSession struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
 | 
			
		||||
	AdminId    int64  `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"`
 | 
			
		||||
	UserId     int64  `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
 | 
			
		||||
	Sid        string `protobuf:"bytes,4,opt,name=sid,proto3" json:"sid,omitempty"`
 | 
			
		||||
	ValuesJSON []byte `protobuf:"bytes,5,opt,name=valuesJSON,proto3" json:"valuesJSON,omitempty"`
 | 
			
		||||
	Ip         string `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"`
 | 
			
		||||
	CreatedAt  int64  `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
 | 
			
		||||
	ExpiresAt  int64  `protobuf:"varint,8,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) Reset() {
 | 
			
		||||
	*x = LoginSession{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_models_model_login_session_proto_msgTypes[0]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*LoginSession) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_models_model_login_session_proto_msgTypes[0]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use LoginSession.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*LoginSession) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_models_model_login_session_proto_rawDescGZIP(), []int{0}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Id
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetAdminId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.AdminId
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetUserId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.UserId
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetSid() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Sid
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetValuesJSON() []byte {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.ValuesJSON
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetIp() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Ip
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetCreatedAt() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.CreatedAt
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *LoginSession) GetExpiresAt() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.ExpiresAt
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var File_models_model_login_session_proto protoreflect.FileDescriptor
 | 
			
		||||
 | 
			
		||||
var file_models_model_login_session_proto_rawDesc = []byte{
 | 
			
		||||
	0x0a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c,
 | 
			
		||||
	0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
 | 
			
		||||
	0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xce, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
 | 
			
		||||
	0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
 | 
			
		||||
	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e,
 | 
			
		||||
	0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49,
 | 
			
		||||
	0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
 | 
			
		||||
	0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64,
 | 
			
		||||
	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x76,
 | 
			
		||||
	0x61, 0x6c, 0x75, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52,
 | 
			
		||||
	0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
 | 
			
		||||
	0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x63,
 | 
			
		||||
	0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
 | 
			
		||||
	0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70,
 | 
			
		||||
	0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78,
 | 
			
		||||
	0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
 | 
			
		||||
	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	file_models_model_login_session_proto_rawDescOnce sync.Once
 | 
			
		||||
	file_models_model_login_session_proto_rawDescData = file_models_model_login_session_proto_rawDesc
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func file_models_model_login_session_proto_rawDescGZIP() []byte {
 | 
			
		||||
	file_models_model_login_session_proto_rawDescOnce.Do(func() {
 | 
			
		||||
		file_models_model_login_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_login_session_proto_rawDescData)
 | 
			
		||||
	})
 | 
			
		||||
	return file_models_model_login_session_proto_rawDescData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var file_models_model_login_session_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
 | 
			
		||||
var file_models_model_login_session_proto_goTypes = []interface{}{
 | 
			
		||||
	(*LoginSession)(nil), // 0: pb.LoginSession
 | 
			
		||||
}
 | 
			
		||||
var file_models_model_login_session_proto_depIdxs = []int32{
 | 
			
		||||
	0, // [0:0] is the sub-list for method output_type
 | 
			
		||||
	0, // [0:0] 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_models_model_login_session_proto_init() }
 | 
			
		||||
func file_models_model_login_session_proto_init() {
 | 
			
		||||
	if File_models_model_login_session_proto != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	if !protoimpl.UnsafeEnabled {
 | 
			
		||||
		file_models_model_login_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*LoginSession); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	type x struct{}
 | 
			
		||||
	out := protoimpl.TypeBuilder{
 | 
			
		||||
		File: protoimpl.DescBuilder{
 | 
			
		||||
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 | 
			
		||||
			RawDescriptor: file_models_model_login_session_proto_rawDesc,
 | 
			
		||||
			NumEnums:      0,
 | 
			
		||||
			NumMessages:   1,
 | 
			
		||||
			NumExtensions: 0,
 | 
			
		||||
			NumServices:   0,
 | 
			
		||||
		},
 | 
			
		||||
		GoTypes:           file_models_model_login_session_proto_goTypes,
 | 
			
		||||
		DependencyIndexes: file_models_model_login_session_proto_depIdxs,
 | 
			
		||||
		MessageInfos:      file_models_model_login_session_proto_msgTypes,
 | 
			
		||||
	}.Build()
 | 
			
		||||
	File_models_model_login_session_proto = out.File
 | 
			
		||||
	file_models_model_login_session_proto_rawDesc = nil
 | 
			
		||||
	file_models_model_login_session_proto_goTypes = nil
 | 
			
		||||
	file_models_model_login_session_proto_depIdxs = nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										680
									
								
								pkg/rpc/pb/service_login_session.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										680
									
								
								pkg/rpc/pb/service_login_session.pb.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,680 @@
 | 
			
		||||
// Code generated by protoc-gen-go. DO NOT EDIT.
 | 
			
		||||
// versions:
 | 
			
		||||
// 	protoc-gen-go v1.25.0
 | 
			
		||||
// 	protoc        v3.19.4
 | 
			
		||||
// source: service_login_session.proto
 | 
			
		||||
 | 
			
		||||
package pb
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	context "context"
 | 
			
		||||
	proto "github.com/golang/protobuf/proto"
 | 
			
		||||
	grpc "google.golang.org/grpc"
 | 
			
		||||
	codes "google.golang.org/grpc/codes"
 | 
			
		||||
	status "google.golang.org/grpc/status"
 | 
			
		||||
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 | 
			
		||||
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 | 
			
		||||
	reflect "reflect"
 | 
			
		||||
	sync "sync"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// This is a compile-time assertion that a sufficiently up-to-date version
 | 
			
		||||
// of the legacy proto package is being used.
 | 
			
		||||
const _ = proto.ProtoPackageIsVersion4
 | 
			
		||||
 | 
			
		||||
// 创建SESSION
 | 
			
		||||
type CreateLoginSessionRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Sid       string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`              // SESSION ID
 | 
			
		||||
	Ip        string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`                // 登录IP
 | 
			
		||||
	ExpiresAt int64  `protobuf:"varint,3,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // 过期时间
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateLoginSessionRequest) Reset() {
 | 
			
		||||
	*x = CreateLoginSessionRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_login_session_proto_msgTypes[0]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateLoginSessionRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*CreateLoginSessionRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *CreateLoginSessionRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_login_session_proto_msgTypes[0]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use CreateLoginSessionRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*CreateLoginSessionRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_login_session_proto_rawDescGZIP(), []int{0}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateLoginSessionRequest) GetSid() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Sid
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateLoginSessionRequest) GetIp() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Ip
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateLoginSessionRequest) GetExpiresAt() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.ExpiresAt
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 写入SESSION数据
 | 
			
		||||
type WriteLoginSessionValueRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Sid   string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
 | 
			
		||||
	Key   string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
 | 
			
		||||
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *WriteLoginSessionValueRequest) Reset() {
 | 
			
		||||
	*x = WriteLoginSessionValueRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_login_session_proto_msgTypes[1]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *WriteLoginSessionValueRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*WriteLoginSessionValueRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *WriteLoginSessionValueRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_login_session_proto_msgTypes[1]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use WriteLoginSessionValueRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*WriteLoginSessionValueRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_login_session_proto_rawDescGZIP(), []int{1}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *WriteLoginSessionValueRequest) GetSid() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Sid
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *WriteLoginSessionValueRequest) GetKey() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Key
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *WriteLoginSessionValueRequest) GetValue() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Value
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除SESSION
 | 
			
		||||
type DeleteLoginSessionRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DeleteLoginSessionRequest) Reset() {
 | 
			
		||||
	*x = DeleteLoginSessionRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_login_session_proto_msgTypes[2]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DeleteLoginSessionRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*DeleteLoginSessionRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *DeleteLoginSessionRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_login_session_proto_msgTypes[2]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use DeleteLoginSessionRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*DeleteLoginSessionRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_login_session_proto_rawDescGZIP(), []int{2}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DeleteLoginSessionRequest) GetSid() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Sid
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查找SESSION
 | 
			
		||||
type FindLoginSessionRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionRequest) Reset() {
 | 
			
		||||
	*x = FindLoginSessionRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_login_session_proto_msgTypes[3]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindLoginSessionRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_login_session_proto_msgTypes[3]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindLoginSessionRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindLoginSessionRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_login_session_proto_rawDescGZIP(), []int{3}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionRequest) GetSid() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Sid
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type FindLoginSessionResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	LoginSession *LoginSession `protobuf:"bytes,1,opt,name=loginSession,proto3" json:"loginSession,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionResponse) Reset() {
 | 
			
		||||
	*x = FindLoginSessionResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_login_session_proto_msgTypes[4]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionResponse) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindLoginSessionResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_login_session_proto_msgTypes[4]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindLoginSessionResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindLoginSessionResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_login_session_proto_rawDescGZIP(), []int{4}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindLoginSessionResponse) GetLoginSession() *LoginSession {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.LoginSession
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var File_service_login_session_proto protoreflect.FileDescriptor
 | 
			
		||||
 | 
			
		||||
var file_service_login_session_proto_rawDesc = []byte{
 | 
			
		||||
	0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f,
 | 
			
		||||
	0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
 | 
			
		||||
	0x62, 0x1a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
 | 
			
		||||
	0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
 | 
			
		||||
	0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f,
 | 
			
		||||
	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b,
 | 
			
		||||
	0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73,
 | 
			
		||||
	0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73,
 | 
			
		||||
	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x0e, 0x0a,
 | 
			
		||||
	0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1c, 0x0a,
 | 
			
		||||
	0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
 | 
			
		||||
	0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x59, 0x0a, 0x1d, 0x57,
 | 
			
		||||
	0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
 | 
			
		||||
	0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
 | 
			
		||||
	0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x10,
 | 
			
		||||
	0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
 | 
			
		||||
	0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
 | 
			
		||||
	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2d, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
 | 
			
		||||
	0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
 | 
			
		||||
	0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
 | 
			
		||||
	0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67,
 | 
			
		||||
	0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
 | 
			
		||||
	0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73,
 | 
			
		||||
	0x69, 0x64, 0x22, 0x50, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53,
 | 
			
		||||
	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34,
 | 
			
		||||
	0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
 | 
			
		||||
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53,
 | 
			
		||||
	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73,
 | 
			
		||||
	0x73, 0x69, 0x6f, 0x6e, 0x32, 0xbb, 0x02, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65,
 | 
			
		||||
	0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x12,
 | 
			
		||||
	0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69,
 | 
			
		||||
	0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f,
 | 
			
		||||
	0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
 | 
			
		||||
	0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
 | 
			
		||||
	0x73, 0x12, 0x4b, 0x0a, 0x16, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53,
 | 
			
		||||
	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69,
 | 
			
		||||
	0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
 | 
			
		||||
	0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43,
 | 
			
		||||
	0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73,
 | 
			
		||||
	0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
 | 
			
		||||
	0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
 | 
			
		||||
	0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
 | 
			
		||||
	0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
 | 
			
		||||
	0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
 | 
			
		||||
	0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
 | 
			
		||||
	0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x6f,
 | 
			
		||||
	0x67, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
 | 
			
		||||
	0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
 | 
			
		||||
	0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	file_service_login_session_proto_rawDescOnce sync.Once
 | 
			
		||||
	file_service_login_session_proto_rawDescData = file_service_login_session_proto_rawDesc
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func file_service_login_session_proto_rawDescGZIP() []byte {
 | 
			
		||||
	file_service_login_session_proto_rawDescOnce.Do(func() {
 | 
			
		||||
		file_service_login_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_login_session_proto_rawDescData)
 | 
			
		||||
	})
 | 
			
		||||
	return file_service_login_session_proto_rawDescData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var file_service_login_session_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 | 
			
		||||
var file_service_login_session_proto_goTypes = []interface{}{
 | 
			
		||||
	(*CreateLoginSessionRequest)(nil),     // 0: pb.CreateLoginSessionRequest
 | 
			
		||||
	(*WriteLoginSessionValueRequest)(nil), // 1: pb.WriteLoginSessionValueRequest
 | 
			
		||||
	(*DeleteLoginSessionRequest)(nil),     // 2: pb.DeleteLoginSessionRequest
 | 
			
		||||
	(*FindLoginSessionRequest)(nil),       // 3: pb.FindLoginSessionRequest
 | 
			
		||||
	(*FindLoginSessionResponse)(nil),      // 4: pb.FindLoginSessionResponse
 | 
			
		||||
	(*LoginSession)(nil),                  // 5: pb.LoginSession
 | 
			
		||||
	(*RPCSuccess)(nil),                    // 6: pb.RPCSuccess
 | 
			
		||||
}
 | 
			
		||||
var file_service_login_session_proto_depIdxs = []int32{
 | 
			
		||||
	5, // 0: pb.FindLoginSessionResponse.loginSession:type_name -> pb.LoginSession
 | 
			
		||||
	0, // 1: pb.LoginSessionService.createLoginSession:input_type -> pb.CreateLoginSessionRequest
 | 
			
		||||
	1, // 2: pb.LoginSessionService.writeLoginSessionValue:input_type -> pb.WriteLoginSessionValueRequest
 | 
			
		||||
	2, // 3: pb.LoginSessionService.deleteLoginSession:input_type -> pb.DeleteLoginSessionRequest
 | 
			
		||||
	3, // 4: pb.LoginSessionService.findLoginSession:input_type -> pb.FindLoginSessionRequest
 | 
			
		||||
	6, // 5: pb.LoginSessionService.createLoginSession:output_type -> pb.RPCSuccess
 | 
			
		||||
	6, // 6: pb.LoginSessionService.writeLoginSessionValue:output_type -> pb.RPCSuccess
 | 
			
		||||
	6, // 7: pb.LoginSessionService.deleteLoginSession:output_type -> pb.RPCSuccess
 | 
			
		||||
	4, // 8: pb.LoginSessionService.findLoginSession:output_type -> pb.FindLoginSessionResponse
 | 
			
		||||
	5, // [5:9] is the sub-list for method output_type
 | 
			
		||||
	1, // [1:5] 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_service_login_session_proto_init() }
 | 
			
		||||
func file_service_login_session_proto_init() {
 | 
			
		||||
	if File_service_login_session_proto != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	file_models_model_login_session_proto_init()
 | 
			
		||||
	file_models_rpc_messages_proto_init()
 | 
			
		||||
	if !protoimpl.UnsafeEnabled {
 | 
			
		||||
		file_service_login_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*CreateLoginSessionRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_login_session_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*WriteLoginSessionValueRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_login_session_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*DeleteLoginSessionRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_login_session_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindLoginSessionRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_login_session_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindLoginSessionResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	type x struct{}
 | 
			
		||||
	out := protoimpl.TypeBuilder{
 | 
			
		||||
		File: protoimpl.DescBuilder{
 | 
			
		||||
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 | 
			
		||||
			RawDescriptor: file_service_login_session_proto_rawDesc,
 | 
			
		||||
			NumEnums:      0,
 | 
			
		||||
			NumMessages:   5,
 | 
			
		||||
			NumExtensions: 0,
 | 
			
		||||
			NumServices:   1,
 | 
			
		||||
		},
 | 
			
		||||
		GoTypes:           file_service_login_session_proto_goTypes,
 | 
			
		||||
		DependencyIndexes: file_service_login_session_proto_depIdxs,
 | 
			
		||||
		MessageInfos:      file_service_login_session_proto_msgTypes,
 | 
			
		||||
	}.Build()
 | 
			
		||||
	File_service_login_session_proto = out.File
 | 
			
		||||
	file_service_login_session_proto_rawDesc = nil
 | 
			
		||||
	file_service_login_session_proto_goTypes = nil
 | 
			
		||||
	file_service_login_session_proto_depIdxs = nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
			
		||||
var _ context.Context
 | 
			
		||||
var _ grpc.ClientConnInterface
 | 
			
		||||
 | 
			
		||||
// This is a compile-time assertion to ensure that this generated file
 | 
			
		||||
// is compatible with the grpc package it is being compiled against.
 | 
			
		||||
const _ = grpc.SupportPackageIsVersion6
 | 
			
		||||
 | 
			
		||||
// LoginSessionServiceClient is the client API for LoginSessionService service.
 | 
			
		||||
//
 | 
			
		||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
 | 
			
		||||
type LoginSessionServiceClient interface {
 | 
			
		||||
	// 创建SESSION
 | 
			
		||||
	CreateLoginSession(ctx context.Context, in *CreateLoginSessionRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
 | 
			
		||||
	// 写入SESSION数据
 | 
			
		||||
	WriteLoginSessionValue(ctx context.Context, in *WriteLoginSessionValueRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
 | 
			
		||||
	// 删除SESSION
 | 
			
		||||
	DeleteLoginSession(ctx context.Context, in *DeleteLoginSessionRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
 | 
			
		||||
	// 查找SESSION
 | 
			
		||||
	FindLoginSession(ctx context.Context, in *FindLoginSessionRequest, opts ...grpc.CallOption) (*FindLoginSessionResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type loginSessionServiceClient struct {
 | 
			
		||||
	cc grpc.ClientConnInterface
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func NewLoginSessionServiceClient(cc grpc.ClientConnInterface) LoginSessionServiceClient {
 | 
			
		||||
	return &loginSessionServiceClient{cc}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *loginSessionServiceClient) CreateLoginSession(ctx context.Context, in *CreateLoginSessionRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
 | 
			
		||||
	out := new(RPCSuccess)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.LoginSessionService/createLoginSession", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *loginSessionServiceClient) WriteLoginSessionValue(ctx context.Context, in *WriteLoginSessionValueRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
 | 
			
		||||
	out := new(RPCSuccess)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.LoginSessionService/writeLoginSessionValue", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *loginSessionServiceClient) DeleteLoginSession(ctx context.Context, in *DeleteLoginSessionRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
 | 
			
		||||
	out := new(RPCSuccess)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.LoginSessionService/deleteLoginSession", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *loginSessionServiceClient) FindLoginSession(ctx context.Context, in *FindLoginSessionRequest, opts ...grpc.CallOption) (*FindLoginSessionResponse, error) {
 | 
			
		||||
	out := new(FindLoginSessionResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.LoginSessionService/findLoginSession", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// LoginSessionServiceServer is the server API for LoginSessionService service.
 | 
			
		||||
type LoginSessionServiceServer interface {
 | 
			
		||||
	// 创建SESSION
 | 
			
		||||
	CreateLoginSession(context.Context, *CreateLoginSessionRequest) (*RPCSuccess, error)
 | 
			
		||||
	// 写入SESSION数据
 | 
			
		||||
	WriteLoginSessionValue(context.Context, *WriteLoginSessionValueRequest) (*RPCSuccess, error)
 | 
			
		||||
	// 删除SESSION
 | 
			
		||||
	DeleteLoginSession(context.Context, *DeleteLoginSessionRequest) (*RPCSuccess, error)
 | 
			
		||||
	// 查找SESSION
 | 
			
		||||
	FindLoginSession(context.Context, *FindLoginSessionRequest) (*FindLoginSessionResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnimplementedLoginSessionServiceServer can be embedded to have forward compatible implementations.
 | 
			
		||||
type UnimplementedLoginSessionServiceServer struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*UnimplementedLoginSessionServiceServer) CreateLoginSession(context.Context, *CreateLoginSessionRequest) (*RPCSuccess, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method CreateLoginSession not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedLoginSessionServiceServer) WriteLoginSessionValue(context.Context, *WriteLoginSessionValueRequest) (*RPCSuccess, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method WriteLoginSessionValue not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedLoginSessionServiceServer) DeleteLoginSession(context.Context, *DeleteLoginSessionRequest) (*RPCSuccess, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method DeleteLoginSession not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedLoginSessionServiceServer) FindLoginSession(context.Context, *FindLoginSessionRequest) (*FindLoginSessionResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method FindLoginSession not implemented")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterLoginSessionServiceServer(s *grpc.Server, srv LoginSessionServiceServer) {
 | 
			
		||||
	s.RegisterService(&_LoginSessionService_serviceDesc, srv)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _LoginSessionService_CreateLoginSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(CreateLoginSessionRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).CreateLoginSession(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.LoginSessionService/CreateLoginSession",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).CreateLoginSession(ctx, req.(*CreateLoginSessionRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _LoginSessionService_WriteLoginSessionValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(WriteLoginSessionValueRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).WriteLoginSessionValue(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.LoginSessionService/WriteLoginSessionValue",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).WriteLoginSessionValue(ctx, req.(*WriteLoginSessionValueRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _LoginSessionService_DeleteLoginSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(DeleteLoginSessionRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).DeleteLoginSession(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.LoginSessionService/DeleteLoginSession",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).DeleteLoginSession(ctx, req.(*DeleteLoginSessionRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _LoginSessionService_FindLoginSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(FindLoginSessionRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).FindLoginSession(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.LoginSessionService/FindLoginSession",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(LoginSessionServiceServer).FindLoginSession(ctx, req.(*FindLoginSessionRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var _LoginSessionService_serviceDesc = grpc.ServiceDesc{
 | 
			
		||||
	ServiceName: "pb.LoginSessionService",
 | 
			
		||||
	HandlerType: (*LoginSessionServiceServer)(nil),
 | 
			
		||||
	Methods: []grpc.MethodDesc{
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "createLoginSession",
 | 
			
		||||
			Handler:    _LoginSessionService_CreateLoginSession_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "writeLoginSessionValue",
 | 
			
		||||
			Handler:    _LoginSessionService_WriteLoginSessionValue_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "deleteLoginSession",
 | 
			
		||||
			Handler:    _LoginSessionService_DeleteLoginSession_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "findLoginSession",
 | 
			
		||||
			Handler:    _LoginSessionService_FindLoginSession_Handler,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	Streams:  []grpc.StreamDesc{},
 | 
			
		||||
	Metadata: "service_login_session.proto",
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										16
									
								
								pkg/rpc/protos/models/model_login_session.proto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								pkg/rpc/protos/models/model_login_session.proto
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
syntax = "proto3";
 | 
			
		||||
option go_package = "./pb";
 | 
			
		||||
 | 
			
		||||
package pb;
 | 
			
		||||
 | 
			
		||||
// 登录SESSION
 | 
			
		||||
message LoginSession {
 | 
			
		||||
	int64 id = 1;
 | 
			
		||||
	int64 adminId = 2;
 | 
			
		||||
	int64 userId = 3;
 | 
			
		||||
	string sid = 4;
 | 
			
		||||
	bytes valuesJSON = 5;
 | 
			
		||||
	string ip = 6;
 | 
			
		||||
	int64 createdAt = 7;
 | 
			
		||||
	int64 expiresAt = 8;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										50
									
								
								pkg/rpc/protos/service_login_session.proto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								pkg/rpc/protos/service_login_session.proto
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
syntax = "proto3";
 | 
			
		||||
option go_package = "./pb";
 | 
			
		||||
 | 
			
		||||
package pb;
 | 
			
		||||
 | 
			
		||||
import "models/model_login_session.proto";
 | 
			
		||||
import "models/rpc_messages.proto";
 | 
			
		||||
 | 
			
		||||
// 登录SESSION服务
 | 
			
		||||
service LoginSessionService {
 | 
			
		||||
	// 创建SESSION
 | 
			
		||||
	rpc createLoginSession(CreateLoginSessionRequest) returns (RPCSuccess);
 | 
			
		||||
 | 
			
		||||
	// 写入SESSION数据
 | 
			
		||||
	rpc writeLoginSessionValue(WriteLoginSessionValueRequest) returns (RPCSuccess);
 | 
			
		||||
 | 
			
		||||
	// 删除SESSION
 | 
			
		||||
	rpc deleteLoginSession(DeleteLoginSessionRequest) returns (RPCSuccess);
 | 
			
		||||
 | 
			
		||||
	// 查找SESSION
 | 
			
		||||
	rpc findLoginSession(FindLoginSessionRequest) returns (FindLoginSessionResponse);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建SESSION
 | 
			
		||||
message CreateLoginSessionRequest {
 | 
			
		||||
	string sid = 1; // SESSION ID
 | 
			
		||||
	string ip = 2; // 登录IP
 | 
			
		||||
	int64 expiresAt = 3; // 过期时间
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 写入SESSION数据
 | 
			
		||||
message WriteLoginSessionValueRequest {
 | 
			
		||||
	string sid = 1;
 | 
			
		||||
	string key = 2;
 | 
			
		||||
	string value = 3;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除SESSION
 | 
			
		||||
message DeleteLoginSessionRequest {
 | 
			
		||||
	string sid = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查找SESSION
 | 
			
		||||
message FindLoginSessionRequest {
 | 
			
		||||
	string sid = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message FindLoginSessionResponse {
 | 
			
		||||
	LoginSession loginSession = 1;
 | 
			
		||||
}
 | 
			
		||||
@@ -16,6 +16,7 @@ type HTTPFirewallRule struct {
 | 
			
		||||
	Operator          string                 `yaml:"operator" json:"operator"`
 | 
			
		||||
	Value             string                 `yaml:"value" json:"value"`
 | 
			
		||||
	IsCaseInsensitive bool                   `yaml:"isCaseInsensitive" json:"isCaseInsensitive"`
 | 
			
		||||
	IsComposed        bool                   `yaml:"isComposed" json:"isComposed"`
 | 
			
		||||
	CheckpointOptions map[string]interface{} `yaml:"checkpointOptions" json:"checkpointOptions"`
 | 
			
		||||
	Description       string                 `yaml:"description" json:"description"`
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user