sys_common.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. }
  17. //服务配置
  18. type ServerModel struct {
  19. HttpPort string
  20. RunMode string
  21. ServerApi string
  22. LockAccount bool
  23. }
  24. //服务配置
  25. type APPModel struct {
  26. LogSavePath string
  27. LogSaveName string
  28. LogFileExt string
  29. DateStrFormat string
  30. DateTimeFormat string
  31. TimeFormat string
  32. DateFormat string
  33. ProjectPath string
  34. }
  35. //公共返回模型
  36. type Result struct {
  37. Success int `json:"success" example:"200"`
  38. Message string `json:"message" example:"ok"`
  39. Data interface{} `json:"data" example:"返回结果"`
  40. }
  41. //zeritier相关
  42. type ZeroTierModel struct {
  43. UserName string
  44. PWD string
  45. Token string
  46. }
  47. //redis配置文件
  48. type RedisModel struct {
  49. Host string
  50. Password string
  51. MaxIdle int
  52. MaxActive int
  53. IdleTimeout time.Duration
  54. }
  55. type SystemConfig struct {
  56. ConfigStr string `json:"config_str"`
  57. WidgetList string `json:"widget_list"`
  58. ConfigPath string `json:"config_path"`
  59. SyncPort string `json:"sync_port"`
  60. SyncKey string `json:"sync_key"`
  61. }
  62. type CasaOSGlobalVariables struct {
  63. AppChange bool
  64. }