structs.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package structs
  2. import (
  3. "time"
  4. )
  5. type SessionInfo struct {
  6. Hash string `json:"hash"`
  7. Created string `json:"created"`
  8. }
  9. type SysConfig struct {
  10. Setup string `json:"setup"`
  11. EndpointUrl string `json:"endpointUrl"`
  12. ApiVersion string `json:"apiVersion"`
  13. Piers []string `json:"piers"`
  14. NetCheck string `json:"netCheck"`
  15. UpdateMode string `json:"updateMode"`
  16. UpdateUrl string `json:"updateUrl"`
  17. UpdateBranch string `json:"updateBranch"`
  18. SwapVal int `json:"swapVal"`
  19. SwapFile string `json:"swapFile"`
  20. KeyFile string `json:"keyFile"`
  21. Sessions struct {
  22. Authorized map[string]SessionInfo `json:"authorized"`
  23. Unauthorized map[string]SessionInfo `json:"unauthorized"`
  24. } `json:"sessions"`
  25. LinuxUpdates struct {
  26. Value int `json:"value"`
  27. Interval string `json:"interval"`
  28. Previous bool `json:"previous"`
  29. } `json:"linuxUpdates"`
  30. DockerData string `json:"dockerData"`
  31. WgOn bool `json:"wgOn"`
  32. WgRegistered bool `json:"wgRegistered"`
  33. PwHash string `json:"pwHash"`
  34. C2cInterval int `json:"c2cInterval"`
  35. FirstBoot bool `json:"firstBoot"`
  36. WgRegisterd bool `json:"wgRegisterd"`
  37. GsVersion string `json:"gsVersion"`
  38. CfgDir string `json:"CFG_DIR"`
  39. UpdateInterval int `json:"updateInterval"`
  40. BinHash string `json:"binHash"`
  41. Pubkey string `json:"pubkey"`
  42. Privkey string `json:"privkey"`
  43. Salt string `json:"salt"`
  44. }
  45. type LoginStatus struct {
  46. Locked bool
  47. End time.Time
  48. Attempts int
  49. }
  50. type LoginKeys struct {
  51. Old struct {
  52. Pub string
  53. Priv string
  54. }
  55. Cur struct {
  56. Pub string
  57. Priv string
  58. }
  59. }
  60. type Version struct {
  61. Groundseg struct {
  62. Canary Channel `json:"canary"`
  63. Edge Channel `json:"edge"`
  64. Latest Channel `json:"latest"`
  65. } `json:"groundseg"`
  66. }
  67. type Channel struct {
  68. Groundseg Component `json:"groundseg"`
  69. Manual Component `json:"manual"`
  70. Minio Component `json:"minio"`
  71. Miniomc Component `json:"miniomc"`
  72. Netdata Component `json:"netdata"`
  73. Vere Component `json:"vere"`
  74. Webui Component `json:"webui"`
  75. Wireguard Component `json:"wireguard"`
  76. }
  77. type Component struct {
  78. Groundseg VersionDetails `json:"groundseg"`
  79. Manual VersionDetails `json:"manual"`
  80. Minio VersionDetails `json:"minio"`
  81. Miniomc VersionDetails `json:"miniomc"`
  82. Netdata VersionDetails `json:"netdata"`
  83. Vere VersionDetails `json:"vere"`
  84. Webui VersionDetails `json:"webui"`
  85. Wireguard VersionDetails `json:"wireguard"`
  86. }
  87. type VersionDetails struct {
  88. Amd64Sha256 string `json:"amd64_sha256"`
  89. Amd64URL string `json:"amd64_url,omitempty"`
  90. Arm64Sha256 string `json:"arm64_sha256"`
  91. Arm64URL string `json:"arm64_url,omitempty"`
  92. Major int `json:"major,omitempty"`
  93. Minor int `json:"minor,omitempty"`
  94. Patch int `json:"patch,omitempty"`
  95. Repo string `json:"repo,omitempty"`
  96. Tag string `json:"tag,omitempty"`
  97. }