2023-04-21 04:47:07 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"io"
|
|
|
|
|
2023-06-07 10:16:32 -04:00
|
|
|
"github.com/edgelesssys/constellation/v2/internal/api/versionsapi"
|
2023-04-21 04:47:07 -04:00
|
|
|
"github.com/edgelesssys/constellation/v2/internal/osimage"
|
|
|
|
)
|
|
|
|
|
|
|
|
type archivist interface {
|
|
|
|
Archive(ctx context.Context,
|
2023-05-23 03:17:27 -04:00
|
|
|
version versionsapi.Version, csp, attestationVariant string, img io.Reader,
|
2023-04-21 04:47:07 -04:00
|
|
|
) (string, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type uploader interface {
|
2023-05-23 03:17:27 -04:00
|
|
|
Upload(ctx context.Context, req *osimage.UploadRequest) ([]versionsapi.ImageInfoEntry, error)
|
2023-04-21 04:47:07 -04:00
|
|
|
}
|