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

  1. // Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
  2. package container
  3. import "LAPP_GAAS_GFrame_BACKEND/web/models"
  4. // 会话管理器
  5. type SessionManager interface {
  6. // 清理会话
  7. // 参数
  8. // 1.会话标识
  9. ClearSession(string)
  10. // 获取会话,如果没有则创建会话
  11. // 参数
  12. // 1.会话标识
  13. // 2.用户信息
  14. // 返回值:
  15. // 1.会话
  16. // 2.错误
  17. GetSession(string, *models.Usertab) (*Session, error)
  18. }
  19. // 使用默认实现创建会话管理器
  20. // 参数:
  21. // 1.组件信息管理器
  22. // 2.事务句柄工厂
  23. // 返回值:
  24. // 1.会话管理器
  25. // 异常:
  26. // 1.组件信息管理器不能为空
  27. // 2.事务句柄工厂不能为空
  28. func NewSessionManager(informationManager InformationManager, transactionHandlerFactory TransactionHandlerFactory) SessionManager {
  29. return NewDefaultSessionManager(informationManager, transactionHandlerFactory)
  30. }