sys_common.go 1.4 KB

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