diff --git a/internal/api/v1/docs/swagger.json b/internal/api/v1/docs/swagger.json index 10c8b247..f1aeafc2 100644 --- a/internal/api/v1/docs/swagger.json +++ b/internal/api/v1/docs/swagger.json @@ -3389,33 +3389,6 @@ "x-nullable": false, "x-omitempty": false }, - "DockerConfig": { - "type": "object", - "required": [ - "container_id", - "container_name", - "docker_cfg" - ], - "properties": { - "container_id": { - "type": "string", - "x-nullable": false, - "x-omitempty": false - }, - "container_name": { - "type": "string", - "x-nullable": false, - "x-omitempty": false - }, - "docker_cfg": { - "$ref": "#/definitions/DockerProviderConfig", - "x-nullable": false, - "x-omitempty": false - } - }, - "x-nullable": false, - "x-omitempty": false - }, "DockerProviderConfig": { "type": "object", "properties": { @@ -4164,7 +4137,7 @@ "x-omitempty": false }, "docker": { - "$ref": "#/definitions/DockerConfig", + "$ref": "#/definitions/IdlewatcherDockerConfig", "x-nullable": false, "x-omitempty": false }, @@ -4184,7 +4157,7 @@ "x-omitempty": false }, "proxmox": { - "$ref": "#/definitions/ProxmoxNodeConfig", + "$ref": "#/definitions/IdlewatcherProxmoxNodeConfig", "x-nullable": false, "x-omitempty": false }, @@ -4218,6 +4191,54 @@ "x-nullable": false, "x-omitempty": false }, + "IdlewatcherDockerConfig": { + "type": "object", + "required": [ + "container_id", + "container_name", + "docker_cfg" + ], + "properties": { + "container_id": { + "type": "string", + "x-nullable": false, + "x-omitempty": false + }, + "container_name": { + "type": "string", + "x-nullable": false, + "x-omitempty": false + }, + "docker_cfg": { + "$ref": "#/definitions/DockerProviderConfig", + "x-nullable": false, + "x-omitempty": false + } + }, + "x-nullable": false, + "x-omitempty": false + }, + "IdlewatcherProxmoxNodeConfig": { + "type": "object", + "required": [ + "node", + "vmid" + ], + "properties": { + "node": { + "type": "string", + "x-nullable": false, + "x-omitempty": false + }, + "vmid": { + "type": "integer", + "x-nullable": false, + "x-omitempty": false + } + }, + "x-nullable": false, + "x-omitempty": false + }, "ListFilesResponse": { "type": "object", "properties": { diff --git a/internal/api/v1/docs/swagger.yaml b/internal/api/v1/docs/swagger.yaml index 9e185581..b8730fbd 100644 --- a/internal/api/v1/docs/swagger.yaml +++ b/internal/api/v1/docs/swagger.yaml @@ -269,19 +269,6 @@ definitions: - ContainerStopMethodPause - ContainerStopMethodStop - ContainerStopMethodKill - DockerConfig: - properties: - container_id: - type: string - container_name: - type: string - docker_cfg: - $ref: '#/definitions/DockerProviderConfig' - required: - - container_id - - container_name - - docker_cfg - type: object DockerProviderConfig: properties: tls: @@ -630,7 +617,7 @@ definitions: type: string type: array docker: - $ref: '#/definitions/DockerConfig' + $ref: '#/definitions/IdlewatcherDockerConfig' idle_timeout: allOf: - $ref: '#/definitions/time.Duration' @@ -641,7 +628,7 @@ definitions: no_loading_page: type: boolean proxmox: - $ref: '#/definitions/ProxmoxNodeConfig' + $ref: '#/definitions/IdlewatcherProxmoxNodeConfig' start_endpoint: description: Optional path that must be hit to start container type: string @@ -654,6 +641,29 @@ definitions: wake_timeout: $ref: '#/definitions/time.Duration' type: object + IdlewatcherDockerConfig: + properties: + container_id: + type: string + container_name: + type: string + docker_cfg: + $ref: '#/definitions/DockerProviderConfig' + required: + - container_id + - container_name + - docker_cfg + type: object + IdlewatcherProxmoxNodeConfig: + properties: + node: + type: string + vmid: + type: integer + required: + - node + - vmid + type: object ListFilesResponse: properties: config: @@ -1792,12 +1802,12 @@ definitions: type: string kernel_version: type: string - load_avg_15m: - type: string load_avg_1m: type: string load_avg_5m: type: string + load_avg_15m: + type: string mem_pct: type: string mem_total: diff --git a/internal/idlewatcher/types/config.go b/internal/idlewatcher/types/config.go deleted file mode 100644 index 0fd8731e..00000000 --- a/internal/idlewatcher/types/config.go +++ /dev/null @@ -1 +0,0 @@ -package idlewatcher diff --git a/internal/types/idlewatcher.go b/internal/types/idlewatcher.go index 4e408133..c93b3445 100644 --- a/internal/types/idlewatcher.go +++ b/internal/types/idlewatcher.go @@ -41,11 +41,11 @@ type ( DockerCfg DockerProviderConfig `json:"docker_cfg" validate:"required"` ContainerID string `json:"container_id" validate:"required"` ContainerName string `json:"container_name" validate:"required"` - } // @name DockerConfig + } // @name IdlewatcherDockerConfig ProxmoxConfig struct { Node string `json:"node" validate:"required"` VMID int `json:"vmid" validate:"required"` - } // @name ProxmoxNodeConfig + } // @name IdlewatcherProxmoxNodeConfig ) const (