| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- package structs
- import (
- "time"
- )
- type WsPayload struct {
- Type string `json:"type"`
- Action string `json:"action"`
- }
- type SessionInfo struct {
- Hash string `json:"hash"`
- Created string `json:"created"`
- }
- type SysConfig struct {
- Setup string `json:"setup"`
- EndpointUrl string `json:"endpointUrl"`
- ApiVersion string `json:"apiVersion"`
- Piers []string `json:"piers"`
- NetCheck string `json:"netCheck"`
- UpdateMode string `json:"updateMode"`
- UpdateUrl string `json:"updateUrl"`
- UpdateBranch string `json:"updateBranch"`
- SwapVal int `json:"swapVal"`
- SwapFile string `json:"swapFile"`
- KeyFile string `json:"keyFile"`
- Sessions struct {
- Authorized map[string]SessionInfo `json:"authorized"`
- Unauthorized map[string]SessionInfo `json:"unauthorized"`
- } `json:"sessions"`
- LinuxUpdates struct {
- Value int `json:"value"`
- Interval string `json:"interval"`
- Previous bool `json:"previous"`
- } `json:"linuxUpdates"`
- DockerData string `json:"dockerData"`
- WgOn bool `json:"wgOn"`
- WgRegistered bool `json:"wgRegistered"`
- PwHash string `json:"pwHash"`
- C2cInterval int `json:"c2cInterval"`
- FirstBoot bool `json:"firstBoot"`
- WgRegisterd bool `json:"wgRegisterd"`
- GsVersion string `json:"gsVersion"`
- CfgDir string `json:"CFG_DIR"`
- UpdateInterval int `json:"updateInterval"`
- BinHash string `json:"binHash"`
- Pubkey string `json:"pubkey"`
- Privkey string `json:"privkey"`
- Salt string `json:"salt"`
- }
- type LoginStatus struct {
- Locked bool
- End time.Time
- Attempts int
- }
- type LoginKeys struct {
- Old struct {
- Pub string
- Priv string
- }
- Cur struct {
- Pub string
- Priv string
- }
- }
- type Version struct {
- Groundseg struct {
- Canary Channel `json:"canary"`
- Edge Channel `json:"edge"`
- Latest Channel `json:"latest"`
- } `json:"groundseg"`
- }
- type Channel struct {
- Groundseg VersionDetails `json:"groundseg"`
- Manual VersionDetails `json:"manual"`
- Minio VersionDetails `json:"minio"`
- Miniomc VersionDetails `json:"miniomc"`
- Netdata VersionDetails `json:"netdata"`
- Vere VersionDetails `json:"vere"`
- Webui VersionDetails `json:"webui"`
- Wireguard VersionDetails `json:"wireguard"`
- }
- type VersionDetails struct {
- Amd64Sha256 string `json:"amd64_sha256"`
- Amd64URL string `json:"amd64_url,omitempty"`
- Arm64Sha256 string `json:"arm64_sha256"`
- Arm64URL string `json:"arm64_url,omitempty"`
- Major int `json:"major,omitempty"`
- Minor int `json:"minor,omitempty"`
- Patch int `json:"patch,omitempty"`
- Repo string `json:"repo,omitempty"`
- Tag string `json:"tag,omitempty"`
- }
- type SystemUsage struct {
- RAM []int64 `json:"ram"`
- CPU int `json:"cpu"`
- CPUTemp int `json:"cpu_temp"`
- Disk []int64 `json:"disk"`
- SwapFile int `json:"swap"`
- }
- type SystemUpdates struct {
- Linux struct {
- State string `json:"state"`
- Upgrade int `json:"upgrade"`
- New int `json:"new"`
- Remove int `json:"remove"`
- Ignore int `json:"ignore"`
- } `json:"linux"`
- }
- type SystemWifi struct {
- Status string `json:"status"`
- Active string `json:"active"`
- Networks []string `json:"networks"`
- }
- type SystemInfo struct {
- Usage SystemUsage `json:"usage"`
- Updates SystemUpdates `json:"updates"`
- Wifi SystemWifi `json:"wifi"`
- }
- type Profile struct {
- Startram Startram `json:"startram"`
- }
- type Startram struct {
- Info struct {
- Registered bool `json:"registered"`
- Running bool `json:"running"`
- Region any `json:"region"`
- Expiry any `json:"expiry"`
- Renew bool `json:"renew"`
- Endpoint string `json:"endpoint"`
- Regions map[string]StartramRegion `json:"regions"`
- } `json:"info"`
- Transition struct {
- Register any `json:"register"`
- Toggle any `json:"toggle"`
- } `json:"transition"`
- }
- type Urbit struct {
- Info struct {
- Network string `json:"network"`
- Running bool `json:"running"`
- URL string `json:"url"`
- UrbAlias bool `json:"urbAlias"`
- MemUsage int `json:"memUsage"`
- DiskUsage int `json:"diskUsage"`
- LoomSize int `json:"loomSize"`
- DevMode bool `json:"devMode"`
- DetectBootStatus bool `json:"detectBootStatus"`
- Remote bool `json:"remote"`
- Vere any `json:"vere"`
- } `json:"info"`
- Transition struct {
- Meld any `json:"meld"`
- ServiceRegistrationStatus string `json:"serviceRegistrationStatus"`
- TogglePower any `json:"togglePower"`
- DeleteShip any `json:"deleteShip"`
- } `json:"transition"`
- }
- type Logs struct {
- Containers struct {
- Wireguard struct {
- Logs []any `json:"logs"`
- } `json:"wireguard"`
- } `json:"containers"`
- System struct {
- Stream bool `json:"stream"`
- Logs []any `json:"logs"`
- } `json:"system"`
- }
- type AuthBroadcast struct {
- Type string `json:"type"`
- AuthLevel string `json:"auth_level"`
- Upload Upload `json:"upload"`
- Logs Logs `json:"logs"`
- System SystemInfo `json:"system"`
- Profile Profile `json:"profile"`
- Urbits map[string]Urbit `json:"urbits"`
- }
- type Upload struct {
- Status string `json:"status"`
- Size int `json:"size"`
- Uploaded int `json:"uploaded"`
- Patp any `json:"patp"`
- }
- type UnauthBroadcast struct {
- Type string `json:"type"`
- AuthLevel string `json:"auth_level"`
- Login struct {
- Remainder int `json:"remainder"`
- } `json:"login"`
- }
- type SetupBroadcast struct {
- Type string `json:"type"`
- AuthLevel string `json:"auth_level"`
- Stage string `json:"stage"`
- Page string `json:"page"`
- Regions map[string]StartramRegion `json:"regions"`
- }
- type StartramRegion struct {
- Country string `json:"country"`
- Desc string `json:"desc"`
- }
- type UrbitDocker struct {
- PierName string `json:"pier_name"`
- HTTPPort int `json:"http_port"`
- AmesPort int `json:"ames_port"`
- LoomSize int `json:"loom_size"`
- UrbitVersion string `json:"urbit_version"`
- MinioVersion string `json:"minio_version"`
- UrbitRepo string `json:"urbit_repo"`
- MinioRepo string `json:"minio_repo"`
- UrbitAmd64Sha256 string `json:"urbit_amd64_sha256"`
- UrbitArm64Sha256 string `json:"urbit_arm64_sha256"`
- MinioAmd64Sha256 string `json:"minio_amd64_sha256"`
- MinioArm64Sha256 string `json:"minio_arm64_sha256"`
- MinioPassword string `json:"minio_password"`
- Network string `json:"network"`
- WgURL string `json:"wg_url"`
- WgHTTPPort int `json:"wg_http_port"`
- WgAmesPort int `json:"wg_ames_port"`
- WgS3Port int `json:"wg_s3_port"`
- WgConsolePort int `json:"wg_console_port"`
- MeldSchedule bool `json:"meld_schedule"`
- MeldFrequency int `json:"meld_frequency"`
- MeldTime string `json:"meld_time"`
- MeldLast string `json:"meld_last"`
- MeldNext string `json:"meld_next"`
- BootStatus string `json:"boot_status"`
- CustomUrbitWeb string `json:"custom_urbit_web"`
- CustomS3Web string `json:"custom_s3_web"`
- ShowUrbitWeb string `json:"show_urbit_web"`
- DevMode bool `json:"dev_mode"`
- Click bool `json:"click"`
- }
|