Merge pull request #51399 from thaJeztah/swarm_enums

api/types/swarm: create types for enum-consts
This commit is contained in:
Sebastiaan van Stijn
2025-11-05 16:33:20 +01:00
committed by GitHub
7 changed files with 64 additions and 28 deletions

View File

@@ -28,7 +28,7 @@ type ServiceUpdateOptions struct {
// RegistryAuthFrom specifies where to find the registry authorization
// credentials if they are not given in EncodedRegistryAuth. Valid
// values are "spec" and "previous-spec".
RegistryAuthFrom string
RegistryAuthFrom swarm.RegistryAuthSource
// Rollback indicates whether a server-side rollback should be
// performed. When this is set, the provided spec will be ignored.
@@ -65,7 +65,7 @@ func (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, options
query := url.Values{}
if options.RegistryAuthFrom != "" {
query.Set("registryAuthFrom", options.RegistryAuthFrom)
query.Set("registryAuthFrom", string(options.RegistryAuthFrom))
}
if options.Rollback != "" {