mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-06 16:25:21 -04:00
image: implement idempotent upload of os images
This commit is contained in:
parent
17c45bc881
commit
ee91d8b1cc
42 changed files with 4272 additions and 95 deletions
25
image/upload/internal/cmd/api.go
Normal file
25
image/upload/internal/cmd/api.go
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue