debian-forge-composer/vendor/github.com/osbuild/images/pkg/cloud/uploader.go
Tomáš Hozza d594005f25 internal/awscloud: start embedding awscloud.AWS from osbuild/images
Start embedding the awscloud.AWS from osbuild/images in
osbuild-composer's version of awscloud.AWS. The idea is to remove all
methods from osbuild-composer implementation, which are used for
uploading and registering images in AWS. The rest that it related to
service maintenance or to running secure instances, will be kept in
osbuild-composer, since these are specific to the project.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00

24 lines
696 B
Go

package cloud
import (
"io"
)
// Uploader is an interface that is returned from the actual
// cloud implementation. The uploader will be parameterized
// by the actual cloud implemntation, e.g.
//
// awscloud.NewUploader(region, bucket, image) Uploader
//
// which is outside the scope of this interface.
type Uploader interface {
// Check can be called before the actual upload to ensure
// all permissions are correct
Check(status io.Writer) error
// UploadAndRegister will upload the given image from
// the reader and write status message to the given
// status writer.
// To implement progress a proxy reader can be used.
UploadAndRegister(f io.Reader, status io.Writer) error
}