debian-forge-composer/internal/cloudapi/v2
Tomáš Hozza efbaa93eef Target/Koji: rework result options to contain more than just image info
The `KojiTargetResultOptions` previously contained information only
about the uploaded image file. And even then, some information, such as
the filename, were scattered in other structures such as
`KojiFinalizeJob` struct.

Since the plan is to start uploading also osbuild manifest and osbuild
build log to Koji, we need to extend the result options structure to
hold more information and also make it specific to which file is the
information related.

Rework the `KojiTargetResultOptions` to contain information about:
 - the built image
 - build log
 - osbuild manifest

Information about each file contains:
 - filename
 - checksum type
 - file checksum
 - file size

For now, only the built image information is set and consumed by the
worker.

Add custom JSON (un)marshaler for `KojiTargetResultOptions` to handle
backward compatibility when old version of worker or composer server
interact with each other. Cover them with unit tests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-09-27 12:39:28 +02:00
..
compose.go internal/cloudapi: add OpenSCAP tailoring 2023-09-18 20:46:49 +02:00
compose_test.go cloudapi: Add tests for refactored handler code 2023-08-05 11:28:29 +02:00
errors.go cloudapi: Add ability to skip uploading and save image locally 2023-08-09 16:48:46 +02:00
errors_test.go cloudapi: get specific error from openapi 2022-06-28 10:02:55 +02:00
handler.go cloudapi/v2: add oci image type to cloudapi 2023-09-19 22:57:06 +02:00
imagerequest.go cloudapi/v2: add oci image type to cloudapi 2023-09-19 22:57:06 +02:00
imagerequest_test.go cloudapi: Add tests for refactored handler code 2023-08-05 11:28:29 +02:00
middleware.go internal/auth: add TenantChannelMiddleware 2023-06-28 15:08:37 +02:00
openapi.v2.gen.go cloudapi/v2: add oci image type to cloudapi 2023-09-19 22:57:06 +02:00
openapi.v2.yml cloudapi/v2: add oci image type to cloudapi 2023-09-19 22:57:06 +02:00
server.go cloudapi: Catch and log Serialize errors 2023-09-21 16:56:54 +02:00
v2_internal_test.go lint: Fix implicit memory aliasing in for loops 2023-09-21 16:56:54 +02:00
v2_koji_test.go Target/Koji: rework result options to contain more than just image info 2023-09-27 12:39:28 +02:00
v2_multi_tenancy_test.go split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
v2_test.go test: Add checksum to cloudapi tests 2023-09-21 16:56:54 +02:00