summaryrefslogtreecommitdiff
path: root/pkg/bindings/manifests
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-09-13 14:29:22 -0700
committerJhon Honce <jhonce@redhat.com>2021-09-14 07:47:24 -0700
commitd7256be807890892c988cc7d270e3d1bf951397c (patch)
tree53fadc1842f3de6a7c62ab97c8e16f15b0dc4484 /pkg/bindings/manifests
parentb603c7a4b91d30b33ce987740156f46804f24074 (diff)
downloadpodman-d7256be807890892c988cc7d270e3d1bf951397c.tar.gz
podman-d7256be807890892c988cc7d270e3d1bf951397c.tar.bz2
podman-d7256be807890892c988cc7d270e3d1bf951397c.zip
Enhance bindings for IDE hints
* Follow https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source for leading comment * Add godoc strings for all exposed methods for IDE support * Copy field godoc strings into generated code as function godoc string * Remove unused/unnecessary fields from generator.go structures * Cleanup code regarding template usage Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/bindings/manifests')
-rw-r--r--pkg/bindings/manifests/types_add_options.go97
-rw-r--r--pkg/bindings/manifests/types_create_options.go20
-rw-r--r--pkg/bindings/manifests/types_exists_options.go9
-rw-r--r--pkg/bindings/manifests/types_inspect_options.go9
-rw-r--r--pkg/bindings/manifests/types_remove_options.go9
5 files changed, 60 insertions, 84 deletions
diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go
index 09105c590..c2e7b5e89 100644
--- a/pkg/bindings/manifests/types_add_options.go
+++ b/pkg/bindings/manifests/types_add_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package manifests
import (
@@ -6,144 +7,132 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util"
)
-/*
-This file is generated automatically by go generate. Do not edit.
-*/
-
-// Changed
+// Changed returns true if named field has been set
func (o *AddOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *AddOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
-// WithAll
+// WithAll set field All to given value
func (o *AddOptions) WithAll(value bool) *AddOptions {
- v := &value
- o.All = v
+ o.All = &value
return o
}
-// GetAll
+// GetAll returns value of field All
func (o *AddOptions) GetAll() bool {
- var all bool
if o.All == nil {
- return all
+ var z bool
+ return z
}
return *o.All
}
-// WithAnnotation
+// WithAnnotation set field Annotation to given value
func (o *AddOptions) WithAnnotation(value map[string]string) *AddOptions {
- v := value
- o.Annotation = v
+ o.Annotation = value
return o
}
-// GetAnnotation
+// GetAnnotation returns value of field Annotation
func (o *AddOptions) GetAnnotation() map[string]string {
- var annotation map[string]string
if o.Annotation == nil {
- return annotation
+ var z map[string]string
+ return z
}
return o.Annotation
}
-// WithArch
+// WithArch set field Arch to given value
func (o *AddOptions) WithArch(value string) *AddOptions {
- v := &value
- o.Arch = v
+ o.Arch = &value
return o
}
-// GetArch
+// GetArch returns value of field Arch
func (o *AddOptions) GetArch() string {
- var arch string
if o.Arch == nil {
- return arch
+ var z string
+ return z
}
return *o.Arch
}
-// WithFeatures
+// WithFeatures set field Features to given value
func (o *AddOptions) WithFeatures(value []string) *AddOptions {
- v := value
- o.Features = v
+ o.Features = value
return o
}
-// GetFeatures
+// GetFeatures returns value of field Features
func (o *AddOptions) GetFeatures() []string {
- var features []string
if o.Features == nil {
- return features
+ var z []string
+ return z
}
return o.Features
}
-// WithImages
+// WithImages set field Images to given value
func (o *AddOptions) WithImages(value []string) *AddOptions {
- v := value
- o.Images = v
+ o.Images = value
return o
}
-// GetImages
+// GetImages returns value of field Images
func (o *AddOptions) GetImages() []string {
- var images []string
if o.Images == nil {
- return images
+ var z []string
+ return z
}
return o.Images
}
-// WithOS
+// WithOS set field OS to given value
func (o *AddOptions) WithOS(value string) *AddOptions {
- v := &value
- o.OS = v
+ o.OS = &value
return o
}
-// GetOS
+// GetOS returns value of field OS
func (o *AddOptions) GetOS() string {
- var oS string
if o.OS == nil {
- return oS
+ var z string
+ return z
}
return *o.OS
}
-// WithOSVersion
+// WithOSVersion set field OSVersion to given value
func (o *AddOptions) WithOSVersion(value string) *AddOptions {
- v := &value
- o.OSVersion = v
+ o.OSVersion = &value
return o
}
-// GetOSVersion
+// GetOSVersion returns value of field OSVersion
func (o *AddOptions) GetOSVersion() string {
- var oSVersion string
if o.OSVersion == nil {
- return oSVersion
+ var z string
+ return z
}
return *o.OSVersion
}
-// WithVariant
+// WithVariant set field Variant to given value
func (o *AddOptions) WithVariant(value string) *AddOptions {
- v := &value
- o.Variant = v
+ o.Variant = &value
return o
}
-// GetVariant
+// GetVariant returns value of field Variant
func (o *AddOptions) GetVariant() string {
- var variant string
if o.Variant == nil {
- return variant
+ var z string
+ return z
}
return *o.Variant
}
diff --git a/pkg/bindings/manifests/types_create_options.go b/pkg/bindings/manifests/types_create_options.go
index 5f022c672..a04b7f4dd 100644
--- a/pkg/bindings/manifests/types_create_options.go
+++ b/pkg/bindings/manifests/types_create_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package manifests
import (
@@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util"
)
-/*
-This file is generated automatically by go generate. Do not edit.
-*/
-
-// Changed
+// Changed returns true if named field has been set
func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
-// WithAll
+// WithAll set field All to given value
func (o *CreateOptions) WithAll(value bool) *CreateOptions {
- v := &value
- o.All = v
+ o.All = &value
return o
}
-// GetAll
+// GetAll returns value of field All
func (o *CreateOptions) GetAll() bool {
- var all bool
if o.All == nil {
- return all
+ var z bool
+ return z
}
return *o.All
}
diff --git a/pkg/bindings/manifests/types_exists_options.go b/pkg/bindings/manifests/types_exists_options.go
index 6f33c2cd5..0531b92c1 100644
--- a/pkg/bindings/manifests/types_exists_options.go
+++ b/pkg/bindings/manifests/types_exists_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package manifests
import (
@@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util"
)
-/*
-This file is generated automatically by go generate. Do not edit.
-*/
-
-// Changed
+// Changed returns true if named field has been set
func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
diff --git a/pkg/bindings/manifests/types_inspect_options.go b/pkg/bindings/manifests/types_inspect_options.go
index 7dfa11cb4..686d7171d 100644
--- a/pkg/bindings/manifests/types_inspect_options.go
+++ b/pkg/bindings/manifests/types_inspect_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package manifests
import (
@@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util"
)
-/*
-This file is generated automatically by go generate. Do not edit.
-*/
-
-// Changed
+// Changed returns true if named field has been set
func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
diff --git a/pkg/bindings/manifests/types_remove_options.go b/pkg/bindings/manifests/types_remove_options.go
index 7a507cf1a..90edd2b82 100644
--- a/pkg/bindings/manifests/types_remove_options.go
+++ b/pkg/bindings/manifests/types_remove_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package manifests
import (
@@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util"
)
-/*
-This file is generated automatically by go generate. Do not edit.
-*/
-
-// Changed
+// Changed returns true if named field has been set
func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}