Moved to go 1.22 net/http

This commit is contained in:
2024-04-02 20:34:59 -05:00
parent 97b4c60096
commit 7c1a319b55
13 changed files with 239 additions and 446 deletions

View File

@@ -1,5 +1,4 @@
// Code generated by swaggo/swag. DO NOT EDIT.
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
@@ -25,8 +24,13 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/health/getHealth": {
"/health/gethealth": {
"get": {
"security": [
{
"Authorization": []
}
],
"description": "Get the health of the API",
"consumes": [
"application/json"
@@ -45,7 +49,7 @@ const docTemplate = `{
"$ref": "#/definitions/model.Message"
}
},
"400": {
"500": {
"description": "error",
"schema": {
"$ref": "#/definitions/model.Message"
@@ -230,35 +234,6 @@ const docTemplate = `{
}
}
}
},
"/unraid/powerusage": {
"get": {
"description": "Gets the PSU Data from unraid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"unraid"
],
"summary": "Unraid PSU Stats",
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.PowerSupply"
}
},
"412": {
"description": "error",
"schema": {
"$ref": "#/definitions/model.Message"
}
}
}
}
}
},
"definitions": {
@@ -270,72 +245,10 @@ const docTemplate = `{
"example": "message"
}
}
},
"model.PowerSupply": {
"type": "object",
"properties": {
"12v_load": {
"type": "integer"
},
"12v_watts": {
"type": "integer"
},
"3v_load": {
"type": "integer"
},
"3v_watts": {
"type": "integer"
},
"5v_load": {
"type": "integer"
},
"5v_watts": {
"type": "integer"
},
"capacity": {
"type": "string"
},
"efficiency": {
"type": "integer"
},
"fan_rpm": {
"type": "integer"
},
"load": {
"type": "integer"
},
"poweredon": {
"type": "string"
},
"poweredon_raw": {
"type": "string"
},
"product": {
"type": "string"
},
"temp1": {
"type": "integer"
},
"temp2": {
"type": "integer"
},
"uptime": {
"type": "string"
},
"uptime_raw": {
"type": "string"
},
"vendor": {
"type": "string"
},
"watts": {
"type": "integer"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"Authorization": {
"type": "apiKey",
"name": "Authorization",
"in": "header"