image: implement idempotent upload of os images

This commit is contained in:
Malte Poll 2023-04-21 10:47:07 +02:00 committed by Malte Poll
parent 17c45bc881
commit ee91d8b1cc
42 changed files with 4272 additions and 95 deletions

View file

@ -0,0 +1,25 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package cmd
import (
"context"
"io"
"github.com/edgelesssys/constellation/v2/internal/osimage"
"github.com/edgelesssys/constellation/v2/internal/versionsapi"
)
type archivist interface {
Archive(ctx context.Context,
version versionsapi.Version, csp, variant string, img io.Reader,
) (string, error)
}
type uploader interface {
Upload(ctx context.Context, req *osimage.UploadRequest) (map[string]string, error)
}