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>
24 lines
696 B
Go
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
|
|
}
|