structs.go 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 VersionDetails `json:"groundseg"`
  69. Manual VersionDetails `json:"manual"`
  70. Minio VersionDetails `json:"minio"`
  71. Miniomc VersionDetails `json:"miniomc"`
  72. Netdata VersionDetails `json:"netdata"`
  73. Vere VersionDetails `json:"vere"`
  74. Webui VersionDetails `json:"webui"`
  75. Wireguard VersionDetails `json:"wireguard"`
  76. }
  77. type VersionDetails struct {
  78. Amd64Sha256 string `json:"amd64_sha256"`
  79. Amd64URL string `json:"amd64_url,omitempty"`
  80. Arm64Sha256 string `json:"arm64_sha256"`
  81. Arm64URL string `json:"arm64_url,omitempty"`
  82. Major int `json:"major,omitempty"`
  83. Minor int `json:"minor,omitempty"`
  84. Patch int `json:"patch,omitempty"`
  85. Repo string `json:"repo,omitempty"`
  86. Tag string `json:"tag,omitempty"`
  87. }