diff options
Diffstat (limited to 'pkg/bindings/volumes')
-rw-r--r-- | pkg/bindings/volumes/types.go | 3 | ||||
-rw-r--r-- | pkg/bindings/volumes/types_remove_options.go | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/pkg/bindings/volumes/types.go b/pkg/bindings/volumes/types.go index 3fda77ddd..d2f19c0c8 100644 --- a/pkg/bindings/volumes/types.go +++ b/pkg/bindings/volumes/types.go @@ -28,7 +28,8 @@ type PruneOptions struct { // RemoveOptions are optional options for removing volumes type RemoveOptions struct { // Force removes the volume even if it is being used - Force *bool + Force *bool + Timeout *uint } //go:generate go run ../generator/generator.go ExistsOptions diff --git a/pkg/bindings/volumes/types_remove_options.go b/pkg/bindings/volumes/types_remove_options.go index 0e0a3c804..fe079cddf 100644 --- a/pkg/bindings/volumes/types_remove_options.go +++ b/pkg/bindings/volumes/types_remove_options.go @@ -31,3 +31,18 @@ func (o *RemoveOptions) GetForce() bool { } return *o.Force } + +// WithTimeout set field Timeout to given value +func (o *RemoveOptions) WithTimeout(value uint) *RemoveOptions { + o.Timeout = &value + return o +} + +// GetTimeout returns value of field Timeout +func (o *RemoveOptions) GetTimeout() uint { + if o.Timeout == nil { + var z uint + return z + } + return *o.Timeout +} |