sys_common.go 1.3 KB

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