sys_common.go 1.4 KB

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