From 6ea103f90cf04bf45990852739ffd8cba24db4b1 Mon Sep 17 00:00:00 2001 From: tgs266 <siegel.tucker@gmail.com> Date: Thu, 23 Sep 2021 16:12:25 -0400 Subject: [PATCH] change config to common --- controllers/data_download_controller.go | 2 +- controllers/freezing_dates_controller.go | 2 +- controllers/gdd_controller.go | 4 ++-- controllers/misc_controller.go | 4 ++-- controllers/nomads_controller.go | 6 +++--- controllers/seed_controllers.go | 4 ++-- docs/docs.go | 22 +++++++++++----------- docs/swagger.json | 22 +++++++++++----------- docs/swagger.yaml | 22 +++++++++++----------- 9 files changed, 44 insertions(+), 44 deletions(-) diff --git a/controllers/data_download_controller.go b/controllers/data_download_controller.go index 957f293..efcb295 100644 --- a/controllers/data_download_controller.go +++ b/controllers/data_download_controller.go @@ -14,7 +14,7 @@ import ( // @Description Get gdd data csv // @Accept json // @Produce text/csv -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param analog query boolean false "Add analog data to csv" // @Param cfs query boolean false "Add cfs data to csv" // @Param cfs_upper query boolean false "Add cfs upper bound data to csv" diff --git a/controllers/freezing_dates_controller.go b/controllers/freezing_dates_controller.go index e2c37ce..6b215e0 100644 --- a/controllers/freezing_dates_controller.go +++ b/controllers/freezing_dates_controller.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.FreezingDateResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Param freezing_temp query number true "Freezing temperature to use" diff --git a/controllers/gdd_controller.go b/controllers/gdd_controller.go index 86448a2..c0edb43 100644 --- a/controllers/gdd_controller.go +++ b/controllers/gdd_controller.go @@ -17,7 +17,7 @@ var GetGddValues = services.GetGddValues // @Accept json // @Produce json // @Success 200 {object} models.GddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param year query int true "Year to get gdd for" // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" @@ -37,7 +37,7 @@ func GetDailyGdd(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.GddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" diff --git a/controllers/misc_controller.go b/controllers/misc_controller.go index ab8af71..0ffeb85 100644 --- a/controllers/misc_controller.go +++ b/controllers/misc_controller.go @@ -18,7 +18,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.AnalogResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Router /api/weather/gdd/analog [get] @@ -44,7 +44,7 @@ func GetAnalogYear(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.ConfidenceIntervalResposne -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" diff --git a/controllers/nomads_controller.go b/controllers/nomads_controller.go index fb0cac7..3f8f6d4 100644 --- a/controllers/nomads_controller.go +++ b/controllers/nomads_controller.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.GefsGddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" @@ -32,7 +32,7 @@ func GetGefsGDD(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.CfsGddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" @@ -50,7 +50,7 @@ func GetCfsGDD(c *fiber.Ctx) error { // // @Accept json // // @Produce json // // @Success 200 {object} models.CfsGddResponse -// // @Failure 400 {object} config.StandardError +// // @Failure 400 {object} common.StandardError // // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // // @Param latitude query number true "Latitude to search for" // // @Param longitude query number true "Longitude to search for" diff --git a/controllers/seed_controllers.go b/controllers/seed_controllers.go index 24ca5b7..4b5cc2e 100644 --- a/controllers/seed_controllers.go +++ b/controllers/seed_controllers.go @@ -15,7 +15,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.SeedListResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param product query string true "Crop type to use" Enums(corn, soybean) // @Router /api/weather/gdd/seeds [get] func GetSeedList(c *fiber.Ctx) error { @@ -32,7 +32,7 @@ func GetSeedList(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.CornMaturityResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Param seed query string true "Corn seed to use" diff --git a/docs/docs.go b/docs/docs.go index 6adc5d3..3645be8 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -72,7 +72,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -117,7 +117,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -192,7 +192,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -260,7 +260,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -418,7 +418,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -500,7 +500,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -575,7 +575,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -650,7 +650,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -692,7 +692,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -758,7 +758,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -766,7 +766,7 @@ var doc = `{ } }, "definitions": { - "errors.StandardError": { + "common.StandardError": { "type": "object", "properties": { "description": { diff --git a/docs/swagger.json b/docs/swagger.json index 77fea7a..a110e77 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -58,7 +58,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -103,7 +103,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -178,7 +178,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -246,7 +246,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -404,7 +404,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -486,7 +486,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -561,7 +561,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -636,7 +636,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -678,7 +678,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -744,7 +744,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -752,7 +752,7 @@ } }, "definitions": { - "errors.StandardError": { + "common.StandardError": { "type": "object", "properties": { "description": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 9ad8465..8310da7 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,6 +1,6 @@ basePath: / definitions: - errors.StandardError: + common.StandardError: properties: description: type: string @@ -175,7 +175,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: get freezing dates tags: - Freezing Dates @@ -205,7 +205,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get analog year tags: - Gdd @@ -260,7 +260,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get GDD values calculated from CFS tags: - Gdd @@ -310,7 +310,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get confidence interval tags: - Gdd @@ -420,7 +420,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get gdd data csv tags: - Gdd @@ -480,7 +480,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get gdd values tags: - Gdd @@ -535,7 +535,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get GDD values calculated from GEFS tags: - Gdd @@ -590,7 +590,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get gdd normals tags: - Gdd @@ -618,7 +618,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get list of seeds in database tags: - GDD Seed Data @@ -663,7 +663,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get estimated maturity date from corn seed (uses CFS data if current GDUs are less than the crop maturity) tags: -- GitLab