GAAS GFrame项目web后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
912 B

// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
package container
import "LAPP_GAAS_GFrame_BACKEND/web/models"
// 会话管理器
type SessionManager interface {
// 清理会话
// 参数
// 1.会话标识
ClearSession(string)
// 获取会话,如果没有则创建会话
// 参数
// 1.会话标识
// 2.用户信息
// 返回值:
// 1.会话
// 2.错误
GetSession(string, *models.Usertab) (*Session, error)
}
// 使用默认实现创建会话管理器
// 参数:
// 1.组件信息管理器
// 2.事务句柄工厂
// 返回值:
// 1.会话管理器
// 异常:
// 1.组件信息管理器不能为空
// 2.事务句柄工厂不能为空
func NewSessionManager(informationManager InformationManager, transactionHandlerFactory TransactionHandlerFactory) SessionManager {
return NewDefaultSessionManager(informationManager, transactionHandlerFactory)
}