diff --git a/README.md b/README.md index dea6a34407770c249fad35c2358580e3a7101d73..577b6a6da78997c585e4a51815c6011f41151825 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ Swagger [Here](http://localhost:8080/api/weather/gdd-swagger/index.html#/) ## Docker -To build the image: `docker build -t dawn/gitlab.cs.umd.edu/dawn/dawn-weather .` \ No newline at end of file +To build the image: `docker build -t dawn/gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd .` \ No newline at end of file diff --git a/controllers/data_download_controller.go b/controllers/data_download_controller.go index ec261bbfc7430a391cf9b755c1eae1c9967d0493..59f50a9e2252550ed88bea4b27ea2c06c755a60b 100644 --- a/controllers/data_download_controller.go +++ b/controllers/data_download_controller.go @@ -2,8 +2,8 @@ package controllers import ( "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/services" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/services" "github.com/gofiber/fiber/v2" ) diff --git a/controllers/freezing_dates_controller.go b/controllers/freezing_dates_controller.go index 79a213297e0f450f73c7f501e51b99910a61677b..404273fd6cab86bbf00bc323fe6bfa703dbc2e55 100644 --- a/controllers/freezing_dates_controller.go +++ b/controllers/freezing_dates_controller.go @@ -1,8 +1,8 @@ package controllers import ( - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/services" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/services" "github.com/gofiber/fiber/v2" ) diff --git a/controllers/gdd_controller.go b/controllers/gdd_controller.go index 7d713d3ef7092d86d735362f9b71377f70b9d843..d7f581001fde33d4e0ccfec5f0f362cec1cd100a 100644 --- a/controllers/gdd_controller.go +++ b/controllers/gdd_controller.go @@ -2,8 +2,8 @@ package controllers import ( "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/services" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/services" "github.com/gofiber/fiber/v2" ) diff --git a/controllers/misc_controller.go b/controllers/misc_controller.go index 05b8aab02435aeffdf4dce16036f1037d3185321..4805b82c36911ff87b3d7d5c53583def7d8329f4 100644 --- a/controllers/misc_controller.go +++ b/controllers/misc_controller.go @@ -3,11 +3,11 @@ package controllers import ( "strconv" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" - "gitlab.cs.umd.edu/dawn/dawn-weather/services" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/services" "github.com/gofiber/fiber/v2" ) diff --git a/controllers/nomads_controller.go b/controllers/nomads_controller.go index 71ee93a62e9d459dff7e36c04593f1b324e13d69..45ce1e48f3d937ae073bf1712b758975e5299243 100644 --- a/controllers/nomads_controller.go +++ b/controllers/nomads_controller.go @@ -1,8 +1,8 @@ package controllers import ( - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/services" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/services" "github.com/gofiber/fiber/v2" ) diff --git a/controllers/seed_controllers.go b/controllers/seed_controllers.go index da9dcad4972acf6129290515b508c893dc79af83..9e5ff9a1292bf68742eac25e64ba02a36a3ea039 100644 --- a/controllers/seed_controllers.go +++ b/controllers/seed_controllers.go @@ -2,8 +2,8 @@ package controllers import ( "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/services" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/services" "github.com/gofiber/fiber/v2" ) diff --git a/go.mod b/go.mod index e8b977820b3b8e193242d23f91793ddd71663c67..82f27ed3ae7a8e633e73305a68758771ceffbfc8 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module gitlab.cs.umd.edu/dawn/dawn-weather +module gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd go 1.16 diff --git a/main.go b/main.go index 9030d5eb28f4bea823388a48205824021bc50ed7..4d2db004cdd830398161ff3a7099c7317d7803fc 100644 --- a/main.go +++ b/main.go @@ -5,9 +5,9 @@ import ( "strconv" "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/controllers" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/controllers" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" "github.com/ansrivas/fiberprometheus/v2" swagger "github.com/arsmn/fiber-swagger/v2" @@ -17,7 +17,7 @@ import ( "github.com/gofiber/fiber/v2/utils" "github.com/spf13/viper" - _ "gitlab.cs.umd.edu/dawn/dawn-weather/docs" + _ "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/docs" ) func registerRoutes(app *fiber.App) { diff --git a/models/confidence_interval.go b/models/confidence_interval.go index 379ec7ea4c140bc48b1ccc51090043635200e4d5..3d68d460a4fd584ea2a0f3563dffa81a0c1584b3 100644 --- a/models/confidence_interval.go +++ b/models/confidence_interval.go @@ -4,9 +4,9 @@ import ( "errors" "strconv" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" validation "github.com/go-ozzo/ozzo-validation" "github.com/gofiber/fiber/v2" diff --git a/models/csv.go b/models/csv.go index b1cb1b172ae9ac111362fd43d90b1ee816dd9590..a287e6277ea5fea6830b93378296146e3ca751c2 100644 --- a/models/csv.go +++ b/models/csv.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" validation "github.com/go-ozzo/ozzo-validation" "github.com/gofiber/fiber/v2" diff --git a/models/enums/product_type.go b/models/enums/product_type.go index d7b492c2fd512e4522168844f84d2691b81cb2d1..ac6fe42c0d9d0523f97e119540d89f02d3be0d55 100644 --- a/models/enums/product_type.go +++ b/models/enums/product_type.go @@ -3,7 +3,7 @@ package enums import ( "strings" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" ) type Product struct { diff --git a/models/freezing_dates.go b/models/freezing_dates.go index f8d3991c481bd1e70a1dd28e0d1af35dc334748d..87e38f494e736d0ef5727c6282ee779cfb2dcb8b 100644 --- a/models/freezing_dates.go +++ b/models/freezing_dates.go @@ -4,8 +4,8 @@ import ( "strconv" "time" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" validation "github.com/go-ozzo/ozzo-validation" "github.com/gofiber/fiber/v2" diff --git a/models/gdd.go b/models/gdd.go index 53031bf1063640798e39ccf2d6a001ecb8bc6c33..91755d93394c03215c67784b7f49ed1941a79ad1 100644 --- a/models/gdd.go +++ b/models/gdd.go @@ -4,8 +4,8 @@ import ( "strconv" "time" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" validation "github.com/go-ozzo/ozzo-validation" "github.com/gofiber/fiber/v2" diff --git a/models/seeds.go b/models/seeds.go index fe51e7c7d090466e84ceb2fb60769ff19f7cfefc..3c87ed445a07782019a8728d080ba95dd1ff50a5 100644 --- a/models/seeds.go +++ b/models/seeds.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" validation "github.com/go-ozzo/ozzo-validation" "github.com/gofiber/fiber/v2" diff --git a/persistence/mongodb.go b/persistence/mongodb.go index 792b9cb6b88c44601bf9ae73cd7b24292e7b448e..3eb8b9cb06784f24bdfb179fe683f053745aa554 100644 --- a/persistence/mongodb.go +++ b/persistence/mongodb.go @@ -5,9 +5,9 @@ import ( "strings" "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" "github.com/bradfitz/slice" "github.com/spf13/viper" diff --git a/services/confidence_interval_service.go b/services/confidence_interval_service.go index 8e41b766763269f81e2a3c513b18e0a3be54f41a..90a53c97e00d0e6a52cd5fb89646fecb3760068a 100644 --- a/services/confidence_interval_service.go +++ b/services/confidence_interval_service.go @@ -4,10 +4,10 @@ import ( "math" "time" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/utils" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/utils" ) func GetConfidenceInterval(request models.ConfidenceIntervalRequest) models.ConfidenceIntervalResposne { diff --git a/services/data_download_service.go b/services/data_download_service.go index dd3282f4cf6dc9b68fac1ad0baf7c14dfe963d09..fa015ba4268ba5b33f66de3ebcffec84108539e5 100644 --- a/services/data_download_service.go +++ b/services/data_download_service.go @@ -12,11 +12,11 @@ import ( "time" "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" "github.com/gofiber/fiber/v2" "github.com/google/uuid" diff --git a/services/freezing_date_service.go b/services/freezing_date_service.go index 2790df6b49eb73c91e005c3e876170a006179a0d..790507442e8c53d753db1439ff99eae7a34b0071 100644 --- a/services/freezing_date_service.go +++ b/services/freezing_date_service.go @@ -4,10 +4,10 @@ import ( "fmt" "time" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" ) var may31st = 150 diff --git a/services/gdd_service.go b/services/gdd_service.go index aa555eda11315e41ee7c8df9d60449a1e27e3972..00be8ada991351abd205e93209185102c291aa5e 100644 --- a/services/gdd_service.go +++ b/services/gdd_service.go @@ -4,11 +4,11 @@ import ( "time" "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence/entities" - "gitlab.cs.umd.edu/dawn/dawn-weather/utils" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence/entities" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/utils" ) func GetFullYearGddValues(ctx common.DawnCtx, request models.GddRequest) models.GddResponse { diff --git a/services/nomads_service.go b/services/nomads_service.go index 00ad5b3c7e825654e4c69749b02a26719c50add6..32913b431bd8446ad24efd49ec48d68fe5a9639e 100644 --- a/services/nomads_service.go +++ b/services/nomads_service.go @@ -3,10 +3,10 @@ package services import ( "math" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/utils" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/utils" ) func GetGefsGddValues(request models.GddRequest) models.GefsGddResponse { diff --git a/services/seed_service.go b/services/seed_service.go index 0326b7a95e1c661d61ed38223f6ade7037b33c05..4d57c7cb8062bb08c12c8e2f8e1b5660fdbcfb17 100644 --- a/services/seed_service.go +++ b/services/seed_service.go @@ -5,11 +5,11 @@ import ( "time" "gitlab.cs.umd.edu/dawn/dawn-go-common/common" - "gitlab.cs.umd.edu/dawn/dawn-weather/config" - "gitlab.cs.umd.edu/dawn/dawn-weather/models" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" - "gitlab.cs.umd.edu/dawn/dawn-weather/persistence" - "gitlab.cs.umd.edu/dawn/dawn-weather/utils" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/persistence" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/utils" "github.com/gofiber/fiber/v2" ) diff --git a/utils/gdd_calculations.go b/utils/gdd_calculations.go index a38251b5d1f3c815ba8c47d9adb34321e82e5a9e..f1dcef059c7a912ee7880ba5c8060a03cdfb5b9d 100644 --- a/utils/gdd_calculations.go +++ b/utils/gdd_calculations.go @@ -1,7 +1,7 @@ package utils import ( - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" ) func CalculateSingleGdd(minTemp float64, maxTemp float64, product enums.Product) float64 { diff --git a/utils/gdd_calculations_test.go b/utils/gdd_calculations_test.go index 63af8347e0edd8f8367a098552e45b459b750ee1..1c06303bffd2d7e8886c0b9044f35ba49824869a 100644 --- a/utils/gdd_calculations_test.go +++ b/utils/gdd_calculations_test.go @@ -3,7 +3,7 @@ package utils import ( "testing" - "gitlab.cs.umd.edu/dawn/dawn-weather/models/enums" + "gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/models/enums" "github.com/stretchr/testify/assert" )