feat(docs): add template preview (#1777)

This commit is contained in:
nils måsén 2023-10-02 16:11:04 +02:00 committed by GitHub
parent 9b28fbc24d
commit 9180e9558e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 944 additions and 20 deletions

View file

@ -0,0 +1,44 @@
package data
import wt "github.com/containrrr/watchtower/pkg/types"
type containerStatus struct {
containerID wt.ContainerID
oldImage wt.ImageID
newImage wt.ImageID
containerName string
imageName string
error
state State
}
func (u *containerStatus) ID() wt.ContainerID {
return u.containerID
}
func (u *containerStatus) Name() string {
return u.containerName
}
func (u *containerStatus) CurrentImageID() wt.ImageID {
return u.oldImage
}
func (u *containerStatus) LatestImageID() wt.ImageID {
return u.newImage
}
func (u *containerStatus) ImageName() string {
return u.imageName
}
func (u *containerStatus) Error() string {
if u.error == nil {
return ""
}
return u.error.Error()
}
func (u *containerStatus) State() string {
return string(u.state)
}