Skip to content

Commit

Permalink
Fixes 4932: Add search module streams
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Dec 16, 2024
1 parent f5622c2 commit 8cd9c5c
Show file tree
Hide file tree
Showing 13 changed files with 888 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ packages:
TemplateDao:
config:
filename: "templates_mock.go"
ModuleStreamsDao:
config:
filename: "modules_streams_mock.go"
170 changes: 170 additions & 0 deletions api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,90 @@ const docTemplate = `{
}
}
},
"/snapshots/module_streams/search": {
"post": {
"description": "List modules and their streams for snapshots",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"module_streams"
],
"summary": "List modules and their streams for snapshots",
"operationId": "searchSnapshotModuleStreams",
"parameters": [
{
"description": "request body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.SearchSnapshotModuleStreamsRequest"
}
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "Snapshot IDs.",
"name": "uuids",
"in": "path",
"required": true
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "Package Names",
"name": "package_names",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.SearchModuleStreams"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/errors.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/errors.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/errors.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/errors.ErrorResponse"
}
}
}
}
},
"/snapshots/package_groups/names": {
"post": {
"description": "This enables users to search for package groups in a given list of snapshots.",
Expand Down Expand Up @@ -4516,6 +4600,22 @@ const docTemplate = `{
}
}
},
"api.SearchModuleStreams": {
"type": "object",
"properties": {
"module_name": {
"description": "Module name",
"type": "string"
},
"streams": {
"description": "A list of stream related information for the module",
"type": "array",
"items": {
"$ref": "#/definitions/api.Stream"
}
}
}
},
"api.SearchPackageGroupResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -4553,6 +4653,37 @@ const docTemplate = `{
}
}
},
"api.SearchSnapshotModuleStreamsRequest": {
"type": "object",
"required": [
"rpm_names",
"uuids"
],
"properties": {
"rpm_names": {
"description": "List of rpm names to search",
"type": "array",
"items": {
"type": "string"
}
},
"search": {
"description": "Search string to search rpm names",
"type": "string"
},
"sort_by": {
"description": "SortBy sets the sort order of the result",
"type": "string"
},
"uuids": {
"description": "List of snapshot UUIDs to search",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"api.SnapshotCollectionResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -4779,6 +4910,45 @@ const docTemplate = `{
}
}
},
"api.Stream": {
"type": "object",
"properties": {
"arch": {
"description": "The Architecture of the rpm",
"type": "string"
},
"context": {
"description": "Context of the module",
"type": "string"
},
"description": {
"description": "Module description",
"type": "string"
},
"name": {
"description": "Name of the module",
"type": "string"
},
"profiles": {
"description": "Module profile data",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"stream": {
"description": "Module stream version",
"type": "string"
},
"version": {
"description": "The version of the rpm",
"type": "string"
}
}
},
"api.TaskInfoCollectionResponse": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 8cd9c5c

Please sign in to comment.