summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-28 14:37:30 -0500
committerGitHub <noreply@github.com>2021-01-28 14:37:30 -0500
commita4c255a939cf340978efd9cb070951029237c8cf (patch)
treed16359f9307cc94afd14f1721e465366e387d670 /pkg/bindings
parentfb653c43ed1eb9eb9b97ca80edb8df6caab88905 (diff)
parent84f7bdc4dbadee3101f61c7953b13e48de158093 (diff)
downloadpodman-a4c255a939cf340978efd9cb070951029237c8cf.tar.gz
podman-a4c255a939cf340978efd9cb070951029237c8cf.tar.bz2
podman-a4c255a939cf340978efd9cb070951029237c8cf.zip
Merge pull request #9115 from rhatdan/pull
Switch podman image push handlers to use abi
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/images/types.go29
-rw-r--r--pkg/bindings/images/types_push_options.go144
-rw-r--r--pkg/bindings/manifests/manifests.go1
3 files changed, 19 insertions, 155 deletions
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go
index 0248f2fa6..75f1a2f81 100644
--- a/pkg/bindings/images/types.go
+++ b/pkg/bindings/images/types.go
@@ -104,37 +104,14 @@ type PushOptions struct {
// Authfile is the path to the authentication file. Ignored for remote
// calls.
Authfile *string
- // CertDir is the path to certificate directories. Ignored for remote
- // calls.
- CertDir *string
- // Compress tarball image layers when pushing to a directory using the 'dir'
- // transport. Default is same compression type as source. Ignored for remote
- // calls.
+ // Compress tarball image layers when pushing to a directory using the 'dir' transport.
Compress *bool
- // Username for authenticating against the registry.
- Username *string
// Password for authenticating against the registry.
Password *string
- // DigestFile, after copying the image, write the digest of the resulting
- // image to the file. Ignored for remote calls.
- DigestFile *string
- // Format is the Manifest type (oci, v2s1, or v2s2) to use when pushing an
- // image using the 'dir' transport. Default is manifest type of source.
- // Ignored for remote calls.
- Format *string
- // Quiet can be specified to suppress pull progress when pulling. Ignored
- // for remote calls.
- Quiet *bool
- // RemoveSignatures, discard any pre-existing signatures in the image.
- // Ignored for remote calls.
- RemoveSignatures *bool
- // SignaturePolicy to use when pulling. Ignored for remote calls.
- SignaturePolicy *string
- // SignBy adds a signature at the destination using the specified key.
- // Ignored for remote calls.
- SignBy *string
// SkipTLSVerify to skip HTTPS and certificate verification.
SkipTLSVerify *bool
+ // Username for authenticating against the registry.
+ Username *string
}
//go:generate go run ../generator/generator.go SearchOptions
diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go
index 0c12ce4ac..7f9bb1064 100644
--- a/pkg/bindings/images/types_push_options.go
+++ b/pkg/bindings/images/types_push_options.go
@@ -119,22 +119,6 @@ func (o *PushOptions) GetAuthfile() string {
return *o.Authfile
}
-// WithCertDir
-func (o *PushOptions) WithCertDir(value string) *PushOptions {
- v := &value
- o.CertDir = v
- return o
-}
-
-// GetCertDir
-func (o *PushOptions) GetCertDir() string {
- var certDir string
- if o.CertDir == nil {
- return certDir
- }
- return *o.CertDir
-}
-
// WithCompress
func (o *PushOptions) WithCompress(value bool) *PushOptions {
v := &value
@@ -151,22 +135,6 @@ func (o *PushOptions) GetCompress() bool {
return *o.Compress
}
-// WithUsername
-func (o *PushOptions) WithUsername(value string) *PushOptions {
- v := &value
- o.Username = v
- return o
-}
-
-// GetUsername
-func (o *PushOptions) GetUsername() string {
- var username string
- if o.Username == nil {
- return username
- }
- return *o.Username
-}
-
// WithPassword
func (o *PushOptions) WithPassword(value string) *PushOptions {
v := &value
@@ -183,102 +151,6 @@ func (o *PushOptions) GetPassword() string {
return *o.Password
}
-// WithDigestFile
-func (o *PushOptions) WithDigestFile(value string) *PushOptions {
- v := &value
- o.DigestFile = v
- return o
-}
-
-// GetDigestFile
-func (o *PushOptions) GetDigestFile() string {
- var digestFile string
- if o.DigestFile == nil {
- return digestFile
- }
- return *o.DigestFile
-}
-
-// WithFormat
-func (o *PushOptions) WithFormat(value string) *PushOptions {
- v := &value
- o.Format = v
- return o
-}
-
-// GetFormat
-func (o *PushOptions) GetFormat() string {
- var format string
- if o.Format == nil {
- return format
- }
- return *o.Format
-}
-
-// WithQuiet
-func (o *PushOptions) WithQuiet(value bool) *PushOptions {
- v := &value
- o.Quiet = v
- return o
-}
-
-// GetQuiet
-func (o *PushOptions) GetQuiet() bool {
- var quiet bool
- if o.Quiet == nil {
- return quiet
- }
- return *o.Quiet
-}
-
-// WithRemoveSignatures
-func (o *PushOptions) WithRemoveSignatures(value bool) *PushOptions {
- v := &value
- o.RemoveSignatures = v
- return o
-}
-
-// GetRemoveSignatures
-func (o *PushOptions) GetRemoveSignatures() bool {
- var removeSignatures bool
- if o.RemoveSignatures == nil {
- return removeSignatures
- }
- return *o.RemoveSignatures
-}
-
-// WithSignaturePolicy
-func (o *PushOptions) WithSignaturePolicy(value string) *PushOptions {
- v := &value
- o.SignaturePolicy = v
- return o
-}
-
-// GetSignaturePolicy
-func (o *PushOptions) GetSignaturePolicy() string {
- var signaturePolicy string
- if o.SignaturePolicy == nil {
- return signaturePolicy
- }
- return *o.SignaturePolicy
-}
-
-// WithSignBy
-func (o *PushOptions) WithSignBy(value string) *PushOptions {
- v := &value
- o.SignBy = v
- return o
-}
-
-// GetSignBy
-func (o *PushOptions) GetSignBy() string {
- var signBy string
- if o.SignBy == nil {
- return signBy
- }
- return *o.SignBy
-}
-
// WithSkipTLSVerify
func (o *PushOptions) WithSkipTLSVerify(value bool) *PushOptions {
v := &value
@@ -294,3 +166,19 @@ func (o *PushOptions) GetSkipTLSVerify() bool {
}
return *o.SkipTLSVerify
}
+
+// WithUsername
+func (o *PushOptions) WithUsername(value string) *PushOptions {
+ v := &value
+ o.Username = v
+ return o
+}
+
+// GetUsername
+func (o *PushOptions) GetUsername() string {
+ var username string
+ if o.Username == nil {
+ return username
+ }
+ return *o.Username
+}
diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go
index fec9832a0..4634dd442 100644
--- a/pkg/bindings/manifests/manifests.go
+++ b/pkg/bindings/manifests/manifests.go
@@ -153,7 +153,6 @@ func Push(ctx context.Context, name, destination string, options *images.PushOpt
}
params.Set("image", name)
params.Set("destination", destination)
- params.Set("format", *options.Format)
_, err = conn.DoRequest(nil, http.MethodPost, "/manifests/%s/push", params, nil, name)
if err != nil {
return "", err