debian-forge-composer/internal
Brian C. Lane c1e52aebc3 cloudapi: Refactor handler.go code to make testing easier
This moves some of the code from the PostCompose function in handler.go
into methods on the OpenAPI ComposeRequest and ImageRequest structs.

In compose.go I have added several methods.
GetBlueprintWithCustomizations takes the ComposeRequest customizations
and builds a Blueprint struct.

GetPayloadRepositories returns the custom payload repos.

GetSubscription returns the ImageOptions setup with optional
subscription information from the request.

In imagerequest.go I have added GetTarget which takes the upload
options and returns a Target. This moves the giant switch statement,
which may also benefit from further simplification at some point.

GetOSTreeOptions returns the OSTree ImageOptions if there are ostree
settings in the ImageRequest.

GetImageOptions returns the distro.ImageOptions with the size set.

This commit only moves the code, making PostCompose easier to read. All
tests still pass.

cloudapi: Move the size handling to a method on ImageRequest
2023-08-05 11:28:29 +02:00
..
auth internal/auth: add TenantChannelMiddleware 2023-06-28 15:08:37 +02:00
blueprint update to go 1.19 2023-07-21 19:18:00 +02:00
boot distro: remove architecture names and use platform enum 2023-05-31 16:40:07 +02:00
client update to go 1.19 2023-07-21 19:18:00 +02:00
cloud update to go 1.19 2023-07-21 19:18:00 +02:00
cloudapi cloudapi: Refactor handler.go code to make testing easier 2023-08-05 11:28:29 +02:00
common upload/azure: migrate from azure-storage-blob-go to azure-sdk-for-go 2023-04-04 09:09:43 +02:00
dnfjson update to go 1.19 2023-07-21 19:18:00 +02:00
environment split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
fdo New package: fdo 2022-12-11 12:37:37 +00:00
fsnode internal/fsnode: add API for custom directories and files 2023-02-22 12:17:36 +01:00
ignition ignition: drop embedded provisioning url 2023-02-07 13:30:22 +01:00
jobqueue update to go 1.19 2023-07-21 19:18:00 +02:00
jsondb jsondb: improve performance of list operation 2023-06-20 10:45:22 +02:00
mocks split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
oscap internal/distro: default oscap datastreams 2023-06-29 13:42:49 +01:00
pathpolicy distro: add dir / files customizations policy check 2023-02-22 12:17:36 +01:00
platform distro: remove architecture names and use platform enum 2023-05-31 16:40:07 +02:00
prometheus prometheus: split off request timing information into separate mw 2023-06-28 15:08:37 +02:00
remotefile remotefile: Use io.ReadAll not ioutil.ReadAll 2023-03-22 08:14:01 -07:00
reporegistry split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
runner runner: add platform-python only for RHEL 8+ 2023-01-25 20:37:12 +01:00
shell shell: new package for representing shell init configs internally 2023-03-30 18:40:12 +02:00
store split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
target internal/vmware: add support for the GOVC_FOLDER option 2023-05-25 10:14:32 +02:00
test split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
upload update to go 1.19 2023-07-21 19:18:00 +02:00
users users: convenience functions for converting from BP 2022-09-13 16:06:19 +01:00
weldr split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
worker split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
workload split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
tools.go Remove old build tag comments 2023-03-07 09:22:23 -08:00