configs.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. package structs
  2. // system.json config struct
  3. type SysConfig struct {
  4. Setup string `json:"setup"`
  5. EndpointUrl string `json:"endpointUrl"`
  6. ApiVersion string `json:"apiVersion"`
  7. Piers []string `json:"piers"`
  8. NetCheck string `json:"netCheck"`
  9. UpdateMode string `json:"updateMode"`
  10. UpdateUrl string `json:"updateUrl"`
  11. UpdateBranch string `json:"updateBranch"`
  12. SwapVal int `json:"swapVal"`
  13. SwapFile string `json:"swapFile"`
  14. KeyFile string `json:"keyFile"`
  15. Sessions struct {
  16. Authorized map[string]SessionInfo `json:"authorized"`
  17. Unauthorized map[string]SessionInfo `json:"unauthorized"`
  18. } `json:"sessions"`
  19. LinuxUpdates struct {
  20. Value int `json:"value"`
  21. Interval string `json:"interval"`
  22. Previous bool `json:"previous"`
  23. } `json:"linuxUpdates"`
  24. DockerData string `json:"dockerData"`
  25. WgOn bool `json:"wgOn"`
  26. WgRegistered bool `json:"wgRegistered"`
  27. PwHash string `json:"pwHash"`
  28. C2cInterval int `json:"c2cInterval"`
  29. FirstBoot bool `json:"firstBoot"`
  30. WgRegisterd bool `json:"wgRegisterd"`
  31. GsVersion string `json:"gsVersion"`
  32. CfgDir string `json:"CFG_DIR"`
  33. UpdateInterval int `json:"updateInterval"`
  34. BinHash string `json:"binHash"`
  35. Pubkey string `json:"pubkey"`
  36. Privkey string `json:"privkey"`
  37. Salt string `json:"salt"`
  38. }
  39. // authenticated browser sessions
  40. type SessionInfo struct {
  41. Hash string `json:"hash"`
  42. Created string `json:"created"`
  43. }
  44. // pier json struct
  45. type UrbitDocker struct {
  46. PierName string `json:"pier_name"`
  47. HTTPPort int `json:"http_port"`
  48. AmesPort int `json:"ames_port"`
  49. LoomSize int `json:"loom_size"`
  50. UrbitVersion string `json:"urbit_version"`
  51. MinioVersion string `json:"minio_version"`
  52. UrbitRepo string `json:"urbit_repo"`
  53. MinioRepo string `json:"minio_repo"`
  54. UrbitAmd64Sha256 string `json:"urbit_amd64_sha256"`
  55. UrbitArm64Sha256 string `json:"urbit_arm64_sha256"`
  56. MinioAmd64Sha256 string `json:"minio_amd64_sha256"`
  57. MinioArm64Sha256 string `json:"minio_arm64_sha256"`
  58. MinioPassword string `json:"minio_password"`
  59. Network string `json:"network"`
  60. WgURL string `json:"wg_url"`
  61. WgHTTPPort int `json:"wg_http_port"`
  62. WgAmesPort int `json:"wg_ames_port"`
  63. WgS3Port int `json:"wg_s3_port"`
  64. WgConsolePort int `json:"wg_console_port"`
  65. MeldSchedule bool `json:"meld_schedule"`
  66. MeldFrequency int `json:"meld_frequency"`
  67. MeldTime string `json:"meld_time"`
  68. MeldLast string `json:"meld_last"`
  69. MeldNext string `json:"meld_next"`
  70. BootStatus string `json:"boot_status"`
  71. CustomUrbitWeb string `json:"custom_urbit_web"`
  72. CustomS3Web string `json:"custom_s3_web"`
  73. ShowUrbitWeb string `json:"show_urbit_web"`
  74. DevMode bool `json:"dev_mode"`
  75. Click bool `json:"click"`
  76. }
  77. // wireguard config json
  78. type WgConfig struct {
  79. WireguardName string `json:"wireguard_name"`
  80. WireguardVersion string `json:"wireguard_version"`
  81. Repo string `json:"repo"`
  82. Amd64Sha256 string `json:"amd64_sha256"`
  83. Arm64Sha256 string `json:"arm64_sha256"`
  84. CapAdd []string `json:"cap_add"`
  85. Volumes []string `json:"volumes"`
  86. Sysctls struct {
  87. NetIpv4ConfAllSrcValidMark int `json:"net.ipv4.conf.all.src_valid_mark"`
  88. } `json:"sysctls"`
  89. }
  90. // minio client config json
  91. type McConfig struct {
  92. McName string `json:"mc_name"`
  93. McVersion string `json:"mc_version"`
  94. Repo string `json:"repo"`
  95. Amd64Sha256 string `json:"amd64_sha256"`
  96. Arm64Sha256 string `json:"arm64_sha256"`
  97. }
  98. // nedata config json
  99. type NetdataConfig struct {
  100. NetdataName string `json:"netdata_name"`
  101. Repo string `json:"repo"`
  102. NetdataVersion string `json:"netdata_version"`
  103. Amd64Sha256 string `json:"amd64_sha256"`
  104. Arm64Sha256 string `json:"arm64_sha256"`
  105. CapAdd []string `json:"cap_add"`
  106. Port int `json:"port"`
  107. Restart string `json:"restart"`
  108. SecurityOpt string `json:"security_opt"`
  109. Volumes []string `json:"volumes"`
  110. }