mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
add http head based digest comparison to avoid dockerhub rate limits
This commit is contained in:
parent
c8bd484b9e
commit
cb62b16369
23 changed files with 1476 additions and 57 deletions
26
pkg/types/container.go
Normal file
26
pkg/types/container.go
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package types
|
||||
|
||||
import "github.com/docker/docker/api/types"
|
||||
|
||||
// Container is a docker container running an image
|
||||
type Container interface {
|
||||
ContainerInfo() *types.ContainerJSON
|
||||
ID() string
|
||||
IsRunning() bool
|
||||
Name() string
|
||||
ImageID() string
|
||||
ImageName() string
|
||||
Enabled() (bool, bool)
|
||||
IsMonitorOnly() bool
|
||||
Scope() (string, bool)
|
||||
Links() []string
|
||||
ToRestart() bool
|
||||
IsWatchtower() bool
|
||||
StopSignal() string
|
||||
HasImageInfo() bool
|
||||
ImageInfo() *types.ImageInspect
|
||||
GetLifecyclePreCheckCommand() string
|
||||
GetLifecyclePostCheckCommand() string
|
||||
GetLifecyclePreUpdateCommand() string
|
||||
GetLifecyclePostUpdateCommand() string
|
||||
}
|
||||
7
pkg/types/registry_credentials.go
Normal file
7
pkg/types/registry_credentials.go
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
package types
|
||||
|
||||
// RegistryCredentials is a credential pair used for basic auth
|
||||
type RegistryCredentials struct {
|
||||
Username string
|
||||
Password string // usually a token rather than an actual password
|
||||
}
|
||||
6
pkg/types/token_response.go
Normal file
6
pkg/types/token_response.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package types
|
||||
|
||||
// TokenResponse is returned by the registry on successful authentication
|
||||
type TokenResponse struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue