2026-03-11 17:18:29 +00:00
|
|
|
// Package swagger Code generated by swaggo/swag. DO NOT EDIT
|
|
|
|
|
package swagger
|
|
|
|
|
|
|
|
|
|
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/browse/{ecosystem}/{name}/{version}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "Lists files from the first cached artifact for a package version.",
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"browse"
|
|
|
|
|
],
|
|
|
|
|
"summary": "List files inside a cached artifact",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Ecosystem",
|
|
|
|
|
"name": "ecosystem",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Package name",
|
|
|
|
|
"name": "name",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Version",
|
|
|
|
|
"name": "version",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Directory path inside the archive",
|
|
|
|
|
"name": "path",
|
|
|
|
|
"in": "query"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.BrowseListResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"404": {
|
|
|
|
|
"description": "Not Found",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/browse/{ecosystem}/{name}/{version}/file/{filepath}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "Streams a single file from the cached artifact. The file path may contain slashes.",
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/octet-stream"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"browse"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Fetch a file inside a cached artifact",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Ecosystem",
|
|
|
|
|
"name": "ecosystem",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Package name",
|
|
|
|
|
"name": "name",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Version",
|
|
|
|
|
"name": "version",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "File path inside the archive",
|
|
|
|
|
"name": "filepath",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "file"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"404": {
|
|
|
|
|
"description": "Not Found",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/bulk": {
|
|
|
|
|
"post": {
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"api"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Bulk package lookup by PURL",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"description": "PURLs",
|
|
|
|
|
"name": "request",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.BulkRequest"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.BulkResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/compare/{ecosystem}/{name}/{fromVersion}/{toVersion}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "Returns a structured diff for two cached versions.",
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"browse"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Compare two cached versions",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Ecosystem",
|
|
|
|
|
"name": "ecosystem",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Package name",
|
|
|
|
|
"name": "name",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "From version",
|
|
|
|
|
"name": "fromVersion",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "To version",
|
|
|
|
|
"name": "toVersion",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"404": {
|
|
|
|
|
"description": "Not Found",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/outdated": {
|
|
|
|
|
"post": {
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"api"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Check outdated packages",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"description": "Packages to check",
|
|
|
|
|
"name": "request",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.OutdatedRequest"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.OutdatedResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/packages": {
|
|
|
|
|
"get": {
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"api"
|
|
|
|
|
],
|
|
|
|
|
"summary": "List cached packages",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Ecosystem",
|
|
|
|
|
"name": "ecosystem",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"enum": [
|
|
|
|
|
"hits",
|
|
|
|
|
"name",
|
|
|
|
|
"size",
|
|
|
|
|
"cached_at",
|
|
|
|
|
"ecosystem",
|
|
|
|
|
"vulns"
|
|
|
|
|
],
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Sort",
|
|
|
|
|
"name": "sort",
|
|
|
|
|
"in": "query"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.PackagesListResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/search": {
|
|
|
|
|
"get": {
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"api"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Search cached packages",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Query",
|
|
|
|
|
"name": "q",
|
|
|
|
|
"in": "query",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Ecosystem",
|
|
|
|
|
"name": "ecosystem",
|
|
|
|
|
"in": "query"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.SearchResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/health": {
|
|
|
|
|
"get": {
|
|
|
|
|
"produces": [
|
|
|
|
|
"text/plain"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"meta"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Health check",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"503": {
|
|
|
|
|
"description": "Service Unavailable",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/stats": {
|
|
|
|
|
"get": {
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"meta"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Cache statistics",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/server.StatsResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"500": {
|
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
|
"schema": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"definitions": {
|
|
|
|
|
"server.BrowseFileInfo": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"is_dir": {
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"mod_time": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"path": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"size": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.BrowseListResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"files": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/server.BrowseFileInfo"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"path": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.BulkRequest": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"purls": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.BulkResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"packages": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": {
|
|
|
|
|
"$ref": "#/definitions/server.PackageResponse"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.OutdatedPackage": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"ecosystem": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"version": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.OutdatedRequest": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"packages": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/server.OutdatedPackage"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.OutdatedResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"results": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/server.OutdatedResult"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.OutdatedResult": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"ecosystem": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"is_outdated": {
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"latest_version": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"version": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.PackageListResult": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"cached_at": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"ecosystem": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hits": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"latest_version": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"license": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"license_category": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"size": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"vuln_count": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.PackageResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"description": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"ecosystem": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"homepage": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"latest_version": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"license": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"license_category": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"registry_url": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"repository": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.PackagesListResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"count": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"ecosystem": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"page": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"per_page": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"results": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/server.PackageListResult"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"sort_by": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"total": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.SearchPackageResult": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"cached_at": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"ecosystem": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hits": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"latest_version": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"license": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"size": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.SearchResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"count": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"query": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"results": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/server.SearchPackageResult"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"server.StatsResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"cached_artifacts": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"database_path": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
2026-04-03 14:06:51 +01:00
|
|
|
"storage_url": {
|
2026-03-11 17:18:29 +00:00
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"total_size": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"total_size_bytes": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}`
|
|
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
|
var SwaggerInfo = &swag.Spec{
|
|
|
|
|
Version: "0.1.0",
|
|
|
|
|
Host: "",
|
|
|
|
|
BasePath: "/",
|
|
|
|
|
Schemes: []string{},
|
|
|
|
|
Title: "git-pkgs proxy API",
|
|
|
|
|
Description: "HTTP API for package enrichment, vulnerability lookup, cache stats, and source browsing.",
|
|
|
|
|
InfoInstanceName: "swagger",
|
|
|
|
|
SwaggerTemplate: docTemplate,
|
|
|
|
|
LeftDelim: "{{",
|
|
|
|
|
RightDelim: "}}",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
|
|
}
|