sys_common.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. }
  16. //服务配置
  17. type ServerModel struct {
  18. HttpPort string
  19. RunMode string
  20. ServerApi string
  21. }
  22. //服务配置
  23. type APPModel struct {
  24. LogSavePath string
  25. LogSaveName string
  26. LogFileExt string
  27. DateStrFormat string
  28. DateTimeFormat string
  29. TimeFormat string
  30. DateFormat string
  31. ProjectPath string
  32. }
  33. //公共返回模型
  34. type Result struct {
  35. Success int `json:"success" example:"200"`
  36. Message string `json:"message" example:"ok"`
  37. Data interface{} `json:"data" example:"返回结果"`
  38. }
  39. //zeritier相关
  40. type ZeroTierModel struct {
  41. UserName string
  42. PWD string
  43. Token string
  44. }
  45. //redis配置文件
  46. type RedisModel struct {
  47. Host string
  48. Password string
  49. MaxIdle int
  50. MaxActive int
  51. IdleTimeout time.Duration
  52. }
  53. type SystemConfig struct {
  54. SearchSwitch bool `json:"search_switch"` //搜索开关
  55. SearchEngine string `json:"search_engine"` //搜索引擎
  56. ShortcutsSwitch bool `json:"shortcuts_switch"`
  57. WidgetsSwitch bool `json:"widgets_switch"`
  58. BackgroundType string `json:"background_type"`
  59. Background string `json:"background"`
  60. AutoUpdate bool `json:"auto_update"`
  61. }