1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 00:09:40 +02:00

refactor(docker): strongly type snapshot [EE-3256]

fixes [EE-3256]
This commit is contained in:
Chaim Lev-Ari 2022-05-26 15:34:34 +03:00
parent ca30efeca7
commit 0b2217a916
4 changed files with 125 additions and 42 deletions

View file

@ -5,6 +5,8 @@ import (
"io"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/volume"
gittypes "github.com/portainer/portainer/api/git/types"
v1 "k8s.io/api/core/v1"
)
@ -191,13 +193,14 @@ type (
}
// DockerSnapshotRaw represents all the information related to a snapshot as returned by the Docker API
DockerSnapshotRaw struct {
Containers interface{} `json:"Containers"`
Volumes interface{} `json:"Volumes"`
Networks interface{} `json:"Networks"`
Images interface{} `json:"Images"`
Info interface{} `json:"Info"`
Version interface{} `json:"Version"`
Containers []types.Container `json:"Containers"`
Volumes volume.VolumeListOKBody `json:"Volumes"`
Networks []types.NetworkResource `json:"Networks"`
Images []types.ImageSummary `json:"Images"`
Info types.Info `json:"Info"`
Version types.Version `json:"Version"`
}
// EdgeGroup represents an Edge group