sys_common.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package model
  2. import "time"
  3. //系统配置
  4. type SysInfoModel struct {
  5. Name string //系统名称
  6. }
  7. //用户相关
  8. type UserModel struct {
  9. UserName string
  10. PWD string
  11. Token string
  12. Head string
  13. Email string
  14. Description string
  15. Initialized bool
  16. Avatar string
  17. NickName string
  18. }
  19. //服务配置
  20. type ServerModel struct {
  21. HttpPort string
  22. RunMode string
  23. ServerApi string
  24. LockAccount bool
  25. Handshake string
  26. Token string
  27. UDPPort string
  28. USBAutoMount string
  29. }
  30. //服务配置
  31. type APPModel struct {
  32. LogSavePath string
  33. LogSaveName string
  34. LogFileExt string
  35. DateStrFormat string
  36. DateTimeFormat string
  37. TimeFormat string
  38. DateFormat string
  39. ProjectPath string
  40. RootPath string
  41. }
  42. //公共返回模型
  43. type Result struct {
  44. Success int `json:"success" example:"200"`
  45. Message string `json:"message" example:"ok"`
  46. Data interface{} `json:"data" example:"返回结果"`
  47. }
  48. //redis配置文件
  49. type RedisModel struct {
  50. Host string
  51. Password string
  52. MaxIdle int
  53. MaxActive int
  54. IdleTimeout time.Duration
  55. }
  56. type SystemConfig struct {
  57. ConfigStr string `json:"config_str"`
  58. WidgetList string `json:"widget_list"`
  59. ConfigPath string `json:"config_path"`
  60. SyncPort string `json:"sync_port"`
  61. SyncKey string `json:"sync_key"`
  62. Analyse string `json:"analyse"`
  63. }
  64. type CasaOSGlobalVariables struct {
  65. AppChange bool
  66. }
  67. type FileSetting struct {
  68. ShareDir []string `json:"share_dir" delim:"|"`
  69. DownloadDir string `json:"download_dir"`
  70. }