api/types/swarm: define type for RegistryAuthSource

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-11-05 11:45:22 +01:00
parent d299e5be83
commit 39ccd04ca8
6 changed files with 29 additions and 11 deletions

View File

@@ -207,8 +207,12 @@ type JobStatus struct {
LastExecution time.Time `json:",omitempty"`
}
// RegistryAuthSource defines options for the "registryAuthFrom" query parameter
// on service update.
type RegistryAuthSource string
// Values for RegistryAuthFrom in ServiceUpdateOptions
const (
RegistryAuthFromSpec = "spec"
RegistryAuthFromPreviousSpec = "previous-spec"
RegistryAuthFromSpec RegistryAuthSource = "spec"
RegistryAuthFromPreviousSpec RegistryAuthSource = "previous-spec"
)