summaryrefslogtreecommitdiff
path: root/pkg/bindings/secrets
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/secrets
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/secrets')
-rw-r--r--pkg/bindings/secrets/types_create_options.go42
-rw-r--r--pkg/bindings/secrets/types_inspect_options.go9
-rw-r--r--pkg/bindings/secrets/types_list_options.go20
-rw-r--r--pkg/bindings/secrets/types_remove_options.go9
4 files changed, 32 insertions, 48 deletions
diff --git a/pkg/bindings/secrets/types_create_options.go b/pkg/bindings/secrets/types_create_options.go
index 28d0c4e83..2c0633682 100644
--- a/pkg/bindings/secrets/types_create_options.go
+++ b/pkg/bindings/secrets/types_create_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package secrets
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 *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)
}
-// WithName
+// WithName set field Name to given value
func (o *CreateOptions) WithName(value string) *CreateOptions {
- v := &value
- o.Name = v
+ o.Name = &value
return o
}
-// GetName
+// GetName returns value of field Name
func (o *CreateOptions) GetName() string {
- var name string
if o.Name == nil {
- return name
+ var z string
+ return z
}
return *o.Name
}
-// WithDriver
+// WithDriver set field Driver to given value
func (o *CreateOptions) WithDriver(value string) *CreateOptions {
- v := &value
- o.Driver = v
+ o.Driver = &value
return o
}
-// GetDriver
+// GetDriver returns value of field Driver
func (o *CreateOptions) GetDriver() string {
- var driver string
if o.Driver == nil {
- return driver
+ var z string
+ return z
}
return *o.Driver
}
-// WithDriverOpts
+// WithDriverOpts set field DriverOpts to given value
func (o *CreateOptions) WithDriverOpts(value map[string]string) *CreateOptions {
- v := value
- o.DriverOpts = v
+ o.DriverOpts = value
return o
}
-// GetDriverOpts
+// GetDriverOpts returns value of field DriverOpts
func (o *CreateOptions) GetDriverOpts() map[string]string {
- var driverOpts map[string]string
if o.DriverOpts == nil {
- return driverOpts
+ var z map[string]string
+ return z
}
return o.DriverOpts
}
diff --git a/pkg/bindings/secrets/types_inspect_options.go b/pkg/bindings/secrets/types_inspect_options.go
index 48c2737d0..79ea97293 100644
--- a/pkg/bindings/secrets/types_inspect_options.go
+++ b/pkg/bindings/secrets/types_inspect_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package secrets
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/secrets/types_list_options.go b/pkg/bindings/secrets/types_list_options.go
index e4501dde8..87b657ff9 100644
--- a/pkg/bindings/secrets/types_list_options.go
+++ b/pkg/bindings/secrets/types_list_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package secrets
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/secrets/types_remove_options.go b/pkg/bindings/secrets/types_remove_options.go
index dd5ac530a..424a0c2e1 100644
--- a/pkg/bindings/secrets/types_remove_options.go
+++ b/pkg/bindings/secrets/types_remove_options.go
@@ -1,3 +1,4 @@
+// Code generated by go generate; DO NOT EDIT.
package secrets
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)
}