From 31ab42cce350430f5e1e4cd734e71209b442bb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Fri, 15 Dec 2023 13:33:33 +0100 Subject: [PATCH] pkg: make internal/cloud public So we can share the code with osbuild/bootc-image-builder. --- cmd/boot-aws/main.go | 2 +- cmd/osbuild-upload-gcp/main.go | 3 ++- cmd/osbuild-upload-generic-s3/main.go | 2 +- internal/boot/aws.go | 2 +- {internal => pkg}/cloud/awscloud/awscloud.go | 0 {internal => pkg}/cloud/gcp/compute.go | 0 {internal => pkg}/cloud/gcp/gcp.go | 0 {internal => pkg}/cloud/gcp/storage.go | 0 8 files changed, 5 insertions(+), 4 deletions(-) rename {internal => pkg}/cloud/awscloud/awscloud.go (100%) rename {internal => pkg}/cloud/gcp/compute.go (100%) rename {internal => pkg}/cloud/gcp/gcp.go (100%) rename {internal => pkg}/cloud/gcp/storage.go (100%) diff --git a/cmd/boot-aws/main.go b/cmd/boot-aws/main.go index 40c180efd6..4cda121a74 100644 --- a/cmd/boot-aws/main.go +++ b/cmd/boot-aws/main.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/osbuild/images/internal/cloud/awscloud" + "github.com/osbuild/images/pkg/cloud/awscloud" ) // exitCheck can be deferred from the top of command functions to exit with an diff --git a/cmd/osbuild-upload-gcp/main.go b/cmd/osbuild-upload-gcp/main.go index 1cb72fc69b..26028b464e 100644 --- a/cmd/osbuild-upload-gcp/main.go +++ b/cmd/osbuild-upload-gcp/main.go @@ -7,8 +7,9 @@ import ( "os" "cloud.google.com/go/compute/apiv1/computepb" - "github.com/osbuild/images/internal/cloud/gcp" "github.com/sirupsen/logrus" + + "github.com/osbuild/images/pkg/cloud/gcp" ) type strArrayFlag []string diff --git a/cmd/osbuild-upload-generic-s3/main.go b/cmd/osbuild-upload-generic-s3/main.go index 187b1dffca..00cddcfe1d 100644 --- a/cmd/osbuild-upload-generic-s3/main.go +++ b/cmd/osbuild-upload-generic-s3/main.go @@ -7,7 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" - "github.com/osbuild/images/internal/cloud/awscloud" + "github.com/osbuild/images/pkg/cloud/awscloud" ) func main() { diff --git a/internal/boot/aws.go b/internal/boot/aws.go index 0d0ca2d7cb..de6fa71fe4 100644 --- a/internal/boot/aws.go +++ b/internal/boot/aws.go @@ -11,8 +11,8 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/osbuild/images/internal/cloud/awscloud" "github.com/osbuild/images/pkg/arch" + "github.com/osbuild/images/pkg/cloud/awscloud" ) type awsCredentials struct { diff --git a/internal/cloud/awscloud/awscloud.go b/pkg/cloud/awscloud/awscloud.go similarity index 100% rename from internal/cloud/awscloud/awscloud.go rename to pkg/cloud/awscloud/awscloud.go diff --git a/internal/cloud/gcp/compute.go b/pkg/cloud/gcp/compute.go similarity index 100% rename from internal/cloud/gcp/compute.go rename to pkg/cloud/gcp/compute.go diff --git a/internal/cloud/gcp/gcp.go b/pkg/cloud/gcp/gcp.go similarity index 100% rename from internal/cloud/gcp/gcp.go rename to pkg/cloud/gcp/gcp.go diff --git a/internal/cloud/gcp/storage.go b/pkg/cloud/gcp/storage.go similarity index 100% rename from internal/cloud/gcp/storage.go rename to pkg/cloud/gcp/storage.go