Jelajahi Sumber

add urbit docker struct

reid 2 tahun lalu
induk
melakukan
e8667d5ada
2 mengubah file dengan 36 tambahan dan 1 penghapusan
  1. 3 1
      broadcast/broadcast.go
  2. 33 0
      structs/structs.go

+ 3 - 1
broadcast/broadcast.go

@@ -92,6 +92,8 @@ func bootstrapBroadcastState(config structs.SysConfig) (structs.AuthBroadcast, e
 	currentState = GetState()
 	// get startram regions
 	logger.Info("Retrieving StarTram region info")
+	wgRegistered := config.WgRegistered
+	wgOn := config.WgOn
 	regions, err := startram.GetRegions()
 	if err != nil {
 		logger.Warn("Couldn't get StarTram regions")
@@ -138,7 +140,7 @@ func UpdateBroadcastState(values map[string]interface{}) error {
 	return nil
 }
 
-// this allows us to insert stuff into nested vals and not overwrite the existing contents
+// this allows us to insert stuff into nested structs/keys and not overwrite the existing contents
 func recursiveUpdate(dst, src reflect.Value) error {
     if !dst.CanSet() {
         return fmt.Errorf("field is not settable")

+ 33 - 0
structs/structs.go

@@ -220,3 +220,36 @@ 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"`
+}