mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 06:22:17 -04:00
Move upload/delete code to its own package
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
5654e76f7e
commit
52a65c20ac
13 changed files with 129 additions and 100 deletions
|
@ -74,7 +74,7 @@ func (f *fetcher) FetchSEVSNPVersionList(ctx context.Context, list SEVSNPVersion
|
|||
}
|
||||
|
||||
// Need to set this explicitly as the variant is not part of the marshalled JSON.
|
||||
fetchedList.variant = list.variant
|
||||
fetchedList.Variant = list.Variant
|
||||
|
||||
return fetchedList, nil
|
||||
}
|
||||
|
@ -94,13 +94,13 @@ func (f *fetcher) FetchSEVSNPVersion(ctx context.Context, version SEVSNPVersionA
|
|||
|
||||
// FetchSEVSNPVersionLatest returns the latest versions of the given type.
|
||||
func (f *fetcher) FetchSEVSNPVersionLatest(ctx context.Context, attesation variant.Variant) (res SEVSNPVersionAPI, err error) {
|
||||
list, err := f.FetchSEVSNPVersionList(ctx, SEVSNPVersionList{variant: attesation})
|
||||
list, err := f.FetchSEVSNPVersionList(ctx, SEVSNPVersionList{Variant: attesation})
|
||||
if err != nil {
|
||||
return res, ErrNoVersionsFound
|
||||
}
|
||||
|
||||
getVersionRequest := SEVSNPVersionAPI{
|
||||
Version: list.List()[0], // latest version is first in list
|
||||
Version: list.List[0], // latest version is first in list
|
||||
Variant: attesation,
|
||||
}
|
||||
res, err = f.FetchSEVSNPVersion(ctx, getVersionRequest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue