session.go 769 B

12345678910111213141516171819202122232425262728293031
  1. package models
  2. import (
  3. "git.listensoft.net/tool/jspkit/common/variable"
  4. "github.com/go-rod/rod/lib/proto"
  5. )
  6. type SsoSession struct {
  7. Cookies []*proto.NetworkCookieParam
  8. LocalStorage map[string]string
  9. }
  10. type SessionInfo struct {
  11. URL string //页面URL API接口地址
  12. Selector string //选择器 API返回结果路径
  13. SelectorValue string //每个选择器对应的值 API对应的企业值
  14. Cookies string //cookies
  15. Area variable.Area
  16. Api bool
  17. ApiURL string
  18. ApiMethod string
  19. ApiParam string
  20. ApiHeader map[string]string
  21. Valid int //新版登录的cookie是否可用,仅获取时赋值
  22. }
  23. type SessionServerRes struct {
  24. Key string
  25. Value []SessionInfo
  26. Valid int
  27. }