-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b773df8
commit e6a1af4
Showing
8 changed files
with
581 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
package docs | ||
|
||
import "github.com/swaggo/swag" | ||
|
||
const docTemplate = `{ | ||
"schemes": {{ marshal .Schemes }}, | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "{{escape .Description}}", | ||
"title": "{{.Title}}", | ||
"contact": {}, | ||
"version": "{{.Version}}" | ||
}, | ||
"host": "{{.Host}}", | ||
"basePath": "{{.BasePath}}", | ||
"paths": { | ||
"/api/get/{id}": { | ||
"get": { | ||
"description": "Fetches a job by its ID with partial content handling", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Jobs" | ||
], | ||
"summary": "Retrieve a job from the queue", | ||
"parameters": [ | ||
{ | ||
"type": "string", | ||
"description": "Job ID", | ||
"name": "id", | ||
"in": "path", | ||
"required": true | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully retrieved job", | ||
"schema": { | ||
"$ref": "#/definitions/jobs.Job" | ||
} | ||
}, | ||
"206": { | ||
"description": "Partially completed job", | ||
"schema": { | ||
"$ref": "#/definitions/jobs.Job" | ||
} | ||
}, | ||
"404": { | ||
"description": "Job not found", | ||
"schema": { | ||
"$ref": "#/definitions/errors.RestErr" | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal server error", | ||
"schema": { | ||
"$ref": "#/definitions/errors.RestErr" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/api/upload": { | ||
"post": { | ||
"description": "Validates and creates a new job in the system", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Jobs" | ||
], | ||
"summary": "Upload a new job to the queue", | ||
"parameters": [ | ||
{ | ||
"description": "Job to be uploaded", | ||
"name": "job", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/jobs.Job" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Job successfully created", | ||
"schema": { | ||
"$ref": "#/definitions/jobs.Job" | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad request - validation error", | ||
"schema": { | ||
"$ref": "#/definitions/errors.RestErr" | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal server error", | ||
"schema": { | ||
"$ref": "#/definitions/errors.RestErr" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"errors.RestErr": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"type": "string" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"status": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"jobs.Job": { | ||
"type": "object", | ||
"properties": { | ||
"ID": { | ||
"type": "string" | ||
}, | ||
"Input": { | ||
"type": "string" | ||
}, | ||
"Slurml": { | ||
"type": "boolean" | ||
}, | ||
"lastUpdated": { | ||
"type": "string" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"output": { | ||
"type": "string" | ||
}, | ||
"path": { | ||
"type": "string" | ||
}, | ||
"slurmID": { | ||
"type": "integer" | ||
}, | ||
"status": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "", | ||
Host: "", | ||
BasePath: "", | ||
Schemes: []string{}, | ||
Title: "", | ||
Description: "", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
LeftDelim: "{{", | ||
RightDelim: "}}", | ||
} | ||
|
||
func init() { | ||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) | ||
} |
Oops, something went wrong.