aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings/system
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/system
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/system')
-rw-r--r--pkg/bindings/system/types_disk_options.go9
-rw-r--r--pkg/bindings/system/types_events_options.go53
-rw-r--r--pkg/bindings/system/types_info_options.go9
-rw-r--r--pkg/bindings/system/types_prune_options.go42
-rw-r--r--pkg/bindings/system/types_version_options.go9
5 files changed, 50 insertions, 72 deletions
diff --git a/pkg/bindings/system/types_disk_options.go b/pkg/bindings/system/types_disk_options.go
index d55139b68..d057a2361 100644
--- a/pkg/bindings/system/types_disk_options.go
+++ b/pkg/bindings/system/types_disk_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package system
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 *DiskOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *DiskOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
diff --git a/pkg/bindings/system/types_events_options.go b/pkg/bindings/system/types_events_options.go
index 8b4cff42c..6bb13b8a6 100644
--- a/pkg/bindings/system/types_events_options.go
+++ b/pkg/bindings/system/types_events_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package system
import (
@@ -6,80 +7,72 @@ 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 *EventsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *EventsOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
-// WithFilters
+// WithFilters set field Filters to given value
func (o *EventsOptions) WithFilters(value map[string][]string) *EventsOptions {
- v := value
- o.Filters = v
+ o.Filters = value
return o
}
-// GetFilters
+// GetFilters returns value of field Filters
func (o *EventsOptions) 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
}
-// WithSince
+// WithSince set field Since to given value
func (o *EventsOptions) WithSince(value string) *EventsOptions {
- v := &value
- o.Since = v
+ o.Since = &value
return o
}
-// GetSince
+// GetSince returns value of field Since
func (o *EventsOptions) GetSince() string {
- var since string
if o.Since == nil {
- return since
+ var z string
+ return z
}
return *o.Since
}
-// WithStream
+// WithStream set field Stream to given value
func (o *EventsOptions) WithStream(value bool) *EventsOptions {
- v := &value
- o.Stream = v
+ o.Stream = &value
return o
}
-// GetStream
+// GetStream returns value of field Stream
func (o *EventsOptions) GetStream() bool {
- var stream bool
if o.Stream == nil {
- return stream
+ var z bool
+ return z
}
return *o.Stream
}
-// WithUntil
+// WithUntil set field Until to given value
func (o *EventsOptions) WithUntil(value string) *EventsOptions {
- v := &value
- o.Until = v
+ o.Until = &value
return o
}
-// GetUntil
+// GetUntil returns value of field Until
func (o *EventsOptions) GetUntil() string {
- var until string
if o.Until == nil {
- return until
+ var z string
+ return z
}
return *o.Until
}
diff --git a/pkg/bindings/system/types_info_options.go b/pkg/bindings/system/types_info_options.go
index 2bbb95a2e..0a12d7db6 100644
--- a/pkg/bindings/system/types_info_options.go
+++ b/pkg/bindings/system/types_info_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package system
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 *InfoOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *InfoOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}
diff --git a/pkg/bindings/system/types_prune_options.go b/pkg/bindings/system/types_prune_options.go
index f4daa830a..4feb359ef 100644
--- a/pkg/bindings/system/types_prune_options.go
+++ b/pkg/bindings/system/types_prune_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package system
import (
@@ -6,64 +7,57 @@ 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)
}
-// WithAll
+// WithAll set field All to given value
func (o *PruneOptions) WithAll(value bool) *PruneOptions {
- v := &value
- o.All = v
+ o.All = &value
return o
}
-// GetAll
+// GetAll returns value of field All
func (o *PruneOptions) GetAll() bool {
- var all bool
if o.All == nil {
- return all
+ var z bool
+ return z
}
return *o.All
}
-// 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
}
-// WithVolumes
+// WithVolumes set field Volumes to given value
func (o *PruneOptions) WithVolumes(value bool) *PruneOptions {
- v := &value
- o.Volumes = v
+ o.Volumes = &value
return o
}
-// GetVolumes
+// GetVolumes returns value of field Volumes
func (o *PruneOptions) GetVolumes() bool {
- var volumes bool
if o.Volumes == nil {
- return volumes
+ var z bool
+ return z
}
return *o.Volumes
}
diff --git a/pkg/bindings/system/types_version_options.go b/pkg/bindings/system/types_version_options.go
index 5e01da583..840777ca6 100644
--- a/pkg/bindings/system/types_version_options.go
+++ b/pkg/bindings/system/types_version_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package system
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 *VersionOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName)
}
-// ToParams
+// ToParams formats struct fields to be passed to API service
func (o *VersionOptions) ToParams() (url.Values, error) {
return util.ToParams(o)
}