1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(edge/stack): add stack deployment info struct [EE-5523] (#9042)

This commit is contained in:
Oscar Zhou 2023-06-26 18:12:15 +12:00 committed by GitHub
parent 89c1d0e337
commit c96e076871
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 100 additions and 0 deletions

View file

@ -299,6 +299,12 @@ type (
Endpoints []EndpointID `json:"Endpoints"`
}
// StackDeploymentInfo records the information of a deployed stack
StackDeploymentInfo struct {
Version int `json:"Version"`
ConfigHash string `json:"ConfigHash"`
}
//EdgeStack represents an edge stack
EdgeStack struct {
// EdgeStack Identifier
@ -340,6 +346,8 @@ type (
Details EdgeStackStatusDetails `json:"Details"`
Error string `json:"Error"`
EndpointID EndpointID `json:"EndpointID"`
// EE only feature
DeploymentInfo StackDeploymentInfo `json:"DeploymentInfo"`
// Deprecated
Type EdgeStackStatusType `json:"Type"`
@ -1380,6 +1388,10 @@ type (
RollbackStackFile(stackIdentifier, fileName string) error
GetEdgeStackProjectPath(edgeStackIdentifier string) string
StoreEdgeStackFileFromBytes(edgeStackIdentifier, fileName string, data []byte) (string, error)
GetEdgeStackProjectPathByVersion(edgeStackIdentifier string, version int) string
StoreEdgeStackFileFromBytesByVersion(edgeStackIdentifier, fileName string, version int, data []byte) (string, error)
FormProjectPathByVersion(projectIdentifier string, version int) string
SafeMoveDirectory(src, dst string) error
StoreRegistryManagementFileFromBytes(folder, fileName string, data []byte) (string, error)
KeyPairFilesExist() (bool, error)
StoreKeyPair(private, public []byte, privatePEMHeader, publicPEMHeader string) error