aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings/volumes
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/volumes
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/volumes')
-rw-r--r--pkg/bindings/volumes/types_create_options.go9
-rw-r--r--pkg/bindings/volumes/types_exists_options.go9
-rw-r--r--pkg/bindings/volumes/types_inspect_options.go9
-rw-r--r--pkg/bindings/volumes/types_list_options.go20
-rw-r--r--pkg/bindings/volumes/types_prune_options.go20
-rw-r--r--pkg/bindings/volumes/types_remove_options.go20
6 files changed, 33 insertions, 54 deletions
diff --git a/pkg/bindings/volumes/types_create_options.go b/pkg/bindings/volumes/types_create_options.go
index 0e8274d25..416c6aa26 100644
--- a/pkg/bindings/volumes/types_create_options.go
+++ b/pkg/bindings/volumes/types_create_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package volumes
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 *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)
}
diff --git a/pkg/bindings/volumes/types_exists_options.go b/pkg/bindings/volumes/types_exists_options.go
index b58b93f38..5c9cc9295 100644
--- a/pkg/bindings/volumes/types_exists_options.go
+++ b/pkg/bindings/volumes/types_exists_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package volumes
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/volumes/types_inspect_options.go b/pkg/bindings/volumes/types_inspect_options.go
index 81bed1363..4358748c2 100644
--- a/pkg/bindings/volumes/types_inspect_options.go
+++ b/pkg/bindings/volumes/types_inspect_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package volumes
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/volumes/types_list_options.go b/pkg/bindings/volumes/types_list_options.go
index 9b2c6a3ad..e4896649c 100644
--- a/pkg/bindings/volumes/types_list_options.go
+++ b/pkg/bindings/volumes/types_list_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package volumes
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 *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
-// WithFilters
+// WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
- v := value
- o.Filters = v
+ o.Filters = value
return o
}
-// GetFilters
+// GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string {
- var filters map[string][]string
if o.Filters == nil {
- return filters
+ var z map[string][]string
+ return z
}
return o.Filters
}
diff --git a/pkg/bindings/volumes/types_prune_options.go b/pkg/bindings/volumes/types_prune_options.go
index 5d52752f2..2e2964981 100644
--- a/pkg/bindings/volumes/types_prune_options.go
+++ b/pkg/bindings/volumes/types_prune_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package volumes
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 *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
-// WithFilters
+// WithFilters set field Filters to given value
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions {
- v := value
- o.Filters = v
+ o.Filters = value
return o
}
-// GetFilters
+// GetFilters returns value of field Filters
func (o *PruneOptions) GetFilters() map[string][]string {
- var filters map[string][]string
if o.Filters == nil {
- return filters
+ var z map[string][]string
+ return z
}
return o.Filters
}
diff --git a/pkg/bindings/volumes/types_remove_options.go b/pkg/bindings/volumes/types_remove_options.go
index 5e3fde58a..0e0a3c804 100644
--- a/pkg/bindings/volumes/types_remove_options.go
+++ b/pkg/bindings/volumes/types_remove_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package volumes
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 *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)
}
-// WithForce
+// WithForce set field Force to given value
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions {
- v := &value
- o.Force = v
+ o.Force = &value
return o
}
-// GetForce
+// GetForce returns value of field Force
func (o *RemoveOptions) GetForce() bool {
- var force bool
if o.Force == nil {
- return force
+ var z bool
+ return z
}
return *o.Force
}